This should fix the assertion failure with undo/redo, my failure in r2478.

git-svn-id: https://svn.eduke32.com/eduke32@2485 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-14 23:17:54 +00:00
parent cf56956dff
commit 65fe7ce3bd

View file

@ -603,6 +603,8 @@ int32_t map_undoredo(int32_t dir)
Bmemset(show2dwall, 0, sizeof(show2dwall)); Bmemset(show2dwall, 0, sizeof(show2dwall));
Bmemset(hlsectorbitmap, 0, sizeof(hlsectorbitmap)); Bmemset(hlsectorbitmap, 0, sizeof(hlsectorbitmap));
initspritelists();
if (mapstate->numsectors) if (mapstate->numsectors)
{ {
qlz_decompress((const char *)&mapstate->sectors[0], &sector[0], state_decompress); qlz_decompress((const char *)&mapstate->sectors[0], &sector[0], state_decompress);
@ -614,8 +616,6 @@ int32_t map_undoredo(int32_t dir)
qlz_decompress((const char *)&mapstate->sprites[0], &sprite[0], state_decompress); qlz_decompress((const char *)&mapstate->sprites[0], &sprite[0], state_decompress);
} }
initspritelists();
for (i=0; i<mapstate->numsprites; i++) for (i=0; i<mapstate->numsprites; i++)
{ {
if ((sprite[i].cstat & 48) == 48) sprite[i].cstat &= ~48; if ((sprite[i].cstat & 48) == 48) sprite[i].cstat &= ~48;