2 const vector ANIMUS_MIN = '-41 -41 -31';
3 const vector ANIMUS_MAX = '41 41 31';
6 string ANIMUS_MODEL = "models/monsters/demon.mdl";
10 float autocvar_g_monster_animus;
11 float autocvar_g_monster_animus_health;
12 float autocvar_g_monster_animus_attack_jump_damage;
13 float autocvar_g_monster_animus_damage;
14 float autocvar_g_monster_animus_speed_walk;
15 float autocvar_g_monster_animus_speed_run;
18 const float animus_anim_stand = 0;
19 const float animus_anim_walk = 1;
20 const float animus_anim_run = 2;
21 const float animus_anim_leap = 3;
22 const float animus_anim_pain = 4;
23 const float animus_anim_death = 5;
24 const float animus_anim_attack = 6;
28 self.think = animus_think;
29 self.nextthink = time + self.ticrate;
31 monster_move(autocvar_g_monster_animus_speed_run, autocvar_g_monster_animus_speed_walk, 100, animus_anim_run, animus_anim_walk, animus_anim_stand);
34 void animus_touch_jump ()
39 if (monster_isvalidtarget(other, self))
41 if (vlen(self.velocity) > 300)
43 Damage(other, self, self, autocvar_g_monster_animus_attack_jump_damage * monster_skill, DEATH_MONSTER_ANIMUS, other.origin, normalize(other.origin - self.origin));
44 self.touch = MonsterTouch; // instantly turn it off to stop damage spam
48 if(trace_dphitcontents)
49 self.touch = MonsterTouch;
52 float animus_attack(float attack_type)
56 case MONSTER_ATTACK_MELEE:
58 monsters_setframe(animus_anim_attack);
59 self.attack_finished_single = time + 1;
60 monster_melee(self.enemy, autocvar_g_monster_animus_damage, 0.3, DEATH_MONSTER_ANIMUS, TRUE);
64 case MONSTER_ATTACK_RANGED:
66 makevectors(self.angles);
67 if(monster_leap(animus_anim_leap, animus_touch_jump, v_forward * 700 + '0 0 300', 0.8))
77 Monster_CheckDropCvars ("animus");
79 self.think = monster_dead_think;
80 self.nextthink = time + self.ticrate;
81 self.ltime = time + 5;
82 monsters_setframe(animus_anim_death);
84 monster_hook_death(); // for post-death mods
90 self.health = autocvar_g_monster_animus_health;
92 self.damageforcescale = 0;
93 self.classname = "monster_animus";
94 self.monster_attackfunc = animus_attack;
95 self.nextthink = time + random() * 0.5 + 0.1;
96 self.think = animus_think;
98 monsters_setframe(animus_anim_stand);
100 monster_setupsounds("animus");
102 monster_hook_spawn(); // for post-spawn mods
105 void spawnfunc_monster_animus ()
107 if not(autocvar_g_monster_animus) { remove(self); return; }
109 self.monster_spawnfunc = spawnfunc_monster_animus;
111 if(Monster_CheckAppearFlags(self))
116 if not (monster_initialize(
117 "Animus", MONSTER_ANIMUS,
118 ANIMUS_MIN, ANIMUS_MAX,
120 animus_die, animus_spawn))
127 // compatibility with old spawns
128 void spawnfunc_monster_demon1() { spawnfunc_monster_animus(); }
129 void spawnfunc_monster_demon() { spawnfunc_monster_animus(); }