X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fsv_main.qc;h=5c80117b9718d4cca51fda73640e22ed293642a1;hb=b76a556f30fc244576c98a30b305477e36db2db8;hp=d2b2d594fedf53a46444cfdcf1390916ae8ab347;hpb=3acc9643a56187fff82c19ab2c5921c03552832d;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index d2b2d594f..5c80117b9 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -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) { @@ -43,7 +44,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 +76,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,8 +154,6 @@ Called before each frame by the server float game_delay; float game_delay_last; -void Arena_Main(); -void RuneMatchGivePoints(); float RedirectionThink(); entity SelectSpawnPoint (float anypoint); void StartFrame (void) @@ -170,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), "; "); @@ -223,12 +229,9 @@ void StartFrame (void) return; } - Arena_Main(); - CreatureFrame (); CheckRules_World (); - RuneMatchGivePoints(); bot_serverframe(); FOR_EACH_PLAYER(self)