mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Savegame floorrover fixes
This commit is contained in:
parent
dd35871699
commit
03d1baf422
1 changed files with 7 additions and 7 deletions
|
@ -1199,11 +1199,11 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
WRITEFIXED(save_p, mobj->floorz);
|
||||
WRITEFIXED(save_p, mobj->ceilingz);
|
||||
|
||||
if (diff & MD2_FLOORROVER)
|
||||
if (diff2 & MD2_FLOORROVER)
|
||||
{
|
||||
ffloor_t *rover;
|
||||
size_t i = 0;
|
||||
INT32 roverindex = -1;
|
||||
UINT32 roverindex = 0;
|
||||
|
||||
for (rover = mobj->floorrover->target->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
|
@ -1216,14 +1216,14 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
}
|
||||
|
||||
WRITEUINT32(save_p, (UINT32)(mobj->floorrover->target - sectors));
|
||||
WRITEUINT32(save_p, (UINT32)roverindex);
|
||||
WRITEUINT32(save_p, rover ? roverindex : i); // store max index to denote invalid ffloor ref
|
||||
}
|
||||
|
||||
if (diff & MD2_CEILINGROVER)
|
||||
if (diff2 & MD2_CEILINGROVER)
|
||||
{
|
||||
ffloor_t *rover;
|
||||
size_t i = 0;
|
||||
INT32 roverindex = -1;
|
||||
UINT32 roverindex = 0;
|
||||
|
||||
for (rover = mobj->ceilingrover->target->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
|
@ -1235,8 +1235,8 @@ static void SaveMobjThinker(const thinker_t *th, const UINT8 type)
|
|||
i++;
|
||||
}
|
||||
|
||||
WRITEUINT32(save_p, mobj->ceilingrover->target - sectors);
|
||||
WRITEUINT32(save_p, roverindex);
|
||||
WRITEUINT32(save_p, (UINT32)(mobj->ceilingrover->target - sectors));
|
||||
WRITEUINT32(save_p, rover ? roverindex : i); // store max index to denote invalid ffloor ref
|
||||
}
|
||||
|
||||
if (diff & MD_SPAWNPOINT)
|
||||
|
|
Loading…
Reference in a new issue