X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fsv_main.qc;h=538dcc62c624b173caa59b1ff53686a39dd50109;hp=cefba03749ef3569be327dba9186025528d9c728;hb=30e9db455abe691a3560555a989beb382b3b2531;hpb=26ec33d6d19e627b43ac2cb51f83f890b5176293 diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index cefba0374..538dcc62c 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 @@ -146,11 +153,12 @@ Called before each frame by the server float game_delay; float game_delay_last; -void RuneMatchGivePoints(); float RedirectionThink(); entity SelectSpawnPoint (float anypoint); void StartFrame (void) { + execute_next_frame(); + remove = remove_unsafely; // not during spawning! serverprevtime = servertime; servertime = time; @@ -167,9 +175,9 @@ void StartFrame (void) c_seen = 0; FOR_EACH_CLIENT(cl) { - if(clienttype(cl) == CLIENTTYPE_REAL) + if(IS_REAL_CLIENT(cl)) ++c_seeing; - if(cl.classname == "player") + if(IS_PLAYER(cl)) ++c_seen; } print("CEFC calls per second: ", ftos(c_seeing * (c_seen - 1) / t), "; "); @@ -196,21 +204,18 @@ 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; - Spawnqueue_Check(); - - // detect when the pre-game countdown (if any) has ended and the game has started game_delay = (time < game_starttime) ? TRUE : FALSE; if(game_delay_last == TRUE) if(game_delay == FALSE) if(autocvar_sv_eventlog) - GameLogEcho(":startdelay_ended"); + GameLogEcho(":startdelay_ended"); game_delay_last = game_delay; @@ -226,9 +231,6 @@ void StartFrame (void) CreatureFrame (); CheckRules_World (); - AuditTeams(); - - RuneMatchGivePoints(); bot_serverframe(); FOR_EACH_PLAYER(self)