2 const vector OGRE_MIN = '-32 -32 -24';
3 const vector OGRE_MAX = '32 32 32';
6 float autocvar_g_monster_ogre;
7 float autocvar_g_monster_ogre_health;
8 float autocvar_g_monster_ogre_chainsaw_damage;
9 float autocvar_g_monster_ogre_speed_walk;
10 float autocvar_g_monster_ogre_speed_run;
11 float autocvar_g_monster_ogre_attack_uzi_bullets;
14 #define ogre_anim_stand 0
15 #define ogre_anim_walk 1
16 #define ogre_anim_run 2
17 #define ogre_anim_swing 3
18 #define ogre_anim_smash 4
19 #define ogre_anim_shoot 5
20 #define ogre_anim_pain1 6
21 #define ogre_anim_pain2 7
22 #define ogre_anim_pain3 8
23 #define ogre_anim_pain4 9
24 #define ogre_anim_pain5 10
25 #define ogre_anim_death1 11
26 #define ogre_anim_death2 12
27 #define ogre_anim_pull 13
29 void chainsaw (float side)
34 if (vlen(self.enemy.origin - self.origin) > 100 * self.scale)
37 Damage(self.enemy, self, self, autocvar_g_monster_ogre_chainsaw_damage * monster_skill, DEATH_MONSTER_OGRE_CHAINSAW, self.enemy.origin, normalize(self.enemy.origin - self.origin));
42 self.think = ogre_think;
43 self.nextthink = time + 0.1;
46 self.nextthink = self.delay;
48 monster_move(autocvar_g_monster_ogre_speed_run, autocvar_g_monster_ogre_speed_walk, 300, ogre_anim_run, ogre_anim_walk, ogre_anim_stand);
54 self.ogre_cycles += 1;
55 self.frame = ogre_anim_swing;
56 if(self.ogre_cycles == 1)
57 self.attack_finished_single = time + 1.3;
58 self.angles_y = self.angles_y + random()* 25;
59 self.nextthink = time + 0.2;
60 self.think = ogre_swing;
62 if(self.ogre_cycles <= 2)
64 else if(self.ogre_cycles <= 4)
69 if(self.ogre_cycles >= 4)
70 self.think = ogre_think;
75 self.ogre_cycles += 1;
77 if(self.ogre_cycles > autocvar_g_monster_ogre_attack_uzi_bullets)
79 self.monster_delayedattack = func_null;
83 W_UZI_Attack(DEATH_MONSTER_OGRE_UZI);
84 self.delay = time + 0.1;
85 self.monster_delayedattack = ogre_uzi_fire;
90 self.frame = ogre_anim_shoot;
91 self.attack_finished_single = time + 0.8;
92 self.delay = time + 0.1;
93 self.monster_delayedattack = ogre_uzi_fire;
99 self.frame = ogre_anim_shoot;
100 self.attack_finished_single = time + 0.8;
103 float ogre_missile ()
105 self.ogre_cycles = 0;
120 self.ogre_cycles = 0;
126 Monster_CheckDropCvars ("ogre");
128 self.solid = SOLID_NOT;
129 self.takedamage = DAMAGE_NO;
130 self.event_damage = func_null;
132 self.nextthink = time + 2.1;
133 self.movetype = MOVETYPE_TOSS;
134 self.think = Monster_Fade;
137 self.frame = ogre_anim_death1;
139 self.frame = ogre_anim_death2;
141 monster_hook_death(); // for post-death mods
147 self.health = autocvar_g_monster_ogre_health * self.scale;
149 self.damageforcescale = 0.003;
150 self.classname = "monster_ogre";
151 self.checkattack = GenericCheckAttack;
152 self.attack_melee = ogre_melee;
153 self.frame = ogre_anim_pull;
154 self.attack_ranged = ogre_missile;
155 self.nextthink = time + 1;
156 self.think = ogre_think;
157 self.sprite_height = 40 * self.scale;
158 self.weapon = WEP_GRENADE_LAUNCHER;
160 monster_hook_spawn(); // for post-spawn mods
163 void spawnfunc_monster_ogre ()
165 if not(autocvar_g_monster_ogre) { remove(self); return; }
167 self.monster_spawnfunc = spawnfunc_monster_ogre;
169 if(self.spawnflags & MONSTERFLAG_APPEAR)
171 self.think = func_null;
173 self.use = Monster_Appear;
179 if not (monster_initialize(
181 "models/monsters/ogre.mdl",
184 ogre_die, ogre_spawn))
190 weapon_action(WEP_GRENADE_LAUNCHER, WR_PRECACHE);