- fixed: loading polyobjects from a savegame was incomplete.

This commit is contained in:
Christoph Oelckers 2016-04-17 12:04:32 +02:00
parent a1e8d83724
commit a199fe1825

View file

@ -539,15 +539,7 @@ void P_SerializePolyobjs (FArchive &arc)
arc << seg << po_NumPolyobjs; arc << seg << po_NumPolyobjs;
for(i = 0, po = polyobjs; i < po_NumPolyobjs; i++, po++) for(i = 0, po = polyobjs; i < po_NumPolyobjs; i++, po++)
{ {
arc << po->tag << po->Angle << po->StartSpot.pos << po->interpolation; arc << po->tag << po->Angle << po->StartSpot.pos << po->interpolation << po->bBlocked;
if (SaveVersion >= 4537)
{
arc << po->bBlocked;
}
else
{
po->bBlocked = false;
}
} }
} }
else else
@ -573,6 +565,15 @@ void P_SerializePolyobjs (FArchive &arc)
I_Error ("UnarchivePolyobjs: Invalid polyobj tag"); I_Error ("UnarchivePolyobjs: Invalid polyobj tag");
} }
arc << angle << delta << po->interpolation; arc << angle << delta << po->interpolation;
if (SaveVersion >= 4537)
{
arc << po->bBlocked;
}
else
{
po->bBlocked = false;
}
po->RotatePolyobj (angle, true); po->RotatePolyobj (angle, true);
delta -= po->StartSpot.pos; delta -= po->StartSpot.pos;
po->MovePolyobj (delta, true); po->MovePolyobj (delta, true);