1 const vector ANIMUS_MIN = '-41 -41 -31';
2 const vector ANIMUS_MAX = '41 41 31';
4 string ANIMUS_MODEL = "models/monsters/demon.mdl";
7 float autocvar_g_monster_animus;
8 float autocvar_g_monster_animus_health;
9 float autocvar_g_monster_animus_attack_jump_damage;
10 float autocvar_g_monster_animus_damage;
11 float autocvar_g_monster_animus_speed_walk;
12 float autocvar_g_monster_animus_speed_run;
14 const float animus_anim_stand = 0;
15 const float animus_anim_walk = 1;
16 const float animus_anim_run = 2;
17 const float animus_anim_leap = 3;
18 const float animus_anim_pain = 4;
19 const float animus_anim_death = 5;
20 const float animus_anim_attack = 6;
24 self.think = animus_think;
25 self.nextthink = time + self.ticrate;
27 monster_move(autocvar_g_monster_animus_speed_run, autocvar_g_monster_animus_speed_walk, 100, animus_anim_run, animus_anim_walk, animus_anim_stand);
30 void animus_touch_jump()
35 if (monster_isvalidtarget(other, self))
37 if (vlen(self.velocity) > 300)
39 Damage(other, self, self, autocvar_g_monster_animus_attack_jump_damage * monster_skill, DEATH_MONSTER_ANIMUS, other.origin, normalize(other.origin - self.origin));
40 self.touch = MonsterTouch; // instantly turn it off to stop damage spam
44 if(trace_dphitcontents)
45 self.touch = MonsterTouch;
48 float animus_attack(float attack_type)
52 case MONSTER_ATTACK_MELEE:
54 monsters_setframe(animus_anim_attack);
55 self.attack_finished_single = time + 1;
56 monster_melee(self.enemy, autocvar_g_monster_animus_damage, 0.3, DEATH_MONSTER_ANIMUS, TRUE);
60 case MONSTER_ATTACK_RANGED:
62 makevectors(self.angles);
63 if(monster_leap(animus_anim_leap, animus_touch_jump, v_forward * 700 + '0 0 300', 0.8))
73 Monster_CheckDropCvars ("animus");
75 self.think = monster_dead_think;
76 self.nextthink = time + self.ticrate;
77 self.ltime = time + 5;
78 monsters_setframe(animus_anim_death);
80 monster_hook_death(); // for post-death mods
86 self.health = autocvar_g_monster_animus_health;
88 self.damageforcescale = 0;
89 self.classname = "monster_animus";
90 self.monster_attackfunc = animus_attack;
91 self.nextthink = time + random() * 0.5 + 0.1;
92 self.think = animus_think;
94 monsters_setframe(animus_anim_stand);
96 monster_setupsounds("animus");
98 monster_hook_spawn(); // for post-spawn mods
101 void spawnfunc_monster_animus()
103 if not(autocvar_g_monster_animus) { remove(self); return; }
105 self.monster_spawnfunc = spawnfunc_monster_animus;
107 if(Monster_CheckAppearFlags(self))
112 if not (monster_initialize(
113 "Animus", MONSTER_ANIMUS,
114 ANIMUS_MIN, ANIMUS_MAX,
116 animus_die, animus_spawn))
123 // compatibility with old spawns
124 void spawnfunc_monster_demon1() { spawnfunc_monster_animus(); }
125 void spawnfunc_monster_demon() { spawnfunc_monster_animus(); }