TP Scores bug fix

This commit is contained in:
Daniel Simoes 2002-02-06 12:06:48 +00:00
parent f3339180b6
commit ffce2112c1
2 changed files with 25 additions and 3 deletions

View File

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.45 2002/02/06 03:10:43 jbravo
// Fix the instant spectate on death and an attempt to fix the scores // 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 ]; cl = &level.clients[ clientNum ];
if ( cl->pers.connected == CON_CONNECTED && cl->sess.sessionTeam != TEAM_SPECTATOR ) { 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)); 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; savedPing = ent->client->ps.ping;
savedScore = ent->client->ps.persistant[PERS_SCORE]; savedScore = ent->client->ps.persistant[PERS_SCORE];
ent->client->ps = cl->ps; ent->client->ps = cl->ps;
//Reposting score and ping..
if(g_gametype.integer == GT_TEAMPLAY) {
ent->client->ps.ping = savedPing; ent->client->ps.ping = savedPing;
// ent->client->ps.persistant[PERS_SCORE] = savedScore; ent->client->ps.persistant[PERS_SCORE] = savedScore;
}
// ent->client->ps.persistant[PERS_SCORE] = ent->client->savedpersistant[PERS_SCORE]; // ent->client->ps.persistant[PERS_SCORE] = ent->client->savedpersistant[PERS_SCORE];
ent->client->ps.pm_flags |= PMF_FOLLOW; ent->client->ps.pm_flags |= PMF_FOLLOW;
ent->client->ps.eFlags = flags; ent->client->ps.eFlags = flags;

View File

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $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 // Revision 1.33 2002/02/06 03:10:43 jbravo
// Fix the instant spectate on death and an attempt to fix the scores // Fix the instant spectate on death and an attempt to fix the scores
// //
@ -1123,6 +1126,7 @@ void ClientBegin( int clientNum ) {
gentity_t *ent; gentity_t *ent;
gclient_t *client; gclient_t *client;
int flags; int flags;
int savedPing,savedScore;
ent = g_entities + clientNum; ent = g_entities + clientNum;
@ -1143,6 +1147,12 @@ void ClientBegin( int clientNum ) {
client->pers.sub = TEAM_FREE; 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.connected = CON_CONNECTED;
client->pers.enterTime = level.time; client->pers.enterTime = level.time;
client->pers.teamState.state = TEAM_BEGIN; client->pers.teamState.state = TEAM_BEGIN;
@ -1155,6 +1165,12 @@ void ClientBegin( int clientNum ) {
flags = client->ps.eFlags; flags = client->ps.eFlags;
memset( &client->ps, 0, sizeof( client->ps ) ); memset( &client->ps, 0, sizeof( client->ps ) );
client->ps.eFlags = flags; 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 // locate ent at a spawn point
ClientSpawn( ent ); ClientSpawn( ent );