Fixed player respawning

Pass appropriate information to the VM
This commit is contained in:
Boondorl 2025-03-19 10:24:21 -04:00 committed by Rachael Alexanderson
commit 5730719182
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -5726,8 +5726,10 @@ AActor *FLevelLocals::SpawnPlayer (FPlayerStart *mthing, int playernum, int flag
IFVIRTUALPTRNAME(p->mo, NAME_PlayerPawn, ResetAirSupply)
{
int drowning = 0;
VMValue params[] = { p->mo, false };
VMCall(func, params, 2, nullptr, 0);
VMReturn rets[] = { &drowning };
VMCall(func, params, 2, rets, 1);
}
for (int ii = 0; ii < MAXPLAYERS; ++ii)
@ -5762,7 +5764,7 @@ AActor *FLevelLocals::SpawnPlayer (FPlayerStart *mthing, int playernum, int flag
IFVM(PlayerPawn, FilterCoopRespawnInventory)
{
VMValue params[] = { p->mo, oldactor, ((heldWeap == nullptr || (heldWeap->ObjectFlags & OF_EuthanizeMe)) ? nullptr : heldWeap) };
VMCall(func, params, 2, nullptr, 0);
VMCall(func, params, 3, nullptr, 0);
}
}
if (oldactor != NULL)