X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fsv_main.qc;h=c91c1ac1895ecae9d49667175258f3b91b9f9486;hb=54f4843b201d2b22942457df5b50ddc0c48ed8d2;hp=6e4b0ccb7a47e6a9e9ba20c9801af2996bff260d;hpb=b1165a00d02e8f7b902bf8a5462acbacfedcd18a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 6e4b0ccb7..c91c1ac18 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -43,7 +43,18 @@ void CreatureFrame (void) { self.dmgtime = time + autocvar_g_balance_contents_damagerate; - if (!projectile) + if (projectile) + { + if (self.watertype == CONTENT_LAVA) + { + Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_LAVA, self.origin, '0 0 0'); + } + else if (self.watertype == CONTENT_SLIME) + { + Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0'); + } + } + else { if (self.watertype == CONTENT_LAVA) { @@ -64,10 +75,6 @@ void CreatureFrame (void) Damage (self, world, world, autocvar_g_balance_contents_playerdamage_slime * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0'); } } - else if ((self.watertype == CONTENT_LAVA) || (self.watertype == CONTENT_SLIME)) - { - Damage (self, world, world, autocvar_g_balance_contents_projectiledamage * autocvar_g_balance_contents_damagerate * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0'); - } } } else @@ -151,6 +158,8 @@ float RedirectionThink(); entity SelectSpawnPoint (float anypoint); void StartFrame (void) { + execute_next_frame(); + remove = remove_unsafely; // not during spawning! serverprevtime = servertime; servertime = time; @@ -196,14 +205,17 @@ void StartFrame (void) if(sys_frametime <= 0) sys_frametime = 1.0 / 60.0; // somewhat safe fallback - if (timeoutStatus == 1) // just before the timeout (when timeoutStatus will be 2) + if (timeout_status == TIMEOUT_LEADTIME) // just before the timeout (when timeout_status will be TIMEOUT_ACTIVE) orig_slowmo = autocvar_slowmo; // slowmo will be restored after the timeout skill = autocvar_skill; + count_players(); + if(g_ca || g_freezetag) + count_alive_players(); + Arena_Warmup(); Spawnqueue_Check(); - // detect when the pre-game countdown (if any) has ended and the game has started game_delay = (time < game_starttime) ? TRUE : FALSE; @@ -226,22 +238,13 @@ void StartFrame (void) CreatureFrame (); CheckRules_World (); - AuditTeams(); - RuneMatchGivePoints(); bot_serverframe(); - if(autocvar_spawn_debugview) - { - RandomSelection_Init(); - for(self = world; (self = find(self, classname, "player")); ) - RandomSelection_Add(self, 0, string_null, 1, 0); - self = RandomSelection_chosen_ent; - SelectSpawnPoint(0); - } - FOR_EACH_PLAYER(self) self.porto_forbidden = max(0, self.porto_forbidden - 1); + + MUTATOR_CALLHOOK(SV_StartFrame); } .vector originjitter; @@ -252,8 +255,9 @@ void StartFrame (void) float DoesQ3ARemoveThisEntity(); void SV_OnEntityPreSpawnFunction() { - if(self.gametypefilter != "") - if not(isGametypeInFilter(game, teamplay, have_team_spawns, self.gametypefilter)) + if (self) + if (self.gametypefilter != "") + if not(isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter)) { remove(self); return;