]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Include model source for barricade
authorMario <mario.mario@y7mail.com>
Sun, 21 Apr 2013 11:47:24 +0000 (21:47 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 21 Apr 2013 11:47:24 +0000 (21:47 +1000)
models/td/barricade.blend [new file with mode: 0644]
qcsrc/server/generator.qc
qcsrc/server/mutators/gamemode_towerdefense.qc

diff --git a/models/td/barricade.blend b/models/td/barricade.blend
new file mode 100644 (file)
index 0000000..8e36ab4
Binary files /dev/null and b/models/td/barricade.blend differ
index 5a8e923daf6a97e55165482667a732b86d14b3b3..891b82039063b0485a658237701088acd2698cd9 100644 (file)
@@ -47,7 +47,7 @@ void generator_damage(float hp)
                setmodel(self, "models/onslaught/generator_dmg2.md3");
        else if(hp < self.max_health * 0.90)
                setmodel(self, "models/onslaught/generator_dmg1.md3");
-       else if(hp <= self.max_health)
+       else if(hp <= self.max_health || hp >= self.max_health)
                setmodel(self, "models/onslaught/generator.md3");
                
        setsize(self, GENERATOR_MIN, GENERATOR_MAX);
index 3e7223e30cd16dbdd5df544c91be4ee1a47660f8..f9a1d0cfaf0833351fe52a74b89486e5721eb0ee 100644 (file)
@@ -101,12 +101,10 @@ void td_generator_setup()
        self.takedamage     = DAMAGE_AIM;
        self.event_damage   = td_generator_damage;
        self.enemy                  = world;
-       self.max_health     = self.health;
        self.movetype       = MOVETYPE_NONE;
        self.monster_attack = TRUE;
        self.netname            = "Generator";
-       
-       self.SendFlags |= GSF_SETUP;
+       self.SendFlags          = GSF_SETUP;
        
        WaypointSprite_SpawnFixed(self.netname, self.origin + '0 0 90', self, sprite, RADARICON_OBJECTIVE, '1 0.5 0');  
        WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
@@ -126,6 +124,8 @@ void spawnfunc_td_generator()
        
        if not(self.health)
                self.health = autocvar_g_td_generator_health;
+               
+       self.max_health = self.health;
        
        self.classname = "td_generator";
        self.flags = FL_GENERATOR;
@@ -554,6 +554,7 @@ void build_phase()
                if(head.health < head.max_health)
                {
                        gen_washealed = TRUE;
+                       pointparticles(particleeffectnum("healing_fx"), head.origin, '0 0 0', 1);
                        head.health = head.max_health;
                        WaypointSprite_UpdateHealth(head.sprite, head.health);
                        head.SendFlags |= GSF_STATUS;