From: Mario Date: Sun, 16 Jul 2017 13:03:29 +0000 (+1000) Subject: Remove CheckRules_Player (empty function, the only incremented field in it was unused... X-Git-Tag: xonotic-v0.8.5~2599 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a852d96854617e032256cea85b6feb816754d972;p=xonotic%2Fxonotic-data.pk3dir.git Remove CheckRules_Player (empty function, the only incremented field in it was unused outside the vehicle-only code) --- diff --git a/qcsrc/common/vehicles/sv_vehicles.qh b/qcsrc/common/vehicles/sv_vehicles.qh index 653532b43..22e2e4859 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qh +++ b/qcsrc/common/vehicles/sv_vehicles.qh @@ -67,6 +67,8 @@ const float VHSF_FACTORY = 2; .int hud = _STAT(HUD); .float dmg_time; +.float play_time; + .int volly_counter; const int MAX_AXH = 4; diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 9b105a28a..490b41157 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2110,8 +2110,6 @@ bool joinAllowed(entity this) .int items_added; bool PlayerThink(entity this) { - CheckRules_Player(this); - if (game_stopped || intermission_running) { this.modelflags &= ~MF_ROCKET; if(intermission_running) @@ -2733,7 +2731,6 @@ void PlayerPostThink (entity this) if (IS_PLAYER(this)) { DrownPlayer(this); - CheckRules_Player(this); UpdateChatBubble(this); if (CS(this).impulse) ImpulseCommands(this); if (game_stopped) diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 1c65847f4..827f3940f 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -53,7 +53,6 @@ float server_is_dedicated; .float count; //.float cnt2; -.float play_time; .int respawn_flags; .float respawn_time; .float respawn_time_max; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 2f732956c..e2532a9d5 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1596,25 +1596,6 @@ void NextLevel() localcmd("\nsv_hook_gameend\n"); } -/* -============ -CheckRules_Player - -Exit deathmatch games upon conditions -============ -*/ -void CheckRules_Player(entity this) -{ - if (game_stopped) // someone else quit the game already - return; - - if(!IS_DEAD(this)) - this.play_time += frametime; - - // fixme: don't check players; instead check spawnfunc_dom_team and spawnfunc_ctf_team entities - // (div0: and that in CheckRules_World please) -} - float InitiateSuddenDeath() { diff --git a/qcsrc/server/g_world.qh b/qcsrc/server/g_world.qh index e408974bb..4d5401abd 100644 --- a/qcsrc/server/g_world.qh +++ b/qcsrc/server/g_world.qh @@ -15,7 +15,6 @@ void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_o float WinningCondition_Scores(float limit, float leadlimit); void SetWinners(.float field, float value); -void CheckRules_Player(entity this); void IntermissionThink(entity this); void GotoNextMap(float reinit); void ReadyRestart();