From 3dcbf9955d4c134f2a4526b74b6fcf30ed73fe09 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 16 Aug 2019 04:58:51 +0000 Subject: [PATCH] Add console/log output for when the player is killed by various internal things, to aid in debugging git-svn-id: https://svn.eduke32.com/eduke32@8030 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/actors.cpp | 16 ++++++++++++---- source/duke3d/src/player.cpp | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/source/duke3d/src/actors.cpp b/source/duke3d/src/actors.cpp index d49e6f9a7..9fa77169c 100644 --- a/source/duke3d/src/actors.cpp +++ b/source/duke3d/src/actors.cpp @@ -1344,11 +1344,19 @@ ACTOR_STATIC void G_MovePlayers(void) if (pSprite->extra > 0) { - actor[spriteNum].owner = spriteNum; +#ifndef EDUKE32_STANDALONE + if (!FURY) + { + actor[spriteNum].owner = spriteNum; - if (ud.god == 0) - if (G_CheckForSpaceCeiling(pSprite->sectnum) || G_CheckForSpaceFloor(pSprite->sectnum)) - P_QuickKill(pPlayer); + if (ud.god == 0) + if (G_CheckForSpaceCeiling(pSprite->sectnum) || G_CheckForSpaceFloor(pSprite->sectnum)) + { + OSD_Printf(OSD_ERROR "%s: player killed by space sector!\n", EDUKE32_FUNCTION); + P_QuickKill(pPlayer); + } + } +#endif } else { diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 07c244738..d4f379ff4 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -4586,7 +4586,7 @@ static void P_DoJetpack(int const playerNum, int const playerBits, int const pla static void P_Dead(int const playerNum, int const sectorLotag, int const floorZ, int const ceilZ) { auto const pPlayer = g_player[playerNum].ps; - auto const pSprite = &sprite[pPlayer->i]; + auto const pSprite = &sprite[pPlayer->i]; if (ud.recstat == 1 && (!g_netServer && ud.multimode < 2)) G_CloseDemoWrite(); @@ -4691,6 +4691,7 @@ void P_ProcessInput(int playerNum) { if (pSprite->extra > 0 && ud.noclip == 0) { + OSD_Printf(OSD_ERROR "%s: player killed by cursectnum == -1!\n", EDUKE32_FUNCTION); P_QuickKill(pPlayer); A_PlaySound(SQUISHED, pPlayer->i); } @@ -5474,6 +5475,7 @@ HORIZONLY:; if (squishPlayer) { + OSD_Printf(OSD_ERROR "%s: player killed by pushmove()!\n", EDUKE32_FUNCTION); P_QuickKill(pPlayer); return; }