Fixed regression with camera while travelling

Also readds guard for trying to move travellers out of the list at map start.
This commit is contained in:
Boondorl 2025-07-30 15:21:38 -04:00 committed by Ricardo Luís Vaz Silva
commit 789829f967
2 changed files with 12 additions and 0 deletions

View file

@ -1701,6 +1701,12 @@ void FLevelLocals::StartTravel()
// the actual STAT_TRAVELLING list when snapshotting.
void FLevelLocals::MoveTravellers()
{
for (size_t i = 0u; i < MAXPLAYERS; ++i)
{
if (PlayerInGame(i))
Players[i]->camera = nullptr;
}
for (auto th : TravellingThinkers)
{
if (th->ObjectFlags & OF_EuthanizeMe)

View file

@ -969,6 +969,12 @@ void DThinker::ChangeStatNum(int statnum)
static void ChangeStatNum(DThinker *self, int statnum)
{
if (self->ObjectFlags & OF_Travelling)
{
Printf(TEXTCOLOR_RED "Thinkers cannot be moved while travelling\n");
return;
}
// This will always break Actors, they should use STAT_TRAVELLING instead to
// transition between levels.
if (statnum == STAT_STATIC && self->IsKindOf(NAME_Actor))