3 const vector OGRE_MIN = '-36 -36 -20';
4 const vector OGRE_MAX = '36 36 50';
7 string OGRE_MODEL = "models/monsters/ogre.dpm";
13 float autocvar_g_monster_ogre;
14 float autocvar_g_monster_ogre_health;
15 float autocvar_g_monster_ogre_chainsaw_damage;
16 float autocvar_g_monster_ogre_speed_walk;
17 float autocvar_g_monster_ogre_speed_run;
18 float autocvar_g_monster_ogre_attack_uzi_bullets;
21 const float ogre_anim_idle = 0;
22 const float ogre_anim_walk = 1;
23 const float ogre_anim_run = 2;
24 const float ogre_anim_pain = 3;
25 const float ogre_anim_swing = 4;
26 const float ogre_anim_die = 5;
28 void chainsaw (float side)
33 if (vlen(self.enemy.origin - self.origin) > 100 * self.scale)
36 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));
41 self.think = ogre_think;
42 self.nextthink = time + self.ticrate;
45 self.nextthink = self.delay;
47 monster_move(autocvar_g_monster_ogre_speed_run, autocvar_g_monster_ogre_speed_walk, 300, ogre_anim_run, ogre_anim_walk, ogre_anim_idle);
53 self.ogre_cycles += 1;
54 monsters_setframe(ogre_anim_swing);
55 if(self.ogre_cycles == 1)
56 self.attack_finished_single = time + 1.3;
57 self.angles_y = self.angles_y + random()* 25;
58 self.nextthink = time + 0.2;
59 self.think = ogre_swing;
61 if(self.ogre_cycles <= 2)
63 else if(self.ogre_cycles <= 4)
68 if(self.ogre_cycles >= 4)
69 self.think = ogre_think;
74 self.ogre_cycles += 1;
76 if(self.ogre_cycles > autocvar_g_monster_ogre_attack_uzi_bullets)
78 self.monster_delayedattack = func_null;
82 W_UZI_Attack(DEATH_MONSTER_OGRE_UZI);
83 self.delay = time + 0.1;
84 self.monster_delayedattack = ogre_uzi_fire;
89 monsters_setframe(ogre_anim_pain);
90 self.attack_finished_single = time + 0.8;
91 self.delay = time + 0.1;
92 self.monster_delayedattack = ogre_uzi_fire;
98 monsters_setframe(ogre_anim_pain);
99 self.attack_finished_single = time + 0.8;
102 float ogre_missile ()
104 self.ogre_cycles = 0;
119 self.ogre_cycles = 0;
125 Monster_CheckDropCvars ("ogre");
127 self.think = Monster_Fade;
128 self.nextthink = time + 5;
129 monsters_setframe(ogre_anim_die);
131 monster_hook_death(); // for post-death mods
137 self.health = autocvar_g_monster_ogre_health * self.scale;
139 self.damageforcescale = 0.003;
140 self.classname = "monster_ogre";
141 self.checkattack = GenericCheckAttack;
142 self.attack_melee = ogre_melee;
143 self.attack_ranged = ogre_missile;
144 self.nextthink = time + 0.1;
145 self.think = ogre_think;
146 self.sprite_height = 65;
147 self.weapon = WEP_GRENADE_LAUNCHER;
149 monsters_setframe(ogre_anim_idle);
151 monster_hook_spawn(); // for post-spawn mods
154 void spawnfunc_monster_ogre ()
156 if not(autocvar_g_monster_ogre) { remove(self); return; }
158 self.monster_spawnfunc = spawnfunc_monster_ogre;
160 if(Monster_CheckAppearFlags(self))
163 if not (monster_initialize(
164 "Ogre", MONSTER_OGRE,
168 ogre_die, ogre_spawn))
174 weapon_action(WEP_GRENADE_LAUNCHER, WR_PRECACHE);