Removed the olddeadflag from CPlayer and moved the spawn forward into the PStatus Client Message
This commit is contained in:
parent
60b3f30ab3
commit
e6c8afa5de
|
@ -43,7 +43,6 @@ void CPlayer::Disconnect()
|
||||||
bot = false;
|
bot = false;
|
||||||
savedScore = 0;
|
savedScore = 0;
|
||||||
|
|
||||||
olddeadflag = 0;
|
|
||||||
oldteam = 0;
|
oldteam = 0;
|
||||||
oldclass = 0;
|
oldclass = 0;
|
||||||
oldprone = 0;
|
oldprone = 0;
|
||||||
|
@ -138,7 +137,6 @@ void CPlayer::Init( int pi, edict_t* pe )
|
||||||
ingame = false;
|
ingame = false;
|
||||||
bot = false;
|
bot = false;
|
||||||
savedScore = 0;
|
savedScore = 0;
|
||||||
olddeadflag = 0;
|
|
||||||
oldteam = 0;
|
oldteam = 0;
|
||||||
oldclass = 0;
|
oldclass = 0;
|
||||||
oldprone = 0;
|
oldprone = 0;
|
||||||
|
@ -370,10 +368,6 @@ void CPlayer::PreThink()
|
||||||
if(!ingame || ignoreBots(pEdict))
|
if(!ingame || ignoreBots(pEdict))
|
||||||
return;
|
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)
|
if(oldteam != pEdict->v.team && iFTeamForward != -1)
|
||||||
MF_ExecuteForward(iFTeamForward, index, pEdict->v.team, oldteam);
|
MF_ExecuteForward(iFTeamForward, index, pEdict->v.team, oldteam);
|
||||||
|
|
||||||
|
@ -391,7 +385,6 @@ void CPlayer::PreThink()
|
||||||
|
|
||||||
// Set the old variables for
|
// Set the old variables for
|
||||||
oldprone = pEdict->v.iuser3;
|
oldprone = pEdict->v.iuser3;
|
||||||
olddeadflag = pEdict->v.deadflag;
|
|
||||||
oldteam = pEdict->v.team;
|
oldteam = pEdict->v.team;
|
||||||
oldclass = pEdict->v.playerclass;
|
oldclass = pEdict->v.playerclass;
|
||||||
oldstamina = pEdict->v.fuser4;
|
oldstamina = pEdict->v.fuser4;
|
||||||
|
|
|
@ -95,7 +95,6 @@ class CPlayer
|
||||||
float clearRound;
|
float clearRound;
|
||||||
|
|
||||||
int oldteam;
|
int oldteam;
|
||||||
int olddeadflag;
|
|
||||||
int oldclass;
|
int oldclass;
|
||||||
float oldstamina;
|
float oldstamina;
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,7 @@ void Client_SetFOV(void*);
|
||||||
void Client_SetFOV_End(void*);
|
void Client_SetFOV_End(void*);
|
||||||
void Client_Object(void*);
|
void Client_Object(void*);
|
||||||
void Client_Object_End(void*);
|
void Client_Object_End(void*);
|
||||||
|
void Client_PStatus(void*);
|
||||||
|
|
||||||
typedef void (*funEventCall)(void*);
|
typedef void (*funEventCall)(void*);
|
||||||
|
|
||||||
|
@ -125,6 +126,7 @@ extern int gmsgSetFOV;
|
||||||
extern int gmsgSetFOV_End;
|
extern int gmsgSetFOV_End;
|
||||||
extern int gmsgObject;
|
extern int gmsgObject;
|
||||||
extern int gmsgObject_End;
|
extern int gmsgObject_End;
|
||||||
|
extern int gmsgPStatus;
|
||||||
|
|
||||||
extern int iFDamage;
|
extern int iFDamage;
|
||||||
extern int iFDeath;
|
extern int iFDeath;
|
||||||
|
|
|
@ -79,6 +79,7 @@ int gmsgSetFOV;
|
||||||
int gmsgSetFOV_End;
|
int gmsgSetFOV_End;
|
||||||
int gmsgObject;
|
int gmsgObject;
|
||||||
int gmsgObject_End;
|
int gmsgObject_End;
|
||||||
|
int gmsgPStatus;
|
||||||
|
|
||||||
RankSystem g_rank;
|
RankSystem g_rank;
|
||||||
Grenades g_grenades;
|
Grenades g_grenades;
|
||||||
|
@ -117,6 +118,7 @@ g_user_msg[] =
|
||||||
{ "SetFOV", &gmsgSetFOV_End, Client_SetFOV_End, true },
|
{ "SetFOV", &gmsgSetFOV_End, Client_SetFOV_End, true },
|
||||||
{ "Object", &gmsgObject, Client_Object, false },
|
{ "Object", &gmsgObject, Client_Object, false },
|
||||||
{ "Object", &gmsgObject_End, Client_Object_End, true },
|
{ "Object", &gmsgObject_End, Client_Object_End, true },
|
||||||
|
{ "PStatus", &gmsgPStatus, Client_PStatus, false },
|
||||||
{ "ScoreShort", &gmsgScoreShort, NULL, false },
|
{ "ScoreShort", &gmsgScoreShort, NULL, false },
|
||||||
{ "PTeam", &gmsgPTeam, NULL, false },
|
{ "PTeam", &gmsgPTeam, NULL, false },
|
||||||
{ 0,0,0,false }
|
{ 0,0,0,false }
|
||||||
|
|
|
@ -349,3 +349,14 @@ void Client_Object_End(void* mValue)
|
||||||
mPlayer->object.pEdict = NULL;
|
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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user