mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
NULL spriteext[].tpsr after each running EVENT_ANIMATESPRITES for a tsprite.
Meaning that only *ettsprite[THISACTOR] makes sense from CON. It did before too, because .tspr was set before each event run (and not before all runs), only that it was never nulled, which was kind of untidy. git-svn-id: https://svn.eduke32.com/eduke32@3450 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
03e819a3cb
commit
cef99818bb
2 changed files with 7 additions and 4 deletions
|
@ -6232,6 +6232,7 @@ static void G_DoEventAnimSprites(int32_t j)
|
|||
{
|
||||
spriteext[ow].tspr = &tsprite[j];
|
||||
VM_OnEvent(EVENT_ANIMATESPRITES, ow, myconnectindex, -1, 0);
|
||||
spriteext[ow].tspr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5333,11 +5333,9 @@ void G_SaveMapState(mapstate_t *save)
|
|||
Bmemcpy(&save->sector[0],§or[0],sizeof(sectortype)*MAXSECTORS);
|
||||
Bmemcpy(&save->sprite[0],&sprite[0],sizeof(spritetype)*MAXSPRITES);
|
||||
|
||||
// If we're in EVENT_ANIMATESPRITES, we'll be saving pointer values to disk :-/
|
||||
if (g_currentEventExec == EVENT_ANIMATESPRITES)
|
||||
initprintf("Line %d: savemapstate called from EVENT_ANIMATESPRITES. WHY?\n", g_errorLineNum);
|
||||
else
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
spriteext[i].tspr = NULL;
|
||||
Bmemcpy(&save->spriteext[0],&spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
|
||||
|
||||
save->numsprites = Numsprites;
|
||||
|
@ -5433,11 +5431,15 @@ void G_RestoreMapState(mapstate_t *save)
|
|||
Bmemcpy(§or[0],&save->sector[0],sizeof(sectortype)*MAXSECTORS);
|
||||
Bmemcpy(&sprite[0],&save->sprite[0],sizeof(spritetype)*MAXSPRITES);
|
||||
Bmemcpy(&spriteext[0],&save->spriteext[0],sizeof(spriteext_t)*MAXSPRITES);
|
||||
|
||||
// If we're restoring from EVENT_ANIMATESPRITES, all spriteext[].tspr
|
||||
// will be overwritten, so NULL them.
|
||||
if (g_currentEventExec == EVENT_ANIMATESPRITES)
|
||||
{
|
||||
initprintf("Line %d: loadmapstate called from EVENT_ANIMATESPRITES. WHY?\n",g_errorLineNum);
|
||||
else
|
||||
for (i=0; i<MAXSPRITES; i++)
|
||||
spriteext[i].tspr = NULL;
|
||||
}
|
||||
|
||||
Numsprites = save->numsprites;
|
||||
tailspritefree = save->tailspritefree;
|
||||
|
|
Loading…
Reference in a new issue