]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 62783112ed1fca3c7260d0aa8db3c295936014da..ba53c034105421d94c71050c04f2311220adf144 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 a9bd737ca0066caff3db25d142ae2b4afa4e9a9e..0a9d2e4ba5c3e53c54610564031d1a8c507aaf41 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 195a3bd982819c9329de86bed31de64328455504..5d67f9d62578c905b5a295e975df50ca996b4c14 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 c7d5190e0429a55b006ff086a47998835f28fc95..1f8f50790f2987c3adce69e1c609c58e36832585 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 afd1ba7163325e0d45c45ed4b540ce0ae6c7689f..7f2f084ee902ed54995d8cef30d40b1a43c536ca 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 36da631bb360cbb24f19a3d156eaffcf33a0eb4c..41f538b7a52f02e018c364ef1aec9b123e9a7383 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 88bb8c0d997b592c60c154684744ec51f089c484..af87885713e072943dfefdc2e7dd2eef66975c78 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 5bf0360fdb74c8c6d0dd72c4a20b1ebc361134cb..627321ea0224ae6cc37c2fb6e2aa29a20a8c708d 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 fb995a10a44543d730a57c02aff14993bedf2c4f..135e50793fa1eef7373f315d517e74f5d1d0b231 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 db030b94ce4224b772e1b9200c6951b284572a49..49ecb55da135e7494874179ca5baac63b3c418e0 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 f6f28a7dcb56d5cd5d1e8e6bc9e1a03fd329e9c0..db361850d0d3b45bff34af0fd985e7c4d0a288db 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 38ac30595dad46fd76695c959f11863898c94876..ddcd891609a493fd33e4b413112a3f449ed0a9e3 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 9b7d4a3502fd9d2e192026994402741ccb120fb4..3d21280e080c624e8e033c3a814cb575a7f66094 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 fe7155cc546ff60349f4ed22b164a5ca313ca73c..6dfb568a8b5bbddfbfc1d3c5f7e8f93e68de2a4b 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 1bbc18d9c21eb448546897752b1d59b2b398fa37..4e4bfd584b499f3de4d9011d16cc0e54de7a7208 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 a4f4beca614d0ee791f6ea1e91bdcd0d21006865..01edce67afe25a443793d7376ce4bf70387f29ce 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 4480ec658fc756466ffc202a520f93a95ef03984..7af872efd293fb8858b9d0050aecf035ab0dcfaa 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 2b349e11db949724ba2024f9ef302136a64128cf..19ac988c541e1a09057a57853cd1c64f44235a6b 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 ccc509c6bca9f7f2c5b76933ae6d408f487c78a1..1c651b16a9872705c7abc2b890298ec1119be6b0 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 4973a182973a0f002b77691a8f93ba8133da09da..aaef9f38330d0ba7609b250b4d31498262ea7ab6 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 fb6f1e046d9da192218b8d78da18474b87de4b67..160f8ec90b4772807ee12755442d675129ff5f33 100644 (file)
@@ -668,7 +668,7 @@ void bot_clear(entity this)
 
 void bot_serverframe()
 {
-       if (gameover)
+       if (game_stopped)
                return;
 
        if (time < 2)
index 47064506f3f55a937240dc308e7fe006632229c4..eaa55cef54cc8eb5b0bd56130935473f650f0f2d 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 ea9610b16073048fc10fd73ac97a09e1147c8065..4f0e54d69a035e4cde529e3fd5d5341388b158d7 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 f7d3be0f08aae69b84ef2c7557ebf4e97238ddae..f855b2f067f268e71563ad6f77ce97707c6540aa 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 d5ad30104d440d7c16395915591bdbe28a94e271..259857ccd4d8908ac760219154568660ce81fa92 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 a69b98487d2cbb7cb16833656178e4b369419faa..ef4cbc5a65409f2858f5a90561fa4c0a4910d240 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 b1246091bcb1a1ca3d1f21477b32817f71e4a1bb..f36b03b031e2c95b617cf3f0b1d9fe497e146348 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 ceca2ce91c64c6c2b2455b80f3c8a8e2c139c683..c84c0de9af68230359cad5c324147ae415984853 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 64c767e5f38d5ba65459c210fc7d76bec08075e9..6e2fdfc0f6d0e48fac4c99f03b39eecbfd727092 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 28e91f26a3668181c9a0b83b68c483d0fa5673fa..994a29719c810a16d0029c18328269f1609ff31c 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 6036fa529e6ffcf8906a5bd9104bd5f63b300dcc..2e8707b26cfc18d4b7ffa140dc99f36dad7a0fe4 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 21098a5e996f04ddf213b20bd2042d844226fd52..903ecf5958e5032997df888d0f28c1457755c53b 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 7f98ed289cd990a2041834270a58181ce0190b16..ee9bdfa873454eb3c82c48a9364bce7c3a0019c8 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 cec7d950e9076cdecfc573fdaeafe9be16f409e2..69f55a3c84a49efa44eae6b57bbbf952a3e50f55 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 b948c6d5e229e91601e89c49b6d62bc0cc6c2cfc..7677bdab5ce28224a74e682f00046cabe6c228b5 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 d3ec3358e9a62f8ffbe294d42e85b1ce10fac31b..32559afbc803e1d4f43ca742d2058c2a809ce230 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 25f6d3e0ab03ae441a08313a3606bf7869222b25..c3c24559e34bc76e112a3c001383df57f7e54407 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 abe6b846e73fb714e4f132bef49ff7df0d89cd4d..3e93c1ed0dea7d8bcbab23938eb69f6020f7332a 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 0fcf89fc7bf9735e1a200c020ed407eb3e4519c0..6a20304f049ea96f4e80752d95bbfc8af33dfcb4 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 063c12abb0aa8f67dd25c600ab70512251194589..6a18a6b5b434952d5b63e8a9556b0777040a71fd 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 e6264b8693b4b360b7e8ad7c4a3b8f6c61a67e6c..b46663043343d7a9e781c75477ecae6b94d4f7cd 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 b510b43c8076b0b81c606e44ca3e6f00b076eb95..1448218796b17c7c6b3bef14bcd88f27ec04387e 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 a91f7916a52469ed1c6c2e5d04ca5ad12dd36506..b36a67bfe699bdd81a4e5904670596bf3b21d66c 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;