mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-01 22:30:53 +00:00
TP Scores bug fix
This commit is contained in:
parent
f3339180b6
commit
ffce2112c1
2 changed files with 25 additions and 3 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.46 2002/02/06 12:06:48 slicer
|
||||
// TP Scores bug fix
|
||||
//
|
||||
// Revision 1.45 2002/02/06 03:10:43 jbravo
|
||||
// Fix the instant spectate on death and an attempt to fix the scores
|
||||
//
|
||||
|
@ -1517,12 +1520,15 @@ void SpectatorClientEndFrame( gentity_t *ent ) {
|
|||
cl = &level.clients[ clientNum ];
|
||||
if ( cl->pers.connected == CON_CONNECTED && cl->sess.sessionTeam != TEAM_SPECTATOR ) {
|
||||
flags = (cl->ps.eFlags & ~(EF_VOTED | EF_TEAMVOTED)) | (ent->client->ps.eFlags & (EF_VOTED | EF_TEAMVOTED));
|
||||
// JBravo: saving score and ping to fix the scoreboard
|
||||
// JBravo: saving score and ping to fix the scoreboard
|
||||
savedPing = ent->client->ps.ping;
|
||||
savedScore = ent->client->ps.persistant[PERS_SCORE];
|
||||
ent->client->ps = cl->ps;
|
||||
ent->client->ps.ping = savedPing;
|
||||
// ent->client->ps.persistant[PERS_SCORE] = savedScore;
|
||||
//Reposting score and ping..
|
||||
if(g_gametype.integer == GT_TEAMPLAY) {
|
||||
ent->client->ps.ping = savedPing;
|
||||
ent->client->ps.persistant[PERS_SCORE] = savedScore;
|
||||
}
|
||||
// ent->client->ps.persistant[PERS_SCORE] = ent->client->savedpersistant[PERS_SCORE];
|
||||
ent->client->ps.pm_flags |= PMF_FOLLOW;
|
||||
ent->client->ps.eFlags = flags;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.34 2002/02/06 12:06:48 slicer
|
||||
// TP Scores bug fix
|
||||
//
|
||||
// Revision 1.33 2002/02/06 03:10:43 jbravo
|
||||
// Fix the instant spectate on death and an attempt to fix the scores
|
||||
//
|
||||
|
@ -1123,6 +1126,7 @@ void ClientBegin( int clientNum ) {
|
|||
gentity_t *ent;
|
||||
gclient_t *client;
|
||||
int flags;
|
||||
int savedPing,savedScore;
|
||||
|
||||
ent = g_entities + clientNum;
|
||||
|
||||
|
@ -1143,6 +1147,12 @@ void ClientBegin( int clientNum ) {
|
|||
client->pers.sub = TEAM_FREE;
|
||||
}
|
||||
|
||||
//Slicer: Saving score and ping
|
||||
savedPing = client->ps.ping;
|
||||
savedScore = client->ps.persistant[PERS_SCORE];
|
||||
|
||||
|
||||
|
||||
client->pers.connected = CON_CONNECTED;
|
||||
client->pers.enterTime = level.time;
|
||||
client->pers.teamState.state = TEAM_BEGIN;
|
||||
|
@ -1155,6 +1165,12 @@ void ClientBegin( int clientNum ) {
|
|||
flags = client->ps.eFlags;
|
||||
memset( &client->ps, 0, sizeof( client->ps ) );
|
||||
client->ps.eFlags = flags;
|
||||
|
||||
//Slicer: Repost score and ping
|
||||
if(g_gametype.integer == GT_TEAMPLAY) {
|
||||
client->ps.ping = savedPing;
|
||||
client->ps.persistant[PERS_SCORE] = savedScore;
|
||||
}
|
||||
// locate ent at a spawn point
|
||||
ClientSpawn( ent );
|
||||
|
||||
|
|
Loading…
Reference in a new issue