Rename gameover to game_stopped as it makes more sense now. Proper game over check...
authorterencehill <piuntn@gmail.com>
Wed, 4 Jan 2017 18:59:26 +0000 (19:59 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 4 Jan 2017 18:59:26 +0000 (19:59 +0100)
43 files changed:
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/campcheck/sv_campcheck.qc
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/nix/sv_nix.qc
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc
qcsrc/common/mutators/mutator/random_gravity/sv_random_gravity.qc
qcsrc/common/mutators/mutator/touchexplode/sv_touchexplode.qc
qcsrc/common/stats.qh
qcsrc/common/triggers/target/voicescript.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/ecs/systems/sv_physics.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/client.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_world.qc
qcsrc/server/impulse.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/mutators/mutator/gamemode_cts.qc
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/mutators/mutator/gamemode_freezetag.qc
qcsrc/server/mutators/mutator/gamemode_keepaway.qc
qcsrc/server/mutators/mutator/gamemode_keyhunt.qc
qcsrc/server/mutators/mutator/gamemode_lms.qc
qcsrc/server/mutators/mutator/gamemode_race.qc
qcsrc/server/player.qc
qcsrc/server/round_handler.qc
qcsrc/server/scores.qc
qcsrc/server/sv_main.qc
qcsrc/server/weapons/weaponsystem.qc

index 6278311..ba53c03 100644 (file)
@@ -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() )
        {
index a9bd737..0a9d2e4 100644 (file)
@@ -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
index 195a3bd..5d67f9d 100644 (file)
@@ -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);
 
index c7d5190..1f8f507 100644 (file)
@@ -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)
index afd1ba7..7f2f084 100644 (file)
@@ -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)
index 36da631..41f538b 100644 (file)
@@ -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))
index 88bb8c0..af87885 100644 (file)
@@ -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);
index 5bf0360..627321e 100644 (file)
@@ -1106,7 +1106,7 @@ bool CanThrowNade(entity this)
        if(this.vehicle)
                return false;
 
-       if(gameover)
+       if(game_stopped)
                return false;
 
        if(IS_DEAD(this))
index fb995a1..135e507 100644 (file)
@@ -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);
index db030b9..49ecb55 100644 (file)
@@ -110,7 +110,7 @@ MUTATOR_HOOKFUNCTION(ok, ForbidThrowCurrentWeapon)
 
 MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
 {
-       if(gameover)
+       if(game_stopped)
                return;
 
        entity player = M_ARGV(0, entity);
index f6f28a7..db36185 100644 (file)
@@ -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;
index 38ac305..ddcd891 100644 (file)
@@ -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))
index 9b7d4a3..3d21280 100644 (file)
@@ -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)
index fe7155c..6dfb568 100644 (file)
@@ -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)
index 1bbc18d..4e4bfd5 100644 (file)
@@ -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)
index a4f4bec..01edce6 100644 (file)
@@ -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;
index 4480ec6..7af872e 100644 (file)
@@ -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;
index 2b349e1..19ac988 100644 (file)
@@ -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;
index ccc509c..1c651b1 100644 (file)
@@ -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;
index 4973a18..aaef9f3 100644 (file)
@@ -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);
index fb6f1e0..160f8ec 100644 (file)
@@ -668,7 +668,7 @@ void bot_clear(entity this)
 
 void bot_serverframe()
 {
-       if (gameover)
+       if (game_stopped)
                return;
 
        if (time < 2)
index 4706450..eaa55ce 100644 (file)
@@ -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;
index ea9610b..4f0e54d 100644 (file)
@@ -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);
index f7d3be0..f855b2f 100644 (file)
@@ -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!
index d5ad301..259857c 100644 (file)
@@ -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;
index a69b984..ef4cbc5 100644 (file)
@@ -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;
index b124609..f36b03b 100644 (file)
@@ -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)
        {
index ceca2ce..c84c0de 100644 (file)
@@ -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;
index 64c767e..6e2fdfc 100644 (file)
@@ -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));
index 28e91f2..994a297 100644 (file)
@@ -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)
index 6036fa5..2e8707b 100644 (file)
@@ -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);
 
index 21098a5..903ecf5 100644 (file)
@@ -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);
index 7f98ed2..ee9bdfa 100644 (file)
@@ -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)
index cec7d95..69f55a3 100644 (file)
@@ -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())
index b948c6d..7677bda 100644 (file)
@@ -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);
index d3ec335..32559af 100644 (file)
@@ -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)
index 25f6d3e..c3c2455 100644 (file)
@@ -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
 }
index abe6b84..3e93c1e 100644 (file)
@@ -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);
index 0fcf89f..6a20304 100644 (file)
@@ -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
        }
index 063c12a..6a18a6b 100644 (file)
@@ -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
                {
index e6264b8..b466630 100644 (file)
@@ -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!");
                return 0;
@@ -747,7 +747,7 @@ float TeamScore_GetCompareValue(float t)
 
        if(t <= 0 || t >= 16)
        {
-               if(gameover)
+               if(game_stopped)
                        return 0;
                error("Reading score of invalid team!");
        }
index b510b43..1448218 100644 (file)
@@ -230,7 +230,7 @@ void StartFrame()
        CreatureFrame_All();
        CheckRules_World();
 
-       if (warmup_stage && !gameover && warmup_limit > 0 && time >= warmup_limit) {
+       if (warmup_stage && !game_stopped && warmup_limit > 0 && time >= warmup_limit) {
                ReadyRestart();
                return;
        }
index a91f791..b36a67b 100644 (file)
@@ -70,7 +70,7 @@ vector CL_Weapon_GetShotOrg(int wpn)
 void CL_Weaponentity_Think(entity this)
 {
        this.nextthink = time;
-       if (gameover) this.frame = this.anim_idle.x;
+       if (game_stopped) this.frame = this.anim_idle.x;
        .entity weaponentity = this.weaponentity_fld;
        if (this.owner.(weaponentity) != this)
        {
@@ -419,7 +419,7 @@ bool forbidWeaponUse(entity player)
 {
        if (time < game_starttime && !autocvar_sv_ready_restart_after_countdown) return true;
        if (player.player_blocked) return true;
-       if (gameover) return true;
+       if (game_stopped) return true;
        if (STAT(FROZEN, player)) return true;
        if (player.weapon_blocked) return true;
        if (MUTATOR_CALLHOOK(ForbidWeaponUse, player)) return true;