Do the same with writing ARCH_FFLOOR values in Lua archiving code (reading was already dealt with years ago)

This commit is contained in:
Monster Iestyn 2020-04-24 22:43:23 +01:00
parent 7dda5f6b94
commit 49cceda15b

View file

@ -1010,16 +1010,8 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
if (!rover)
WRITEUINT8(save_p, ARCH_NULL);
else {
ffloor_t *r2;
UINT16 i = 0;
// search for id
for (r2 = rover->target->ffloors; r2; r2 = r2->next)
{
if (r2 == rover)
break;
i++;
}
if (!r2)
UINT16 i = P_GetFFloorID(rover);
if (i == UINT16_MAX) // invalid ID
WRITEUINT8(save_p, ARCH_NULL);
else
{