]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Merge branch 'Mario/rifle_arena' into Mario/mutators
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index 63d91f6070ca3ecee2ecb56527f7a0c6710c9a98..e22cba6bbf773ac645c04ac2e793f994d9e081af 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
@@ -99,34 +106,6 @@ void CreatureFrame (void)
 
                        if(autocvar_g_maxspeed > 0 && velocity_len > autocvar_g_maxspeed)
                                Damage (self, world, world, 100000, DEATH_SHOOTING_STAR, self.origin, '0 0 0');
-                       // play stupid sounds
-                       if (g_footsteps)
-                       if (!gameover)
-                       if (self.flags & FL_ONGROUND)
-                       if (velocity_len > autocvar_sv_maxspeed * 0.6)
-                       if (!self.deadflag)
-                       if (time < self.lastground + 0.2)
-                       {
-                               if((time > self.nextstep) || (time < (self.nextstep - 10.0)))
-                               {
-                                       self.nextstep = time + 0.3 + random() * 0.1;
-                                       trace_dphitq3surfaceflags = 0;
-                                       tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self);
-                                       /*
-                                       if(trace_fraction == 1)
-                                               dprint("nohit\n");
-                                       else
-                                               dprint(ftos(trace_dphitq3surfaceflags), "\n");
-                                       */
-                                       if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
-                                       {
-                                               if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
-                                                       GlobalSound(globalsound_metalstep, CH_PLAYER, VOICETYPE_PLAYERSOUND);
-                                               else
-                                                       GlobalSound(globalsound_step, CH_PLAYER, VOICETYPE_PLAYERSOUND);
-                                       }
-                               }
-                       }
                }
                
         self.oldvelocity = self.velocity;
@@ -146,7 +125,6 @@ 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)
@@ -169,9 +147,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), "; ");
@@ -203,19 +181,13 @@ void StartFrame (void)
 
        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;
 
        if(game_delay_last == TRUE)
        if(game_delay == FALSE)
        if(autocvar_sv_eventlog)
-                       GameLogEcho(":startdelay_ended");
+               GameLogEcho(":startdelay_ended");
 
        game_delay_last = game_delay;
 
@@ -231,7 +203,6 @@ void StartFrame (void)
        CreatureFrame ();
        CheckRules_World ();
 
-       RuneMatchGivePoints();
        bot_serverframe();
 
        FOR_EACH_PLAYER(self)