From 5730719182924c13a9bc28b86b07ff889b9a048f Mon Sep 17 00:00:00 2001 From: Boondorl Date: Wed, 19 Mar 2025 10:24:21 -0400 Subject: [PATCH] Fixed player respawning Pass appropriate information to the VM --- src/playsim/p_mobj.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 970011850..4149c8da2 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -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)