]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove an unused monster spawn counter & slightly improve fish drowning
authorMario <mario.mario@y7mail.com>
Sat, 26 Jan 2013 09:19:18 +0000 (20:19 +1100)
committerMario <mario.mario@y7mail.com>
Sat, 26 Jan 2013 09:19:18 +0000 (20:19 +1100)
qcsrc/server/monsters/lib/monsters.qc
qcsrc/server/mutators/gamemode_td.qc
qcsrc/server/mutators/gamemode_td.qh

index bbb5119fa13d01b8cbe9078f9fd9fd37b69c5e5b..8e50160e723f6ea1c06a82aeb3022054d3614480 100644 (file)
@@ -369,7 +369,6 @@ vector monster_pickmovetarget(entity targ)
 }
 
 .float last_trace;
-.float breath_checks;
 void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_run, float manim_walk, float manim_idle)
 {
        if(self.target)
@@ -403,16 +402,8 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
        {
                if(self.waterlevel < WATERLEVEL_WETFEET)
                {
-                       self.breath_checks += 1;
                        self.angles = '0 0 -90';
-                       if(self.breath_checks == 25)
-                       {
-                               if not(self.flags & FL_ONGROUND)
-                                       self.flags |= FL_ONGROUND;
-                               self.monster_die();
-                               self.movetype = MOVETYPE_TOSS;
-                               return;
-                       }
+                       Damage (self, world, world, 10, DEATH_DROWN, self.origin, '0 0 0');
                        if(random() < 0.5)
                        {
                                self.velocity_y += random() * 50;
@@ -434,7 +425,6 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                {
                        self.angles = '0 0 0';
                        self.movetype = MOVETYPE_WALK;
-                       self.breath_checks = 0;
                }
        }
        
index 1c6cdd1a142dd6f6564700d15296be8b6e0e8ea1..6b5fa810a44e38e5c3ad5583021936414e612f98 100644 (file)
@@ -164,8 +164,6 @@ void spawnfunc_monster_swarm()
        }
        
        string t1 = self.target;
-
-       swarmcount += 1;
        
        switch(self.spawntype)
        {
@@ -1014,7 +1012,6 @@ MUTATOR_HOOKFUNCTION(td_PlayerCommand)
         sprint(self, strcat("^3Current wave: ^1", ftos(wave_count), "\n"));
                sprint(self, strcat("^3Maximum waves: ^1", ftos(max_waves), "\n"));
                sprint(self, strcat("^3Monster skill: ^1", ftos(monster_skill), "\n"));
-               sprint(self, strcat("^3Monster spawns: ^1", ftos(swarmcount), "\n"));
                sprint(self, strcat("^3Current monsters: ^1", ftos(monster_count), "\n"));
                sprint(self, strcat("^3Maximum monsters: ^1", ftos(totalmonsters), "\n"));
         sprint(self, strcat("^3Current ogres: ^1", ftos(n_ogres), "\n"));
index 84cec1a253b0509688e57cc7f58419d51c2fae1a..471eaae65e38ab447d08e4c335e11f7ca3c237b1 100644 (file)
@@ -4,7 +4,6 @@ float n_knights, n_dogs, n_ogres, n_shamblers, n_wizards, n_shalraths, n_soldier
 float current_monsters;
 float waterspawns_count, flyspawns_count;
 float wave_count, max_waves;
-float swarmcount;
 float max_turrets;
 .float monsterskilled;