From fc0eabebb67f1fc4c0cd7478de203ee522debaa7 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 27 Sep 2017 02:30:24 +0000 Subject: [PATCH] Add player[].connected. Patch from Striker. git-svn-id: https://svn.eduke32.com/eduke32@6453 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/gamedef.cpp | 1 + source/duke3d/src/gamedef.h | 1 + source/duke3d/src/gamestructures.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index 7ccb80a0d..359e9f058 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -1040,6 +1040,7 @@ const memberlabel_t PlayerLabels[]= { "autostep_sbw", PLAYER_AUTOSTEP_SBW, 0, 0 }, { "hudpal", PLAYER_HUDPAL, 0, 0 }, { "index", PLAYER_INDEX, 0, 0 }, + { "connected", PLAYER_CONNECTED, 0, 0 }, { "", -1, 0, 0 } // END OF LIST }; diff --git a/source/duke3d/src/gamedef.h b/source/duke3d/src/gamedef.h index d68aa70be..f466968c9 100644 --- a/source/duke3d/src/gamedef.h +++ b/source/duke3d/src/gamedef.h @@ -404,6 +404,7 @@ enum PlayerLabel_t PLAYER_AUTOSTEP_SBW, PLAYER_HUDPAL, PLAYER_INDEX, + PLAYER_CONNECTED, PLAYER_END }; diff --git a/source/duke3d/src/gamestructures.cpp b/source/duke3d/src/gamestructures.cpp index c3167c93e..f6cfaf212 100644 --- a/source/duke3d/src/gamestructures.cpp +++ b/source/duke3d/src/gamestructures.cpp @@ -564,6 +564,7 @@ int32_t __fastcall VM_GetPlayer(int32_t const playerNum, int32_t labelNum, int32 case PLAYER_AUTOSTEP_SBW: labelNum = ps->autostep_sbw; break; case PLAYER_HUDPAL: labelNum = P_GetHudPal(ps); break; case PLAYER_INDEX: labelNum = playerNum; break; + case PLAYER_CONNECTED: labelNum = g_player[playerNum].playerquitflag; break; default: labelNum = -1; break; }