- SW: Fix PreMapCombineFloors() setup due to player actor not yet being initialised.

* Fixes #804.
This commit is contained in:
Mitchell Richters 2022-12-23 19:15:52 +11:00
parent 4890f1d9dc
commit 0b3076d2b4
2 changed files with 2 additions and 18 deletions

View file

@ -455,9 +455,9 @@ void InitLevel(MapRecord *maprec)
InitAllPlayers();
QueueReset();
PreMapCombineFloors();
InitMultiPlayerInfo(ppos, mapangle(ang));
InitAllPlayerSprites(ppos, mapangle(ang));
PreMapCombineFloors();
//
// Do setup for sprite, track, panel, sector, etc

View file

@ -1504,6 +1504,7 @@ void PreMapCombineFloors(void)
while (auto jActor = it2.Next())
{
jActor->spr.pos += dv;
jActor->backupvec2();
}
for (auto& wal : dasect->walls)
@ -1514,23 +1515,6 @@ void PreMapCombineFloors(void)
search.Add(wal.nextSector());
}
}
TRAVERSE_CONNECT(pnum)
{
PLAYER* pp = &Player[pnum];
auto dasect = pp->cursector;
search.Rewind();
while (auto itsect = search.GetNext())
{
if (itsect == dasect)
{
pp->actor->spr.pos.XY() += dv;
pp->actor->backupvec2();
break;
}
}
}
}
// get rid of the sprites used