mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-24 21:01:34 +00:00
Fix losing race rank after finishing if following other player
If you finish the race and then follow another player (fire and then rear fire to switch to SPECTATOR_FOLLOW) and then after other player finishes and there is no one else to follow the game switches you to SPECTATOR_FREE. This calls ClientBegin() which clears most of the game client data, including the finishRaceTime. This puts the player in last place on the scoreboard.
This commit is contained in:
parent
cad778cadc
commit
62467f97b9
1 changed files with 3 additions and 0 deletions
|
@ -1333,6 +1333,7 @@ void ClientSpawn(gentity_t *ent) {
|
|||
int eventSequence;
|
||||
char userinfo[MAX_INFO_STRING];
|
||||
// STONELANCE
|
||||
int savedFinishRaceTime;
|
||||
int savedDamageTaken;
|
||||
int savedDamageDealt;
|
||||
gentity_t *savedCarPoints[4];
|
||||
|
@ -1425,6 +1426,7 @@ void ClientSpawn(gentity_t *ent) {
|
|||
savedSess = client->sess;
|
||||
savedPing = client->ps.ping;
|
||||
// STONELANCE
|
||||
savedFinishRaceTime = client->finishRaceTime;
|
||||
savedDamageDealt = client->ps.stats[STAT_DAMAGE_DEALT];
|
||||
savedDamageTaken = client->ps.stats[STAT_DAMAGE_TAKEN];
|
||||
// END
|
||||
|
@ -1461,6 +1463,7 @@ void ClientSpawn(gentity_t *ent) {
|
|||
client->carPoints[1] = savedCarPoints[1];
|
||||
client->carPoints[2] = savedCarPoints[2];
|
||||
client->carPoints[3] = savedCarPoints[3];
|
||||
client->finishRaceTime = savedFinishRaceTime;
|
||||
client->ps.stats[STAT_DAMAGE_DEALT] = savedDamageDealt;
|
||||
client->ps.stats[STAT_DAMAGE_TAKEN] = savedDamageTaken;
|
||||
client->ps.stats[STAT_NEXT_CHECKPOINT] = ent->number;
|
||||
|
|
Loading…
Reference in a new issue