]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index 8d81e03806267b9c5b565aa495ade4744cffa619..93f32dcdd7224224c752a0a11081b17d34559059 100644 (file)
@@ -10,6 +10,7 @@ void CreatureFrame (void)
                
                float vehic = (self.vehicle_flags & VHF_ISVEHICLE);
                float projectile = (self.flags & FL_PROJECTILE);
+               float monster = (self.flags & FL_MONSTER);
                
                if (self.watertype <= CONTENT_WATER && self.waterlevel > 0) // workaround a retarded bug made by id software :P (yes, it's that old of a bug)
                {
@@ -19,7 +20,7 @@ void CreatureFrame (void)
                                self.dmgtime = 0;
                        }
 
-                       if(!vehic && !projectile) // vehicles and projectiles don't drown
+                       if(!vehic && !projectile && !monster) // vehicles, monsters and projectiles don't drown
                        {
                                if (self.waterlevel != WATERLEVEL_SUBMERGED)
                                {
@@ -93,7 +94,7 @@ void CreatureFrame (void)
                {
                        // check for falling damage
                        float velocity_len = vlen(self.velocity);
-                       if(!self.hook.state && !g_ca && !(g_cts && !autocvar_g_cts_selfdamage))
+                       if(!self.hook.state && !(g_cts && !autocvar_g_cts_selfdamage))
                        {
                                dm = vlen(self.oldvelocity) - velocity_len; // dm is now the velocity DECREASE. Velocity INCREASE should never cause a sound or any damage.
                                if (self.deadflag)
@@ -175,9 +176,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), "; ");