mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-08 09:22:39 +00:00
Make spectators that are following someone who dies stop at the time of
death and not respawn somewhere else.
This commit is contained in:
parent
a7f9fc6b33
commit
4e7d209092
1 changed files with 25 additions and 13 deletions
|
@ -5,6 +5,10 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.48 2002/03/04 21:28:57 jbravo
|
||||||
|
// Make spectators that are following someone who dies stop at the time of
|
||||||
|
// death and not respawn somewhere else.
|
||||||
|
//
|
||||||
// Revision 1.47 2002/03/03 21:46:26 blaze
|
// Revision 1.47 2002/03/03 21:46:26 blaze
|
||||||
// weapon stats, done, beta test for bugs
|
// weapon stats, done, beta test for bugs
|
||||||
//
|
//
|
||||||
|
@ -933,19 +937,27 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||||
// JBravo: no need for automatic scoreboard on deaths.
|
// JBravo: no need for automatic scoreboard on deaths.
|
||||||
if (g_gametype.integer != GT_TEAMPLAY) {
|
if (g_gametype.integer != GT_TEAMPLAY) {
|
||||||
Cmd_Score_f(self); // show scores
|
Cmd_Score_f(self); // show scores
|
||||||
// send updated scores to any clients that are following this one,
|
}
|
||||||
// or they would get stale scoreboards
|
// send updated scores to any clients that are following this one,
|
||||||
for (i = 0 ; i < level.maxclients ; i++) {
|
// or they would get stale scoreboards
|
||||||
gclient_t *client;
|
for (i = 0 ; i < level.maxclients ; i++) {
|
||||||
|
gclient_t *client;
|
||||||
client = &level.clients[i];
|
gentity_t *follower;
|
||||||
if (client->pers.connected != CON_CONNECTED) {
|
|
||||||
continue;
|
client = &level.clients[i];
|
||||||
}
|
follower = &g_entities[i];
|
||||||
if (client->sess.sessionTeam != TEAM_SPECTATOR) {
|
|
||||||
continue;
|
if (client->pers.connected != CON_CONNECTED) {
|
||||||
}
|
continue;
|
||||||
if (client->sess.spectatorClient == self->s.number) {
|
}
|
||||||
|
if (client->sess.sessionTeam != TEAM_SPECTATOR) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// JBravo: make clients that are following this one stop following.
|
||||||
|
if (client->sess.spectatorClient == self->s.number) {
|
||||||
|
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||||
|
StopFollowing(follower);
|
||||||
|
} else {
|
||||||
Cmd_Score_f(g_entities + i);
|
Cmd_Score_f(g_entities + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue