X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fshambler.qc;h=eeefeae8ca51119bc5aa1775e525c2fba3d288cf;hb=8c094d930e9ef51767384452f80a3bccdc6fd38d;hp=a5863623ecac3217e4ff92d038fa5b3fdaffd669;hpb=2f215c603bf1b4dd44b9d166180f535c88602e9f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/monsters/monster/shambler.qc b/qcsrc/common/monsters/monster/shambler.qc index a5863623e..eeefeae8c 100644 --- a/qcsrc/common/monsters/monster/shambler.qc +++ b/qcsrc/common/monsters/monster/shambler.qc @@ -42,7 +42,7 @@ void M_Shambler_Attack_Smash(entity this) tracebox(this.origin + v_forward * 50, this.mins * 0.5, this.maxs * 0.5, this.origin + v_forward * autocvar_g_monster_shambler_attack_smash_range, MOVE_NORMAL, this); if(trace_ent.takedamage) - Damage(trace_ent, this, this, (autocvar_g_monster_shambler_attack_smash_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_SHAMBLER_SMASH.m_id, trace_ent.origin, normalize(trace_ent.origin - this.origin)); + Damage(trace_ent, this, this, (autocvar_g_monster_shambler_attack_smash_damage) * MONSTER_SKILLMOD(this), DEATH_MONSTER_SHAMBLER_SMASH.m_id, DMG_NOWEP, trace_ent.origin, normalize(trace_ent.origin - this.origin)); } void M_Shambler_Attack_Swing(entity this) @@ -50,7 +50,7 @@ void M_Shambler_Attack_Swing(entity this) Monster_Attack_Melee(this, this.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((random() >= 0.5) ? this.anim_melee2 : this.anim_melee3), this.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW.m_id, true); } -#include +#include void M_Shambler_Attack_Lightning_Explode(entity this, entity directhitentity) { @@ -66,12 +66,12 @@ void M_Shambler_Attack_Lightning_Explode(entity this, entity directhitentity) this.velocity = this.oldvelocity; RadiusDamage (this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_damage), (autocvar_g_monster_shambler_attack_lightning_radius), - NULL, NULL, (autocvar_g_monster_shambler_attack_lightning_force), this.projectiledeathtype, directhitentity); + NULL, NULL, (autocvar_g_monster_shambler_attack_lightning_force), this.projectiledeathtype, DMG_NOWEP, directhitentity); FOREACH_ENTITY_RADIUS(this.origin, autocvar_g_monster_shambler_attack_lightning_radius_zap, it != this.realowner && it.takedamage, { te_csqc_lightningarc(this.origin, it.origin); - Damage(it, this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage_zap) * MONSTER_SKILLMOD(this), DEATH_MONSTER_SHAMBLER_ZAP.m_id, it.origin, '0 0 0'); + Damage(it, this, this.realowner, (autocvar_g_monster_shambler_attack_lightning_damage_zap) * MONSTER_SKILLMOD(this), DEATH_MONSTER_SHAMBLER_ZAP.m_id, DMG_NOWEP, it.origin, '0 0 0'); }); setthink(this, SUB_Remove); @@ -83,7 +83,7 @@ void M_Shambler_Attack_Lightning_Explode_use(entity this, entity actor, entity t M_Shambler_Attack_Lightning_Explode(this, trigger); } -void M_Shambler_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) +void M_Shambler_Attack_Lightning_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) { if (this.health <= 0) return; @@ -116,11 +116,9 @@ void M_Shambler_Attack_Lightning_Think(entity this) void M_Shambler_Attack_Lightning(entity this) { - entity gren; - monster_makevectors(this, this.enemy); - gren = new(grenade); + entity gren = new(grenade); gren.owner = gren.realowner = this; gren.bot_dodge = true; gren.bot_dodgerating = (autocvar_g_monster_shambler_attack_lightning_damage); @@ -265,10 +263,4 @@ METHOD(Shambler, mr_setup, bool(Shambler this, entity actor)) return true; } - -METHOD(Shambler, mr_precache, bool(Shambler this)) -{ - TC(Shambler, this); - return true; -} #endif