]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Merge branch 'master' into Mario/classname_checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index cefba03749ef3569be327dba9186025528d9c728..538dcc62c624b173caa59b1ff53686a39dd50109 100644 (file)
@@ -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)