diff --git a/dlls/dod/dodx/CMisc.cpp b/dlls/dod/dodx/CMisc.cpp index 6f1aa8e7..b281202a 100755 --- a/dlls/dod/dodx/CMisc.cpp +++ b/dlls/dod/dodx/CMisc.cpp @@ -43,7 +43,6 @@ void CPlayer::Disconnect() bot = false; savedScore = 0; - olddeadflag = 0; oldteam = 0; oldclass = 0; oldprone = 0; @@ -138,7 +137,6 @@ void CPlayer::Init( int pi, edict_t* pe ) ingame = false; bot = false; savedScore = 0; - olddeadflag = 0; oldteam = 0; oldclass = 0; oldprone = 0; @@ -370,10 +368,6 @@ void CPlayer::PreThink() if(!ingame || ignoreBots(pEdict)) return; - // Died in the normal way - if(olddeadflag != 0 && pEdict->v.deadflag == 0 && iFSpawnForward != -1) - MF_ExecuteForward(iFSpawnForward, index); - if(oldteam != pEdict->v.team && iFTeamForward != -1) MF_ExecuteForward(iFTeamForward, index, pEdict->v.team, oldteam); @@ -391,7 +385,6 @@ void CPlayer::PreThink() // Set the old variables for oldprone = pEdict->v.iuser3; - olddeadflag = pEdict->v.deadflag; oldteam = pEdict->v.team; oldclass = pEdict->v.playerclass; oldstamina = pEdict->v.fuser4; diff --git a/dlls/dod/dodx/CMisc.h b/dlls/dod/dodx/CMisc.h index 462bd7a9..b755d087 100755 --- a/dlls/dod/dodx/CMisc.h +++ b/dlls/dod/dodx/CMisc.h @@ -95,7 +95,6 @@ class CPlayer float clearRound; int oldteam; - int olddeadflag; int oldclass; float oldstamina; diff --git a/dlls/dod/dodx/dodx.h b/dlls/dod/dodx/dodx.h index 7916b6b8..c7bf325b 100755 --- a/dlls/dod/dodx/dodx.h +++ b/dlls/dod/dodx/dodx.h @@ -104,6 +104,7 @@ void Client_SetFOV(void*); void Client_SetFOV_End(void*); void Client_Object(void*); void Client_Object_End(void*); +void Client_PStatus(void*); typedef void (*funEventCall)(void*); @@ -125,6 +126,7 @@ extern int gmsgSetFOV; extern int gmsgSetFOV_End; extern int gmsgObject; extern int gmsgObject_End; +extern int gmsgPStatus; extern int iFDamage; extern int iFDeath; diff --git a/dlls/dod/dodx/moduleconfig.cpp b/dlls/dod/dodx/moduleconfig.cpp index eb2eab31..6cbc146b 100755 --- a/dlls/dod/dodx/moduleconfig.cpp +++ b/dlls/dod/dodx/moduleconfig.cpp @@ -79,6 +79,7 @@ int gmsgSetFOV; int gmsgSetFOV_End; int gmsgObject; int gmsgObject_End; +int gmsgPStatus; RankSystem g_rank; Grenades g_grenades; @@ -117,6 +118,7 @@ g_user_msg[] = { "SetFOV", &gmsgSetFOV_End, Client_SetFOV_End, true }, { "Object", &gmsgObject, Client_Object, false }, { "Object", &gmsgObject_End, Client_Object_End, true }, + { "PStatus", &gmsgPStatus, Client_PStatus, false }, { "ScoreShort", &gmsgScoreShort, NULL, false }, { "PTeam", &gmsgPTeam, NULL, false }, { 0,0,0,false } diff --git a/dlls/dod/dodx/usermsg.cpp b/dlls/dod/dodx/usermsg.cpp index 263ec07f..9b801b0b 100755 --- a/dlls/dod/dodx/usermsg.cpp +++ b/dlls/dod/dodx/usermsg.cpp @@ -349,3 +349,14 @@ void Client_Object_End(void* mValue) mPlayer->object.pEdict = NULL; } } + +// This seems to be only called when the player spawns +void Client_PStatus(void* mValue) +{ + switch(mState++) + { + case 0: + MF_ExecuteForward(iFSpawnForward, *(int*)mValue); + break; + } +} \ No newline at end of file