[Scummvm-cvs-logs] CVS: residual/lua ltask.cpp,1.7,1.8
Erich Edgar Hoover
compholio at users.sourceforge.net
Thu Jul 21 09:02:55 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: residual README,1.25,1.26 TODO,1.49,1.50 actor.cpp,1.54,1.55 costume.cpp,1.30,1.31 costume.h,1.16,1.17 engine.cpp,1.79,1.80 lua.cpp,1.142,1.143 model.cpp,1.28,1.29 model.h,1.10,1.11 smush.cpp,1.62,1.63 smush.h,1.25,1.26
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga script.h,1.95,1.96 sfuncs.cpp,1.141,1.142 sthread.cpp,1.88,1.89
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/residual/lua
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10421/lua
Modified Files:
ltask.cpp
Log Message:
Fix for scene changing bug (task cleanup problem) - better SMUSH looping - actor choring now allowed when actor not visible. commit from wrong folder, here's the rest.
Index: ltask.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua/ltask.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- ltask.cpp 8 Apr 2005 22:29:06 -0000 1.7
+++ ltask.cpp 21 Jul 2005 15:16:35 -0000 1.8
@@ -241,9 +241,10 @@
prev = L->root_task;
while ((t = prev->next) != NULL) {
+ luaI_switchtask(t);
+ // Tstate is not available until after switching tasks
if (t->Tstate == PAUSE)
continue;
- luaI_switchtask(t);
L->errorJmp = &myErrorJmp;
L->Tstate = RUN;
if (setjmp(myErrorJmp) == 0) {
@@ -255,7 +256,17 @@
L->Tstate = DONE;
}
L->errorJmp = NULL;
- if (L->Tstate == DONE) { /* Remove from list of active tasks */
+ prev = t;
+ }
+ // Free the completed tasks
+ // This MUST occur after all the tasks have been run (not during)
+ // or else when one task is freed right after another the task
+ // execution gets hosed. Test Case: Switching between tw.set and
+ // tb.set in Rubacava causes a crash without this.
+ prev = L->root_task;
+ while ((t = prev->next) != NULL) {
+ luaI_switchtask(t);
+ if (L->Tstate == DONE) { // Remove from list of active tasks
luaI_switchtask(old_task);
prev->next = t->next;
t->next = NULL;
- Previous message: [Scummvm-cvs-logs] CVS: residual README,1.25,1.26 TODO,1.49,1.50 actor.cpp,1.54,1.55 costume.cpp,1.30,1.31 costume.h,1.16,1.17 engine.cpp,1.79,1.80 lua.cpp,1.142,1.143 model.cpp,1.28,1.29 model.h,1.10,1.11 smush.cpp,1.62,1.63 smush.h,1.25,1.26
- Next message: [Scummvm-cvs-logs] CVS: scummvm/saga script.h,1.95,1.96 sfuncs.cpp,1.141,1.142 sthread.cpp,1.88,1.89
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list