Commit b9b7114e authored by terencehill's avatar terencehill

Rename gameover to game_stopped as it makes more sense now. Proper game over...

Rename gameover to game_stopped as it makes more sense now. Proper game over check is if(intermission_running)
parent 659af223
Pipeline #5661931 passed with stages
in 18 minutes and 44 seconds
......@@ -759,7 +759,7 @@ bool WantEventchase(entity this)
{
if(autocvar_cl_orthoview)
return false;
if(STAT(GAMEOVER) || intermission)
if(STAT(GAME_STOPPED) || intermission)
return true;
if(this.viewloc)
return true;
......@@ -961,7 +961,7 @@ void HUD_Crosshair(entity this)
{
float f, i, j;
vector v;
if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAMEOVER) &&
if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAME_STOPPED) &&
spectatee_status != -1 && !csqcplayer.viewloc && !MUTATOR_CALLHOOK(DrawCrosshair) &&
!HUD_MinigameMenu_IsOpened() )
{
......
......@@ -234,7 +234,7 @@ void DropBall(entity ball, vector org, vector vel)
void InitBall(entity this)
{
if(gameover) return;
if(game_stopped) return;
UNSET_ONGROUND(this);
set_movetype(this, MOVETYPE_BOUNCE);
if(this.classname == "nexball_basketball")
......@@ -362,7 +362,7 @@ void GoalTouch(entity this, entity toucher)
float isclient, pscore, otherteam;
string pname;
if(gameover) return;
if(game_stopped) return;
if((this.spawnflags & GOAL_TOUCHPLAYER) && toucher.ballcarried)
ball = toucher.ballcarried;
else
......
......@@ -870,9 +870,9 @@ void ons_camSetup(entity this)
void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(damage <= 0) { return; }
if(warmup_stage || gameover) { return; }
if(!round_handler_IsRoundStarted()) { return; }
if(damage <= 0) return;
if(warmup_stage || game_stopped) return;
if(!round_handler_IsRoundStarted()) return;
if (attacker != this)
{
......@@ -955,7 +955,7 @@ void ons_GeneratorDamage(entity this, entity inflictor, entity attacker, float d
void ons_GeneratorThink(entity this)
{
this.nextthink = time + GEN_THINKRATE;
if (!gameover)
if (!game_stopped)
{
if(!this.isshielded && this.wait < time)
{
......@@ -2021,7 +2021,7 @@ MUTATOR_HOOKFUNCTION(ons, SV_ParseClientCommand)
MUTATOR_HOOKFUNCTION(ons, PlayerUseKey)
{
if(MUTATOR_RETURNVALUE || gameover) { return false; }
if(MUTATOR_RETURNVALUE || game_stopped) return false;
entity player = M_ARGV(0, entity);
......
......@@ -782,7 +782,7 @@ void Monster_Move(entity this, float runspeed, float walkspeed, float stpspeed)
entity targ = this.goalentity;
if (MUTATOR_CALLHOOK(MonsterMove, this, runspeed, walkspeed, targ)
|| gameover
|| game_stopped
|| this.draggedby != NULL
|| (round_handler_IsActive() && !round_handler_IsRoundStarted())
|| time < game_starttime
......@@ -1115,7 +1115,7 @@ void Monster_Damage(entity this, entity inflictor, entity attacker, float damage
// don't check for enemies, just keep walking in a straight line
void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff)
{
if(gameover || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || this.draggedby != NULL || time < game_starttime || (autocvar_g_campaign && !campaign_bots_may_start) || time < this.spawn_time)
if(game_stopped || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || this.draggedby != NULL || time < game_starttime || (autocvar_g_campaign && !campaign_bots_may_start) || time < this.spawn_time)
{
mspeed = 0;
if(time >= this.spawn_time)
......
......@@ -114,7 +114,7 @@ void buff_SetCooldown(entity this, float cd)
void buff_Respawn(entity this)
{
if(gameover) { return; }
if(game_stopped) return;
vector oldbufforigin = this.origin;
this.velocity = '0 0 200';
......@@ -149,7 +149,7 @@ void buff_Respawn(entity this)
void buff_Touch(entity this, entity toucher)
{
if(gameover) { return; }
if(game_stopped) return;
if(ITEM_TOUCH_NEEDKILL())
{
......@@ -248,7 +248,7 @@ void buff_Think(entity this)
this.oldbuffs = this.buffs;
}
if(!gameover)
if(!game_stopped)
if((round_handler_IsActive() && !round_handler_IsRoundStarted()) || time >= game_starttime)
if(!this.buff_activetime_updated)
{
......@@ -269,7 +269,7 @@ void buff_Think(entity this)
}
if(this.buff_activetime)
if(!gameover)
if(!game_stopped)
if((round_handler_IsActive() && !round_handler_IsRoundStarted()) || time >= game_starttime)
{
this.buff_activetime = max(0, this.buff_activetime - frametime);
......@@ -632,7 +632,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerDies)
MUTATOR_HOOKFUNCTION(buffs, PlayerUseKey, CBC_ORDER_FIRST)
{
if(MUTATOR_RETURNVALUE || gameover) { return; }
if(MUTATOR_RETURNVALUE || game_stopped) return;
entity player = M_ARGV(0, entity);
......@@ -651,7 +651,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerUseKey, CBC_ORDER_FIRST)
MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
{
if(MUTATOR_RETURNVALUE || gameover) { return; }
if(MUTATOR_RETURNVALUE || game_stopped) return;
entity player = M_ARGV(0, entity);
if(player.buffs & BUFF_SWAPPER.m_itemid)
......@@ -795,7 +795,7 @@ MUTATOR_HOOKFUNCTION(buffs, PlayerPreThink)
{
entity player = M_ARGV(0, entity);
if(gameover || IS_DEAD(player)) { return; }
if(game_stopped || IS_DEAD(player)) return;
if(time < player.buff_disability_time)
if(time >= player.buff_disability_effect_time)
......
......@@ -34,7 +34,7 @@ MUTATOR_HOOKFUNCTION(campcheck, PlayerPreThink)
{
entity player = M_ARGV(0, entity);
if(!gameover)
if(!game_stopped)
if(!warmup_stage) // don't consider it camping during warmup?
if(time >= game_starttime)
if(IS_PLAYER(player))
......
......@@ -54,7 +54,7 @@ void instagib_ammocheck(entity this)
if(!IS_PLAYER(this))
return; // not a player
if(IS_DEAD(this) || gameover)
if(IS_DEAD(this) || game_stopped)
instagib_stop_countdown(this);
else if (this.ammo_cells > 0 || (this.items & IT_UNLIMITED_WEAPON_AMMO) || (this.flags & FL_GODMODE))
instagib_stop_countdown(this);
......
......@@ -1106,7 +1106,7 @@ bool CanThrowNade(entity this)
if(this.vehicle)
return false;
if(gameover)
if(game_stopped)
return false;
if(IS_DEAD(this))
......
......@@ -279,7 +279,7 @@ MUTATOR_HOOKFUNCTION(nix, PlayerPreThink)
{
entity player = M_ARGV(0, entity);
if(!gameover)
if(!game_stopped)
if(!IS_DEAD(player))
if(IS_PLAYER(player))
NIX_GiveCurrentWeapon(player);
......
......@@ -110,7 +110,7 @@ MUTATOR_HOOKFUNCTION(ok, ForbidThrowCurrentWeapon)
MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
{
if(gameover)
if(game_stopped)
return;
entity player = M_ARGV(0, entity);
......
......@@ -24,7 +24,7 @@ float gravity_delay;
MUTATOR_HOOKFUNCTION(random_gravity, SV_StartFrame)
{
if(gameover || !cvar("g_random_gravity")) return false;
if(game_stopped || !cvar("g_random_gravity")) return false;
if(time < gravity_delay) return false;
if(time < game_starttime) return false;
if(round_handler_IsActive() && !round_handler_IsRoundStarted()) return false;
......
......@@ -28,7 +28,7 @@ MUTATOR_HOOKFUNCTION(touchexplode, PlayerPreThink)
entity player = M_ARGV(0, entity);
if(time > player.touchexplode_time)
if(!gameover)
if(!game_stopped)
if(!STAT(FROZEN, player))
if(IS_PLAYER(player))
if(!IS_DEAD(player))
......
......@@ -57,10 +57,10 @@ REGISTER_STAT(KH_KEYS, int)
#ifdef SVQC
float W_WeaponRateFactor(entity this);
float gameover;
float game_stopped;
#endif
REGISTER_STAT(WEAPONRATEFACTOR, float, W_WeaponRateFactor(this))
REGISTER_STAT(GAMEOVER, int, gameover)
REGISTER_STAT(GAME_STOPPED, int, game_stopped)
REGISTER_STAT(GAMESTARTTIME, float)
REGISTER_STAT(STRENGTH_FINISHED, float)
REGISTER_STAT(INVINCIBLE_FINISHED, float)
......
......@@ -32,7 +32,7 @@ void target_voicescript_next(entity pl)
return;
if (!IS_PLAYER(pl))
return;
if(gameover)
if(game_stopped)
return;
if(time >= pl.voicescript_voiceend)
......
......@@ -541,7 +541,7 @@ void vehicle_use(entity this, entity actor, entity trigger)
else
this.active = ACTIVE_ACTIVE;
if(this.active == ACTIVE_ACTIVE && !IS_DEAD(this) && !gameover)
if(this.active == ACTIVE_ACTIVE && !IS_DEAD(this) && !game_stopped)
{
LOG_DEBUG("Respawning vehicle: ", this.netname);
if(this.effects & EF_NODRAW)
......
......@@ -402,7 +402,7 @@ bool bumblebee_pilot_frame(entity this, float dt)
entity vehic = this.vehicle;
return = true;
if(gameover)
if(game_stopped)
{
vehic.solid = SOLID_NOT;
vehic.takedamage = DAMAGE_NO;
......
......@@ -151,7 +151,7 @@ bool racer_frame(entity this, float dt)
entity vehic = this.vehicle;
return = true;
if(gameover)
if(game_stopped)
{
vehic.solid = SOLID_NOT;
vehic.takedamage = DAMAGE_NO;
......
......@@ -133,7 +133,7 @@ bool raptor_frame(entity this, float dt)
entity vehic = this.vehicle;
return = true;
if(gameover)
if(game_stopped)
{
vehic.solid = SOLID_NOT;
vehic.takedamage = DAMAGE_NO;
......
......@@ -48,7 +48,7 @@ bool spiderbot_frame(entity this, float dt)
entity vehic = this.vehicle;
return = true;
if(gameover)
if(game_stopped)
{
vehic.solid = SOLID_NOT;
vehic.takedamage = DAMAGE_NO;
......
......@@ -37,7 +37,7 @@ void sys_phys_ai(entity this)
void sys_phys_pregame_hold(entity this)
{
if (!IS_PLAYER(this)) { return; }
const bool allowed_to_move = (time >= game_starttime && !gameover);
const bool allowed_to_move = (time >= game_starttime && !game_stopped);
if (!allowed_to_move) {
this.velocity = '0 0 0';
set_movetype(this, MOVETYPE_NONE);
......
......@@ -668,7 +668,7 @@ void bot_clear(entity this)
void bot_serverframe()
{
if (gameover)
if (game_stopped)
return;
if (time < 2)
......
......@@ -279,7 +279,7 @@ void PutObserverInServer(entity this)
if (this.killcount != FRAGS_SPECTATOR)
{
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, this.netname);
if(!gameover)
if(!game_stopped)
if(autocvar_g_chat_nospectators == 1 || (!warmup_stage && autocvar_g_chat_nospectators == 2))
Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_CHAT_NOSPECTATORS);
......@@ -484,9 +484,8 @@ void PutClientInServer(entity this)
WriteByte(MSG_ONE, SVC_SETVIEW);
WriteEntity(MSG_ONE, this);
}
if (gameover) {
if (game_stopped)
TRANSMUTE(Observer, this);
}
SetSpectatee(this, NULL);
......@@ -871,7 +870,7 @@ void ClientKill_Now(entity this)
}
void KillIndicator_Think(entity this)
{
if (gameover)
if (game_stopped)
{
this.owner.killindicator = NULL;
delete(this);
......@@ -915,7 +914,7 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change,
float killtime;
float starttime;
if (gameover)
if (game_stopped)
return;
killtime = autocvar_g_balance_kill_delay;
......@@ -1007,7 +1006,7 @@ void ClientKill_TeamChange (entity this, float targetteam) // 0 = don't change,
void ClientKill (entity this)
{
if(gameover) return;
if(game_stopped) return;
if(this.player_blocked) return;
if(STAT(FROZEN, this)) return;
......@@ -1389,7 +1388,7 @@ void player_powerups(entity this)
// add a way to see what the items were BEFORE all of these checks for the mutator hook
int items_prev = this.items;
if((this.items & IT_USING_JETPACK) && !IS_DEAD(this) && !gameover)
if((this.items & IT_USING_JETPACK) && !IS_DEAD(this) && !game_stopped)
this.modelflags |= MF_ROCKET;
else
this.modelflags &= ~MF_ROCKET;
......@@ -2153,7 +2152,7 @@ void PlayerUseKey(entity this)
if(this.vehicle)
{
if(!gameover)
if(!game_stopped)
{
vehicles_exit(this.vehicle, VHEF_NORMAL);
return;
......@@ -2163,7 +2162,7 @@ void PlayerUseKey(entity this)
{
if(!STAT(FROZEN, this))
if(!IS_DEAD(this))
if(!gameover)
if(!game_stopped)
{
entity head, closest_target = NULL;
head = WarpZone_FindRadius(this.origin, autocvar_g_vehicles_enter_radius, true);
......@@ -2294,7 +2293,7 @@ void PlayerPreThink (entity this)
MUTATOR_CALLHOOK(PlayerPreThink, this);
if(autocvar_g_vehicles_enter && (time > this.last_vehiclecheck) && !gameover && !this.vehicle)
if(autocvar_g_vehicles_enter && (time > this.last_vehiclecheck) && !game_stopped && !this.vehicle)
if(IS_PLAYER(this) && !STAT(FROZEN, this) && !IS_DEAD(this))
{
FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_vehicles_enter_radius, IS_VEHICLE(it),
......@@ -2329,7 +2328,7 @@ void PlayerPreThink (entity this)
if (IS_PLAYER(this)) {
CheckRules_Player(this);
if (gameover || intermission_running) {
if (game_stopped || intermission_running) {
if(intermission_running)
IntermissionThink(this);
return;
......@@ -2500,7 +2499,7 @@ void PlayerPreThink (entity this)
this.dmg_team = max(0, this.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
}
else if (gameover || intermission_running) {
else if (game_stopped || intermission_running) {
if(intermission_running)
IntermissionThink(this);
return;
......@@ -2652,7 +2651,7 @@ void PlayerPostThink (entity this)
CheatFrame(this);
//CheckPlayerJump();
if (gameover)
if (game_stopped)
{
this.solid = SOLID_NOT;
this.takedamage = DAMAGE_NO;
......@@ -2664,7 +2663,7 @@ void PlayerPostThink (entity this)
CheckRules_Player(this);
UpdateChatBubble(this);
if (this.impulse) ImpulseCommands(this);
if (gameover)
if (game_stopped)
{
CSQCMODEL_AUTOUPDATE(this);
return;
......
......@@ -167,7 +167,7 @@ void ClientCommand_join(entity caller, float request)
{
case CMD_REQUEST_COMMAND:
{
if (!gameover)
if (!game_stopped)
if (IS_CLIENT(caller) && !IS_PLAYER(caller))
if (joinAllowed(caller))
Join(caller);
......
......@@ -336,7 +336,7 @@ void reset_map(bool dorespawn)
{
if (time <= game_starttime)
{
if (gameover)
if (game_stopped)
return;
if (round_handler_IsActive())
round_handler_Reset(game_starttime);
......@@ -405,7 +405,7 @@ void ReadyRestart_think(entity this)
// Forces a restart of the game without actually reloading the map // this is a mess...
void ReadyRestart_force()
{
if (time <= game_starttime && gameover)
if (time <= game_starttime && game_stopped)
return;
bprint("^1Server is restarting...\n");
......@@ -464,7 +464,7 @@ void ReadyRestart_force()
void ReadyRestart()
{
if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || gameover || race_completing) localcmd("restart\n");
if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || game_stopped || race_completing) localcmd("restart\n");
else localcmd("\nsv_hook_gamerestart\n");
// Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
......
......@@ -33,7 +33,7 @@ void UpdateFrags(entity player, int f)
void GiveFrags (entity attacker, entity targ, float f, int deathtype)
{
// TODO route through PlayerScores instead
if(gameover) return;
if(game_stopped) return;
if(f < 0)
{
......@@ -623,7 +623,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
mirrordamage = 0;
mirrorforce = 0;
if (gameover || targ.killcount == FRAGS_SPECTATOR)
if (game_stopped || targ.killcount == FRAGS_SPECTATOR)
return;
damage_targ = targ;
......
......@@ -163,7 +163,7 @@ void GrapplingHookThink(entity this)
error("Owner lost the hook!\n");
return;
}
if(LostMovetypeFollow(this) || gameover || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || ((this.aiment.flags & FL_PROJECTILE) && this.aiment.classname != "nade"))
if(LostMovetypeFollow(this) || game_stopped || (round_handler_IsActive() && !round_handler_IsRoundStarted()) || ((this.aiment.flags & FL_PROJECTILE) && this.aiment.classname != "nade"))
{
RemoveHook(this);
return;
......
......@@ -1528,9 +1528,8 @@ only called if a time or frag limit has expired
*/
void NextLevel()
{
gameover = true;
intermission_running = 1;
game_stopped = true;
intermission_running = 1; // game over
// enforce a wait time before allowing changelevel
if(player_count > 0)
......@@ -1587,7 +1586,7 @@ Exit deathmatch games upon conditions
*/
void CheckRules_Player(entity this)
{
if (gameover) // someone else quit the game already
if (game_stopped) // someone else quit the game already
return;
if(!IS_DEAD(this))
......@@ -2160,7 +2159,7 @@ void RestoreGame()
void Shutdown()
{
gameover = 2;
game_stopped = 2;
if(world_initialized > 0)
{
......
......@@ -352,7 +352,7 @@ IMPULSE(weapon_reload)
void ImpulseCommands(entity this)
{
if (gameover) return;
if (game_stopped) return;
int imp = this.impulse;
if (!imp) return;
......
......@@ -479,7 +479,7 @@ void GetCvars(entity this, int f)
string playername(entity p)
{
string t;
if (teamplay && !gameover && IS_PLAYER(p))
if (teamplay && !game_stopped && IS_PLAYER(p))
{
t = Team_ColorCode(p.team);
return strcat(t, strdecolorize(p.netname));
......
......@@ -213,7 +213,7 @@ entity as_round;
.entity ent_winning;
void as_round_think()
{
gameover = false;
game_stopped = false;
assault_new_round(as_round.ent_winning);
delete(as_round);
as_round = NULL;
......@@ -261,7 +261,7 @@ int WinningCondition_Assault()
as_round.think = as_round_think;
as_round.ent_winning = ent;
as_round.nextthink = time + AS_ROUND_DELAY;
gameover = true;
game_stopped = true;
// make sure timelimit isn't hit while the game is blocked
if(autocvar_timelimit > 0)
......
......@@ -1038,7 +1038,7 @@ void ctf_FlagThink(entity this)
METHOD(Flag, giveTo, bool(Flag this, entity flag, entity toucher))
{
return = false;
if(gameover) { return; }
if(game_stopped) return;
if(trace_dphitcontents & (DPCONTENTS_PLAYERCLIP | DPCONTENTS_MONSTERCLIP)) { return; }
bool is_not_monster = (!IS_MONSTER(toucher));
......@@ -2181,7 +2181,7 @@ MUTATOR_HOOKFUNCTION(ctf, PortalTeleport)
MUTATOR_HOOKFUNCTION(ctf, PlayerUseKey)
{
if(MUTATOR_RETURNVALUE || gameover) { return; }
if(MUTATOR_RETURNVALUE || game_stopped) return;
entity player = M_ARGV(0, entity);
......
......@@ -228,7 +228,7 @@ MUTATOR_HOOKFUNCTION(cts, PutClientInServer)
entity player = M_ARGV(0, entity);
if(IS_PLAYER(player))
if(!gameover)
if(!game_stopped)
{
if(player.killcount == FRAGS_SPECTATOR /* initial spawn */ || g_race_qualifying) // spawn
race_PreparePlayer(player);
......
......@@ -153,7 +153,7 @@ void dompointthink(entity this)
// give points
if (gameover || this.delay > time || time < game_starttime) // game has ended, don't keep giving points
if (game_stopped || this.delay > time || time < game_starttime) // game has ended, don't keep giving points
return;
if(autocvar_g_domination_point_rate)
......
......@@ -429,7 +429,7 @@ MUTATOR_HOOKFUNCTION(ft, GiveFragsForKill, CBC_ORDER_FIRST)
MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST)
{
if(gameover)
if(game_stopped)
return true;
if(round_handler_IsActive())
......
......@@ -41,7 +41,7 @@ void ka_TouchEvent(entity this, entity toucher);
void ka_RespawnBall(entity this);
void ka_RespawnBall(entity this) // runs whenever the ball needs to be relocated
{
if(gameover) { return; }
if(game_stopped) return;
vector oldballorigin = this.origin;
if(!MoveToRandomMapLocation(this, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256))
......@@ -83,8 +83,8 @@ void ka_TimeScoring(entity this)
void ka_TouchEvent(entity this, entity toucher) // runs any time that the ball comes in contact with something
{
if(gameover) { return; }
if(!this) { return; }
if(game_stopped) return;
if(!this) return;
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
{ // The ball fell off the map, respawn it since players can't get to it
ka_RespawnBall(this);
......
......@@ -157,7 +157,7 @@ void kh_Controller_SetThink(float t, kh_Think_t func) // runs occasionaly
void kh_WaitForPlayers();
void kh_Controller_Think(entity this) // called a lot
{
if(gameover)
if(game_stopped)
return;
if(this.cnt > 0)
{
......@@ -177,7 +177,7 @@ void kh_Controller_Think(entity this) // called a lot
void kh_Scores_Event(entity player, entity key, string what, float frags_player, float frags_owner) // update the score when a key is captured
{
string s;
if(gameover)
if(game_stopped)
return;
if(frags_player)
......@@ -448,7 +448,7 @@ void kh_Key_Collect(entity key, entity player) //a player picks up a dropped ke
void kh_Key_Touch(entity this, entity toucher) // runs many, many times when a key has been dropped and can be picked up
{
if(gameover)
if(game_stopped)
return;
if(this.owner) // already carried
......@@ -662,7 +662,7 @@ void kh_LoserTeam(int loser_team, entity lostkey) // runs when a player pushes
void kh_Key_Think(entity this) // runs all the time
{
if(gameover)
if(game_stopped)
return;
if(this.owner)
......
......@@ -414,7 +414,7 @@ MUTATOR_HOOKFUNCTION(lms, GetPlayerStatus)
MUTATOR_HOOKFUNCTION(lms, AddPlayerScore)
{
if(gameover)
if(game_stopped)
if(M_ARGV(0, entity) == SP_LMS_RANK) // score field
return true; // allow writing to this field in intermission as it is needed for newly joining players
}
......
......@@ -267,7 +267,7 @@ MUTATOR_HOOKFUNCTION(rc, PutClientInServer)
entity player = M_ARGV(0, entity);
if(IS_PLAYER(player))
if(!gameover)
if(!game_stopped)
{
if(player.killcount == FRAGS_SPECTATOR /* initial spawn */ || g_race_qualifying) // spawn
race_PreparePlayer(player);
......
......@@ -703,7 +703,7 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc
teamsay = false;
}
if(gameover)
if(game_stopped)
teamsay = false;
if (!source) {
......@@ -880,7 +880,7 @@ int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodc
if (!privatesay && source && !IS_PLAYER(source))
{
if (!gameover)
if (!game_stopped)
if (teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !warmup_stage))
teamsay = -1; // spectators
}
......
......@@ -12,8 +12,8 @@ void round_handler_Think(entity this)
return;
}
if (gameover)
gameover = false;
if (game_stopped)
game_stopped = false;
if (intermission_running)
{
......@@ -59,7 +59,7 @@ void round_handler_Think(entity this)
// schedule a new round
this.wait = true;
this.nextthink = time + this.delay;
gameover = true;
game_stopped = true;
}
else
{
......
......@@ -99,20 +99,20 @@ float TeamScore_AddToTeam(float t, float scorefield, float score)
{
entity s;
if(gameover)
if(game_stopped)
score = 0;
if(!scores_initialized) return 0; // FIXME remove this when everything uses this system
if(t <= 0 || t >= 16)
{
if(gameover)
if(game_stopped)
return 0;
error("Adding score to invalid team!");
}
s = teamscorekeepers[t - 1];
if(!s)
{
if(gameover)
if(game_stopped)
return 0;
error("Adding score to unknown team!");
}
......@@ -324,7 +324,7 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score)
bool mutator_returnvalue = MUTATOR_CALLHOOK(AddPlayerScore, scorefield, score, player);
score = M_ARGV(1, float);
if(gameover)
if(game_stopped)
if(!mutator_returnvalue)
score = 0;
......@@ -332,7 +332,7 @@ float PlayerScore_Add(entity player, PlayerScoreField scorefield, float score)
entity s = player.scorekeeper;
if(!s)
{
if(gameover)
if(game_stopped)
return 0;
LOG_WARN("Adding score to unknown player!");