Bugfix [#30298] Fluid-Sytem does not work! (Part 2, Part 1 fixed by Brecht)
authorDaniel Genrich <daniel.genrich@gmx.net>
Sun, 22 Apr 2012 17:31:39 +0000 (17:31 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Sun, 22 Apr 2012 17:31:39 +0000 (17:31 +0000)
Canceling fluid simulation did not work when speed was zero.

intern/elbeem/intern/ntl_world.cpp

index 42ee94b2cf59d32db33af75106f9e0f09465982b..3b649c9f5b9fe265280f0ffe07a0493daf81f54a 100644 (file)
@@ -400,8 +400,8 @@ int ntlWorld::advanceSims(int framenum)
        bool done = false;
        bool allPanic = true;
 
-       // stop/quit, dont display/render
-       if(getElbeemState()==SIMWORLD_STOP) { 
+       // stop/quit (abort), dont display/render
+       if(!isSimworldOk()) { 
                return 1;
        }
 
@@ -411,6 +411,9 @@ int ntlWorld::advanceSims(int framenum)
        // time stopped? nothing else to do...
        if( (*mpSims)[mFirstSim]->getFrameTime(framenum) <= 0.0 ){ 
                done=true; allPanic=false; 
+
+               /* DG: Need to check for user cancel here (fix for [#30298]) */
+               (*mpSims)[mFirstSim]->checkCallerStatus(FLUIDSIM_CBSTATUS_STEP, 0);
        }
 
        int gstate = 0;