From: Mario Date: Fri, 14 Jun 2013 08:36:53 +0000 (+1000) Subject: Fix spider not freezing its prey X-Git-Tag: xonotic-v0.8.0~241^2^2~187 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3ec9f804f5c2988b7fbef33df7232fdefde08c5f;p=xonotic%2Fxonotic-data.pk3dir.git Fix spider not freezing its prey --- diff --git a/qcsrc/server/monsters/lib/monsters.qc b/qcsrc/server/monsters/lib/monsters.qc index 1a47dc4dc..7cc0c0f95 100644 --- a/qcsrc/server/monsters/lib/monsters.qc +++ b/qcsrc/server/monsters/lib/monsters.qc @@ -599,13 +599,16 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_ //v_forward = normalize(self.moveto - self.origin); - self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95); + //self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95); float turny = 0; vector real_angle = vectoangles(self.steerto) - self.angles; if(self.state != MONSTER_STATE_ATTACK_LEAP && self.state != MONSTER_STATE_ATTACK_MELEE) turny = 20; + + if(g_td) + turny = vlen(self.angles - self.moveto); if(turny) { diff --git a/qcsrc/server/monsters/monster/spider.qc b/qcsrc/server/monsters/monster/spider.qc index 244118855..4b6eda73f 100644 --- a/qcsrc/server/monsters/monster/spider.qc +++ b/qcsrc/server/monsters/monster/spider.qc @@ -41,6 +41,7 @@ void spider_web_explode() switch(self.realowner.spider_type) { case SPIDER_TYPE_ICE: + rad = 25; pointparticles(particleeffectnum("electro_impact"), self.origin, '0 0 0', 1); break; case SPIDER_TYPE_FIRE: @@ -53,13 +54,12 @@ void spider_web_explode() RadiusDamage(self, self.realowner, damg, edamg, 0, world, rad, DEATH_MONSTER_SPIDER_FIRE, world); // ice deals no damage anyway - if(self.realowner.spider_type == SPIDER_TYPE_FIRE) for(e = findradius(self.origin, rad); e; e = e.chain) if(e.takedamage && e.deadflag == DEAD_NO) { switch(self.realowner.spider_type) { case SPIDER_TYPE_ICE: - Freeze(other, 0.3, 2, FALSE); + Freeze(e, 0.3, 2, FALSE); break; case SPIDER_TYPE_FIRE: Fire_AddDamage(e, self.realowner, 5 * monster_skill, autocvar_g_monster_spider_attack_fire_time, DEATH_MONSTER_SPIDER_FIRE, FALSE); diff --git a/qcsrc/server/mutators/gamemode_towerdefense.qc b/qcsrc/server/mutators/gamemode_towerdefense.qc index a0a210ed8..9ee912eb2 100644 --- a/qcsrc/server/mutators/gamemode_towerdefense.qc +++ b/qcsrc/server/mutators/gamemode_towerdefense.qc @@ -734,7 +734,7 @@ MUTATOR_HOOKFUNCTION(td_PlayerSpawn) MUTATOR_HOOKFUNCTION(td_Damage) { if(IS_PLAYER(frag_attacker)) - if(frag_target.flags & FL_MONSTER) + if(frag_target.flags & FL_MONSTER || frag_target.turrcaps_flags & TFL_TURRCAPS_ISTURRET) frag_damage = 0; if(IS_PLAYER(frag_attacker) || frag_attacker.turrcaps_flags & TFL_TURRCAPS_ISTURRET)