1 #ifdef REGISTER_MONSTER
4 /* function */ m_animus,
5 /* spawnflags */ MONSTER_SIZE_BROKEN,
6 /* mins,maxs */ '-41 -41 -31', '41 41 31',
7 /* model */ "demon.mdl",
8 /* netname */ "animus",
9 /* fullname */ _("Animus")
14 float autocvar_g_monster_animus;
15 float autocvar_g_monster_animus_health;
16 float autocvar_g_monster_animus_attack_jump_damage;
17 float autocvar_g_monster_animus_damage;
18 float autocvar_g_monster_animus_speed_walk;
19 float autocvar_g_monster_animus_speed_run;
21 const float animus_anim_stand = 0;
22 const float animus_anim_walk = 1;
23 const float animus_anim_run = 2;
24 const float animus_anim_leap = 3;
25 const float animus_anim_pain = 4;
26 const float animus_anim_death = 5;
27 const float animus_anim_attack = 6;
29 void animus_touch_jump()
34 if (monster_isvalidtarget(other, self))
36 if (vlen(self.velocity) > 300)
38 Damage(other, self, self, autocvar_g_monster_animus_attack_jump_damage * monster_skill, DEATH_MONSTER_ANIMUS, other.origin, normalize(other.origin - self.origin));
39 self.touch = MonsterTouch; // instantly turn it off to stop damage spam
43 if(trace_dphitcontents)
44 self.touch = MonsterTouch;
47 float animus_attack(float attack_type)
51 case MONSTER_ATTACK_MELEE:
53 monsters_setframe(animus_anim_attack);
54 self.attack_finished_single = time + 1;
55 monster_melee(self.enemy, autocvar_g_monster_animus_damage, 0.3, DEATH_MONSTER_ANIMUS, TRUE);
59 case MONSTER_ATTACK_RANGED:
61 makevectors(self.angles);
62 if(monster_leap(animus_anim_leap, animus_touch_jump, v_forward * 700 + '0 0 300', 0.8))
70 void spawnfunc_monster_animus()
72 if not(autocvar_g_monster_animus) { remove(self); return; }
74 self.classname = "monster_animus";
76 self.monster_spawnfunc = spawnfunc_monster_animus;
78 if(Monster_CheckAppearFlags(self))
81 if not(monster_initialize(MON_ANIMUS, FALSE)) { remove(self); return; }
84 // compatibility with old spawns
85 void spawnfunc_monster_demon1() { spawnfunc_monster_animus(); }
86 void spawnfunc_monster_demon() { spawnfunc_monster_animus(); }
88 float m_animus(float req)
94 monster_move(autocvar_g_monster_animus_speed_run, autocvar_g_monster_animus_speed_walk, 100, animus_anim_run, animus_anim_walk, animus_anim_stand);
99 monsters_setframe(animus_anim_death);
104 if not(self.health) self.health = autocvar_g_monster_animus_health;
106 self.monster_attackfunc = animus_attack;
107 monsters_setframe(animus_anim_stand);
123 float m_animus(float req)
134 precache_model ("models/monsters/demon.mdl");
143 #endif // REGISTER_MONSTER