lavaman.qc 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. /* Copyright (C) 1996-2022 id Software LLC
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; either version 2 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program; if not, write to the Free Software
  12. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  13. See file, 'COPYING', for details.
  14. */
  15. /*
  16. ==============================================================================
  17. LavaMan (Smaller version of Boss E1M7)
  18. ==============================================================================
  19. */
  20. $frame rise1 rise2 rise3 rise4 rise5 rise6 rise7 rise8 rise9 rise10
  21. $frame rise11 rise12 rise13 rise14 rise15 rise16 rise17
  22. $frame walk1 walk2 walk3 walk4 walk5 walk6 walk7 walk8
  23. $frame walk9 walk10 walk11 walk12 walk13 walk14 walk15
  24. $frame walk16 walk17 walk18 walk19 walk20 walk21 walk22
  25. $frame walk23 walk24 walk25 walk26 walk27 walk28 walk29 walk30 walk31
  26. $frame death1 death2 death3 death4 death5 death6 death7 death8 death9
  27. $frame attack1 attack2 attack3 attack4 attack5 attack6 attack7 attack8
  28. $frame attack9 attack10 attack11 attack12 attack13 attack14 attack15
  29. $frame attack16 attack17 attack18 attack19 attack20 attack21 attack22
  30. $frame attack23
  31. $frame shocka1 shocka2 shocka3 shocka4 shocka5 shocka6 shocka7 shocka8
  32. $frame shocka9 shocka10
  33. //$frame shockb1 shockb2 shockb3 shockb4 shockb5 shockb6
  34. //$frame shockc1 shockc2 shockc3 shockc4 shockc5 shockc6 shockc7 shockc8
  35. //$frame shockc9 shockc10
  36. void(float AttackNumber) lavaman_missile;
  37. /*
  38. ===========
  39. LavaManCheckAttack
  40. The player is in view, so decide to move or launch an attack
  41. Returns FALSE if movement should continue
  42. ============
  43. */
  44. float() LavaManCheckAttack =
  45. {
  46. local vector spot1, spot2;
  47. local entity targ;
  48. ai_face();
  49. targ = self.enemy;
  50. // see if any entities are in the way of the shot
  51. spot1 = self.origin + '0 0 64';
  52. traceline (spot1, targ.origin, FALSE, self);
  53. if (trace_inopen && trace_inwater)
  54. return FALSE; // sight line crossed contents
  55. if (trace_ent != targ)
  56. return FALSE; // don't have a clear shot
  57. // missile attack
  58. if (time < self.attack_finished)
  59. return FALSE;
  60. self.th_missile ();
  61. SUB_AttackFinished (1 + random());
  62. return TRUE;
  63. };
  64. // ============
  65. // ============
  66. void() lavaman_hunt =
  67. {
  68. local entity possibleEnemy;
  69. local vector viewPoint;
  70. // go for another player if multi player
  71. if (self.enemy.health <= 0)
  72. {
  73. viewPoint = self.origin + '0 0 96';
  74. possibleEnemy = find(self.enemy, classname, "player");
  75. traceline ( viewPoint, possibleEnemy.origin, TRUE, world );
  76. if (trace_fraction == 1)
  77. self.enemy = possibleEnemy;
  78. }
  79. if (self.enemy)
  80. {
  81. ai_face();
  82. self.movetarget = self.enemy;
  83. self.goalentity = self.enemy;
  84. }
  85. };
  86. /*
  87. void(float dist) lavaman_walk =
  88. {
  89. lavaman_hunt();
  90. ai_walk(dist);
  91. };
  92. */
  93. void() lavaman_rise1 =[ $rise1, lavaman_rise2 ]
  94. { sound (self, CHAN_WEAPON, "boss1/out1.wav", 1, ATTN_NORM);
  95. };
  96. void() lavaman_rise2 =[ $rise2, lavaman_rise3 ]
  97. {
  98. sound (self, CHAN_VOICE, "boss1/sight1.wav", 1, ATTN_NORM); };
  99. void() lavaman_rise3 =[ $rise3, lavaman_rise4 ] {};
  100. void() lavaman_rise4 =[ $rise4, lavaman_rise5 ] {};
  101. void() lavaman_rise5 =[ $rise5, lavaman_rise6 ] {};
  102. void() lavaman_rise6 =[ $rise6, lavaman_rise7 ] {};
  103. void() lavaman_rise7 =[ $rise7, lavaman_rise8 ] {};
  104. void() lavaman_rise8 =[ $rise8, lavaman_rise9 ] {};
  105. void() lavaman_rise9 =[ $rise9, lavaman_rise10 ] {};
  106. void() lavaman_rise10 =[ $rise10, lavaman_rise11 ] {};
  107. void() lavaman_rise11 =[ $rise11, lavaman_rise12 ] {};
  108. void() lavaman_rise12 =[ $rise12, lavaman_rise13 ] {};
  109. void() lavaman_rise13 =[ $rise13, lavaman_rise14 ] {};
  110. void() lavaman_rise14 =[ $rise14, lavaman_rise15 ] {};
  111. void() lavaman_rise15 =[ $rise15, lavaman_rise16 ] {};
  112. void() lavaman_rise16 =[ $rise16, lavaman_rise17 ] {};
  113. void() lavaman_rise17 =[ $rise17, lavaman_fire1 ] {};
  114. // ============
  115. // ============
  116. void() lavaman_stand =
  117. {
  118. if (self.enemy)
  119. LavaManCheckAttack();
  120. else
  121. lavaman_hunt();
  122. ai_stand ();
  123. };
  124. void() lavaman_idle1 =[ $walk1, lavaman_idle2 ]
  125. {
  126. if ( random() < 0.2 )
  127. sound (self, CHAN_VOICE, "boss1/sight1.wav", 1, ATTN_NORM);
  128. // look for other players
  129. };
  130. void() lavaman_idle2 =[ $walk2, lavaman_idle3 ] {lavaman_stand();};
  131. void() lavaman_idle3 =[ $walk3, lavaman_idle4 ] {lavaman_stand();};
  132. void() lavaman_idle4 =[ $walk4, lavaman_idle5 ] {lavaman_stand();};
  133. void() lavaman_idle5 =[ $walk5, lavaman_idle6 ] {lavaman_stand();};
  134. void() lavaman_idle6 =[ $walk4, lavaman_idle7 ] {lavaman_stand();};
  135. void() lavaman_idle7 =[ $walk3, lavaman_idle8 ] {lavaman_stand();};
  136. void() lavaman_idle8 =[ $walk2, lavaman_idle9 ] {lavaman_stand();};
  137. void() lavaman_idle9 =[ $walk1, lavaman_idle1 ] {lavaman_stand();};
  138. // ============
  139. // ============
  140. void() lavaman_walk =
  141. {
  142. if (self.enemy)
  143. LavaManCheckAttack();
  144. else
  145. lavaman_hunt();
  146. ai_walk (2);
  147. };
  148. void() lavaman_walk1 =[ $walk1, lavaman_walk2 ] {lavaman_walk();};
  149. void() lavaman_walk2 =[ $walk2, lavaman_walk3 ] {lavaman_walk();};
  150. void() lavaman_walk3 =[ $walk3, lavaman_walk4 ] {lavaman_walk();};
  151. void() lavaman_walk4 =[ $walk4, lavaman_walk5 ] {lavaman_walk();};
  152. void() lavaman_walk5 =[ $walk5, lavaman_walk6 ] {lavaman_walk();};
  153. void() lavaman_walk6 =[ $walk6, lavaman_walk7 ] {lavaman_walk();};
  154. void() lavaman_walk7 =[ $walk7, lavaman_walk8 ] {lavaman_walk();};
  155. void() lavaman_walk8 =[ $walk8, lavaman_walk9 ] {lavaman_walk();};
  156. void() lavaman_walk9 =[ $walk9, lavaman_walk10 ] {lavaman_walk();};
  157. void() lavaman_walk10 =[ $walk10, lavaman_walk11 ] {lavaman_walk();};
  158. void() lavaman_walk11 =[ $walk11, lavaman_walk12 ] {lavaman_walk();};
  159. void() lavaman_walk12 =[ $walk12, lavaman_walk13 ] {lavaman_walk();};
  160. void() lavaman_walk13 =[ $walk13, lavaman_walk14 ] {lavaman_walk();};
  161. void() lavaman_walk14 =[ $walk14, lavaman_walk15 ] {lavaman_walk();};
  162. void() lavaman_walk15 =[ $walk15, lavaman_walk16 ] {lavaman_walk();};
  163. void() lavaman_walk16 =[ $walk16, lavaman_walk17 ] {lavaman_walk();};
  164. void() lavaman_walk17 =[ $walk17, lavaman_walk18 ] {lavaman_walk();};
  165. void() lavaman_walk18 =[ $walk18, lavaman_walk19 ] {lavaman_walk();};
  166. void() lavaman_walk19 =[ $walk19, lavaman_walk20 ] {lavaman_walk();};
  167. void() lavaman_walk20 =[ $walk20, lavaman_walk21 ] {lavaman_walk();};
  168. void() lavaman_walk21 =[ $walk21, lavaman_walk22 ] {lavaman_walk();};
  169. void() lavaman_walk22 =[ $walk22, lavaman_walk23 ] {lavaman_walk();};
  170. void() lavaman_walk23 =[ $walk23, lavaman_walk24 ] {lavaman_walk();};
  171. void() lavaman_walk24 =[ $walk24, lavaman_walk25 ] {lavaman_walk();};
  172. void() lavaman_walk25 =[ $walk25, lavaman_walk26 ] {lavaman_walk();};
  173. void() lavaman_walk26 =[ $walk26, lavaman_walk27 ] {lavaman_walk();};
  174. void() lavaman_walk27 =[ $walk27, lavaman_walk28 ] {lavaman_walk();};
  175. void() lavaman_walk28 =[ $walk28, lavaman_walk29 ] {lavaman_walk();};
  176. void() lavaman_walk29 =[ $walk29, lavaman_walk30 ] {lavaman_walk();};
  177. void() lavaman_walk30 =[ $walk30, lavaman_walk31 ] {lavaman_walk();};
  178. void() lavaman_walk31 =[ $walk31, lavaman_walk1 ] {};
  179. void() lavaman_run =
  180. {
  181. if (self.enemy)
  182. LavaManCheckAttack();
  183. else
  184. lavaman_hunt();
  185. ai_run (2);
  186. };
  187. void() lavaman_run1 =[ $walk1, lavaman_run2 ] {lavaman_run();};
  188. void() lavaman_run2 =[ $walk2, lavaman_run3 ] {lavaman_run();};
  189. void() lavaman_run3 =[ $walk3, lavaman_run4 ] {lavaman_run();};
  190. void() lavaman_run4 =[ $walk4, lavaman_run5 ] {lavaman_run();};
  191. void() lavaman_run5 =[ $walk5, lavaman_run6 ] {lavaman_run();};
  192. void() lavaman_run6 =[ $walk6, lavaman_run7 ] {lavaman_run();};
  193. void() lavaman_run7 =[ $walk7, lavaman_run8 ] {lavaman_run();};
  194. void() lavaman_run8 =[ $walk8, lavaman_run9 ] {lavaman_run();};
  195. void() lavaman_run9 =[ $walk9, lavaman_run10 ] {lavaman_run();};
  196. void() lavaman_run10 =[ $walk10, lavaman_run11 ] {lavaman_run ();};
  197. void() lavaman_run11 =[ $walk11, lavaman_run12 ] {lavaman_run ();};
  198. void() lavaman_run12 =[ $walk12, lavaman_run13 ] {lavaman_run ();};
  199. void() lavaman_run13 =[ $walk13, lavaman_run14 ] {lavaman_run ();};
  200. void() lavaman_run14 =[ $walk14, lavaman_run15 ] {lavaman_run ();};
  201. void() lavaman_run15 =[ $walk15, lavaman_run16 ] {lavaman_run ();};
  202. void() lavaman_run16 =[ $walk16, lavaman_run17 ] {lavaman_run ();};
  203. void() lavaman_run17 =[ $walk17, lavaman_run18 ] {lavaman_run ();};
  204. void() lavaman_run18 =[ $walk18, lavaman_run19 ] {lavaman_run ();};
  205. void() lavaman_run19 =[ $walk19, lavaman_run20 ] {lavaman_run ();};
  206. void() lavaman_run20 =[ $walk20, lavaman_run21 ] {lavaman_run ();};
  207. void() lavaman_run21 =[ $walk21, lavaman_run22 ] {lavaman_run ();};
  208. void() lavaman_run22 =[ $walk22, lavaman_run23 ] {lavaman_run ();};
  209. void() lavaman_run23 =[ $walk23, lavaman_run24 ] {lavaman_run ();};
  210. void() lavaman_run24 =[ $walk24, lavaman_run25 ] {lavaman_run ();};
  211. void() lavaman_run25 =[ $walk25, lavaman_run26 ] {lavaman_run ();};
  212. void() lavaman_run26 =[ $walk26, lavaman_run27 ] {lavaman_run ();};
  213. void() lavaman_run27 =[ $walk27, lavaman_run28 ] {lavaman_run ();};
  214. void() lavaman_run28 =[ $walk28, lavaman_run29 ] {lavaman_run ();};
  215. void() lavaman_run29 =[ $walk29, lavaman_run30 ] {lavaman_run ();};
  216. void() lavaman_run30 =[ $walk30, lavaman_run31 ] {lavaman_run ();};
  217. void() lavaman_run31 =[ $walk31, lavaman_run1 ] {};
  218. void() lavaman_fire1 =[ $attack1, lavaman_fire2 ] { ai_face();};
  219. void() lavaman_fire2 =[ $attack2, lavaman_fire3 ] {ai_charge(1);};
  220. void() lavaman_fire3 =[ $attack3, lavaman_fire4 ] { ai_face();};
  221. void() lavaman_fire4 =[ $attack4, lavaman_fire5 ] {ai_face();};
  222. void() lavaman_fire5 =[ $attack5, lavaman_fire6 ] {ai_charge(1);};
  223. void() lavaman_fire6 =[ $attack6, lavaman_fire7 ] {ai_face();};
  224. void() lavaman_fire7 =[ $attack7, lavaman_fire8 ] {lavaman_missile(1);};
  225. void() lavaman_fire8 =[ $attack8, lavaman_fire9 ] {ai_face();};
  226. void() lavaman_fire9 =[ $attack9, lavaman_fire10 ] {ai_face();};
  227. void() lavaman_fire10 =[ $attack10, lavaman_fire11 ] {ai_charge(1);};
  228. void() lavaman_fire11 =[ $attack11, lavaman_fire12 ] {ai_face();};
  229. void() lavaman_fire12 =[ $attack12, lavaman_fire13 ] {ai_charge(1);};
  230. void() lavaman_fire13 =[ $attack13, lavaman_fire14 ] {ai_face();};
  231. void() lavaman_fire14 =[ $attack14, lavaman_fire15 ] {ai_face();};
  232. void() lavaman_fire15 =[ $attack15, lavaman_fire16 ] {ai_charge(1);};
  233. void() lavaman_fire16 =[ $attack16, lavaman_fire17 ] {ai_charge(1);};
  234. void() lavaman_fire17 =[ $attack17, lavaman_fire18 ] {ai_face();};
  235. void() lavaman_fire18 =[ $attack18, lavaman_fire19 ] {lavaman_missile(2);};
  236. void() lavaman_fire19 =[ $attack19, lavaman_fire20 ] {ai_face();};
  237. void() lavaman_fire20 =[ $attack20, lavaman_fire21 ] {ai_face();};
  238. void() lavaman_fire21 =[ $attack21, lavaman_fire22 ] {ai_face();};
  239. void() lavaman_fire22 =[ $attack22, lavaman_fire23 ] {ai_charge(1);};
  240. void() lavaman_fire23 =[ $attack23, lavaman_run1 ] {};
  241. void() lavaman_shocka1 =[ $shocka1, lavaman_shocka2 ] {};
  242. void() lavaman_shocka2 =[ $shocka2, lavaman_shocka3 ] {};
  243. void() lavaman_shocka3 =[ $shocka3, lavaman_shocka4 ] {};
  244. void() lavaman_shocka4 =[ $shocka4, lavaman_shocka5 ] {};
  245. void() lavaman_shocka5 =[ $shocka5, lavaman_shocka6 ] {};
  246. void() lavaman_shocka6 =[ $shocka6, lavaman_shocka7 ] {};
  247. void() lavaman_shocka7 =[ $shocka7, lavaman_shocka8 ] {};
  248. void() lavaman_shocka8 =[ $shocka8, lavaman_shocka9 ] {};
  249. void() lavaman_shocka9 =[ $shocka9, lavaman_shocka10 ] {};
  250. void() lavaman_shocka10 =[ $shocka10, lavaman_run1 ] {};
  251. void() lavaman_pain =
  252. {
  253. if ( self.pain_finished > time )
  254. return;
  255. if (random() < 0.05)
  256. {
  257. self.pain_finished = time + 2;
  258. lavaman_shocka1();
  259. }
  260. };
  261. void() lavaman_death1 = [$death1, lavaman_death2]
  262. {
  263. sound (self, CHAN_VOICE, "boss1/death.wav", 1, ATTN_NORM);
  264. };
  265. void() lavaman_death2 = [$death2, lavaman_death3] {};
  266. void() lavaman_death3 = [$death3, lavaman_death4] {};
  267. void() lavaman_death4 = [$death4, lavaman_death5] {};
  268. void() lavaman_death5 = [$death5, lavaman_death6] {};
  269. void() lavaman_death6 = [$death6, lavaman_death7] {};
  270. void() lavaman_death7 = [$death7, lavaman_death8] {};
  271. void() lavaman_death8 = [$death8, lavaman_death9] {};
  272. void() lavaman_death9 = [$death9, lavaman_death10]
  273. {
  274. sound (self, CHAN_BODY, "boss1/out1.wav", 1, ATTN_NORM);
  275. WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  276. WriteByte (MSG_BROADCAST, TE_LAVASPLASH);
  277. WriteCoord (MSG_BROADCAST, self.origin_x);
  278. WriteCoord (MSG_BROADCAST, self.origin_y);
  279. WriteCoord (MSG_BROADCAST, self.origin_z);
  280. };
  281. void() lavaman_death10 = [$death9, lavaman_death10]
  282. {
  283. remove (self);
  284. };
  285. void() lavaman_touch =
  286. {
  287. local float damg;
  288. if (other == self.owner)
  289. return; // don't explode on owner
  290. if (pointcontents(self.origin) == CONTENT_SKY)
  291. {
  292. remove(self);
  293. return;
  294. }
  295. damg = 40;
  296. if (other.health)
  297. {
  298. if (other.classname == "monster_shambler")
  299. damg = damg * 0.5; // mostly immune
  300. T_Damage (other, self, self.owner, damg );
  301. }
  302. // don't do radius damage to the other, because all the damage
  303. // was done in the impact
  304. T_RadiusDamage (self, self.owner, 40, other);
  305. // sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  306. self.origin = self.origin - 8*normalize(self.velocity);
  307. // Change to an explosion2!!! Ramp in the non-diminishing reds...
  308. WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  309. WriteByte (MSG_BROADCAST, TE_EXPLOSION);
  310. WriteCoord (MSG_BROADCAST, self.origin_x);
  311. WriteCoord (MSG_BROADCAST, self.origin_y);
  312. WriteCoord (MSG_BROADCAST, self.origin_z);
  313. BecomeExplosion ();
  314. };
  315. void(float AttackNumber) lavaman_missile =
  316. {
  317. local entity fireball;
  318. local vector offang;
  319. local vector org, vec, d;
  320. local float t;
  321. makevectors (self.angles);
  322. // Right handed throw
  323. if ( AttackNumber == 1)
  324. {
  325. // org = self.origin - v_forward*40 + v_right*90 + v_up*110;
  326. org = self.origin + v_forward*40 + v_right*65 + v_up*130;
  327. }
  328. // Left handed throw
  329. else if ( AttackNumber == 2)
  330. {
  331. // org = self.origin - v_forward*40 - v_right*90 + v_up*110;
  332. org = self.origin + v_forward*40 - v_right*75 + v_up*125;
  333. }
  334. d = self.enemy.origin;
  335. t = vlen ( d - org );
  336. t = t / 380;
  337. if ( t > 1.75 )
  338. t = 1.75;
  339. if ( t < 1 )
  340. t = 1;
  341. vec = normalize (d - org);
  342. fireball = spawn ();
  343. fireball.owner = self;
  344. // fireball.movetype = MOVETYPE_FLYMISSILE;
  345. fireball.movetype = MOVETYPE_BOUNCE;
  346. fireball.solid = SOLID_BBOX;
  347. fireball.angles = vectoangles(vec);
  348. fireball.touch = lavaman_touch;
  349. fireball.classname = "lavaman_ball";
  350. setmodel (fireball, "progs/lavaball.mdl");
  351. setsize (fireball, '0 0 0', '0 0 0');
  352. setorigin (fireball, org);
  353. // fireball.velocity = vec * 600 + '0 0 200';
  354. fireball.velocity = vec * 600 * t;
  355. fireball.velocity_z = fireball.velocity_z + (200 * t);
  356. fireball.avelocity = '200 100 300';
  357. fireball.think = SUB_Remove;
  358. fireball.nextthink = time + 6;
  359. sound (self, CHAN_WEAPON, "boss1/throw.wav", 1, ATTN_NORM);
  360. // check for dead enemy
  361. if (self.enemy.health <= 0)
  362. lavaman_idle1 ();
  363. };
  364. void() lavaman_awake =
  365. {
  366. self.solid = SOLID_SLIDEBOX;
  367. self.movetype = MOVETYPE_STEP;
  368. self.takedamage = DAMAGE_AIM;
  369. self.flags = self.flags | FL_MONSTER;
  370. self.ideal_yaw = self.angles * '0 1 0';
  371. if (!self.yaw_speed)
  372. self.yaw_speed = 20;
  373. setmodel (self, "progs/lavaman.mdl");
  374. // setsize (self, '-64 -64 -12', '64 64 128');
  375. // setsize (self, '-32 -32 0', '32 32 120');
  376. setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX);
  377. self.view_ofs = '0 0 48';
  378. // self.health = 1500;
  379. self.health = 1250 + (250 * cvar("skill"));
  380. self.th_stand = lavaman_idle1;
  381. self.th_walk = lavaman_walk1;
  382. self.th_run = lavaman_walk1;
  383. self.th_missile = lavaman_fire1;
  384. self.th_pain = lavaman_pain;
  385. self.th_die = lavaman_death1;
  386. self.th_melee = lavaman_fire1;
  387. WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  388. WriteByte (MSG_BROADCAST, TE_LAVASPLASH);
  389. WriteCoord (MSG_BROADCAST, self.origin_x);
  390. WriteCoord (MSG_BROADCAST, self.origin_y);
  391. WriteCoord (MSG_BROADCAST, self.origin_z);
  392. if (!(activator.items & IT_INVISIBILITY))
  393. {
  394. if (!(activator.flags & FL_NOTARGET))
  395. {
  396. if (activator.classname == "player")
  397. self.enemy = activator;
  398. }
  399. }
  400. droptofloor();
  401. lavaman_rise1 ();
  402. };
  403. // (-64 -64 -12) (64 64 128)
  404. /*QUAKED monster_lava_man (1 0 0) (-32 -32 -24) (32 32 64) Ambush Sleeping
  405. */
  406. void() monster_lava_man =
  407. {
  408. if (deathmatch)
  409. {
  410. remove(self);
  411. return;
  412. }
  413. precache_model ("progs/lavaman.mdl");
  414. precache_model ("progs/lavaball.mdl");
  415. precache_sound ("weapons/rocket1i.wav");
  416. precache_sound ("boss1/out1.wav");
  417. precache_sound ("boss1/sight1.wav");
  418. precache_sound ("misc/power.wav");
  419. precache_sound ("boss1/throw.wav");
  420. precache_sound ("boss1/pain.wav");
  421. precache_sound ("boss1/death.wav");
  422. total_monsters = total_monsters + 1;
  423. // cause the lavaman to rise from the lava when triggered.
  424. if (self.spawnflags & 2)
  425. {
  426. self.use = lavaman_awake;
  427. return;
  428. }
  429. lavaman_awake();
  430. };