m_hover.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663
  1. // Copyright (c) ZeniMax Media Inc.
  2. // Licensed under the GNU General Public License 2.0.
  3. /*
  4. ==============================================================================
  5. hover
  6. ==============================================================================
  7. */
  8. #include "g_local.h"
  9. #include "m_hover.h"
  10. #include "m_flash.h"
  11. static cached_soundindex sound_pain1;
  12. static cached_soundindex sound_pain2;
  13. static cached_soundindex sound_death1;
  14. static cached_soundindex sound_death2;
  15. static cached_soundindex sound_sight;
  16. static cached_soundindex sound_search1;
  17. static cached_soundindex sound_search2;
  18. // ROGUE
  19. // daedalus sounds
  20. static cached_soundindex daed_sound_pain1;
  21. static cached_soundindex daed_sound_pain2;
  22. static cached_soundindex daed_sound_death1;
  23. static cached_soundindex daed_sound_death2;
  24. static cached_soundindex daed_sound_sight;
  25. static cached_soundindex daed_sound_search1;
  26. static cached_soundindex daed_sound_search2;
  27. // ROGUE
  28. MONSTERINFO_SIGHT(hover_sight) (edict_t *self, edict_t *other) -> void
  29. {
  30. // PMM - daedalus sounds
  31. if (self->mass < 225)
  32. gi.sound(self, CHAN_VOICE, sound_sight, 1, ATTN_NORM, 0);
  33. else
  34. gi.sound(self, CHAN_VOICE, daed_sound_sight, 1, ATTN_NORM, 0);
  35. }
  36. MONSTERINFO_SEARCH(hover_search) (edict_t *self) -> void
  37. {
  38. // PMM - daedalus sounds
  39. if (self->mass < 225)
  40. {
  41. if (frandom() < 0.5f)
  42. gi.sound(self, CHAN_VOICE, sound_search1, 1, ATTN_NORM, 0);
  43. else
  44. gi.sound(self, CHAN_VOICE, sound_search2, 1, ATTN_NORM, 0);
  45. }
  46. else
  47. {
  48. if (frandom() < 0.5f)
  49. gi.sound(self, CHAN_VOICE, daed_sound_search1, 1, ATTN_NORM, 0);
  50. else
  51. gi.sound(self, CHAN_VOICE, daed_sound_search2, 1, ATTN_NORM, 0);
  52. }
  53. }
  54. void hover_run(edict_t *self);
  55. void hover_dead(edict_t *self);
  56. void hover_attack(edict_t *self);
  57. void hover_reattack(edict_t *self);
  58. void hover_fire_blaster(edict_t *self);
  59. mframe_t hover_frames_stand[] = {
  60. { ai_stand },
  61. { ai_stand },
  62. { ai_stand },
  63. { ai_stand },
  64. { ai_stand },
  65. { ai_stand },
  66. { ai_stand },
  67. { ai_stand },
  68. { ai_stand },
  69. { ai_stand },
  70. { ai_stand },
  71. { ai_stand },
  72. { ai_stand },
  73. { ai_stand },
  74. { ai_stand },
  75. { ai_stand },
  76. { ai_stand },
  77. { ai_stand },
  78. { ai_stand },
  79. { ai_stand },
  80. { ai_stand },
  81. { ai_stand },
  82. { ai_stand },
  83. { ai_stand },
  84. { ai_stand },
  85. { ai_stand },
  86. { ai_stand },
  87. { ai_stand },
  88. { ai_stand },
  89. { ai_stand }
  90. };
  91. MMOVE_T(hover_move_stand) = { FRAME_stand01, FRAME_stand30, hover_frames_stand, nullptr };
  92. mframe_t hover_frames_pain3[] = {
  93. { ai_move },
  94. { ai_move },
  95. { ai_move },
  96. { ai_move },
  97. { ai_move },
  98. { ai_move },
  99. { ai_move },
  100. { ai_move },
  101. { ai_move }
  102. };
  103. MMOVE_T(hover_move_pain3) = { FRAME_pain301, FRAME_pain309, hover_frames_pain3, hover_run };
  104. mframe_t hover_frames_pain2[] = {
  105. { ai_move },
  106. { ai_move },
  107. { ai_move },
  108. { ai_move },
  109. { ai_move },
  110. { ai_move },
  111. { ai_move },
  112. { ai_move },
  113. { ai_move },
  114. { ai_move },
  115. { ai_move },
  116. { ai_move }
  117. };
  118. MMOVE_T(hover_move_pain2) = { FRAME_pain201, FRAME_pain212, hover_frames_pain2, hover_run };
  119. mframe_t hover_frames_pain1[] = {
  120. { ai_move },
  121. { ai_move },
  122. { ai_move, 2 },
  123. { ai_move, -8 },
  124. { ai_move, -4 },
  125. { ai_move, -6 },
  126. { ai_move, -4 },
  127. { ai_move, -3 },
  128. { ai_move, 1 },
  129. { ai_move },
  130. { ai_move },
  131. { ai_move },
  132. { ai_move, 3 },
  133. { ai_move, 1 },
  134. { ai_move },
  135. { ai_move, 2 },
  136. { ai_move, 3 },
  137. { ai_move, 2 },
  138. { ai_move, 7 },
  139. { ai_move, 1 },
  140. { ai_move },
  141. { ai_move },
  142. { ai_move, 2 },
  143. { ai_move },
  144. { ai_move },
  145. { ai_move, 5 },
  146. { ai_move, 3 },
  147. { ai_move, 4 }
  148. };
  149. MMOVE_T(hover_move_pain1) = { FRAME_pain101, FRAME_pain128, hover_frames_pain1, hover_run };
  150. mframe_t hover_frames_walk[] = {
  151. { ai_walk, 4 },
  152. { ai_walk, 4 },
  153. { ai_walk, 4 },
  154. { ai_walk, 4 },
  155. { ai_walk, 4 },
  156. { ai_walk, 4 },
  157. { ai_walk, 4 },
  158. { ai_walk, 4 },
  159. { ai_walk, 4 },
  160. { ai_walk, 4 },
  161. { ai_walk, 4 },
  162. { ai_walk, 4 },
  163. { ai_walk, 4 },
  164. { ai_walk, 4 },
  165. { ai_walk, 4 },
  166. { ai_walk, 4 },
  167. { ai_walk, 4 },
  168. { ai_walk, 4 },
  169. { ai_walk, 4 },
  170. { ai_walk, 4 },
  171. { ai_walk, 4 },
  172. { ai_walk, 4 },
  173. { ai_walk, 4 },
  174. { ai_walk, 4 },
  175. { ai_walk, 4 },
  176. { ai_walk, 4 },
  177. { ai_walk, 4 },
  178. { ai_walk, 4 },
  179. { ai_walk, 4 },
  180. { ai_walk, 4 },
  181. { ai_walk, 4 },
  182. { ai_walk, 4 },
  183. { ai_walk, 4 },
  184. { ai_walk, 4 },
  185. { ai_walk, 4 }
  186. };
  187. MMOVE_T(hover_move_walk) = { FRAME_forwrd01, FRAME_forwrd35, hover_frames_walk, nullptr };
  188. mframe_t hover_frames_run[] = {
  189. { ai_run, 10 },
  190. { ai_run, 10 },
  191. { ai_run, 10 },
  192. { ai_run, 10 },
  193. { ai_run, 10 },
  194. { ai_run, 10 },
  195. { ai_run, 10 },
  196. { ai_run, 10 },
  197. { ai_run, 10 },
  198. { ai_run, 10 },
  199. { ai_run, 10 },
  200. { ai_run, 10 },
  201. { ai_run, 10 },
  202. { ai_run, 10 },
  203. { ai_run, 10 },
  204. { ai_run, 10 },
  205. { ai_run, 10 },
  206. { ai_run, 10 },
  207. { ai_run, 10 },
  208. { ai_run, 10 },
  209. { ai_run, 10 },
  210. { ai_run, 10 },
  211. { ai_run, 10 },
  212. { ai_run, 10 },
  213. { ai_run, 10 },
  214. { ai_run, 10 },
  215. { ai_run, 10 },
  216. { ai_run, 10 },
  217. { ai_run, 10 },
  218. { ai_run, 10 },
  219. { ai_run, 10 },
  220. { ai_run, 10 },
  221. { ai_run, 10 },
  222. { ai_run, 10 },
  223. { ai_run, 10 }
  224. };
  225. MMOVE_T(hover_move_run) = { FRAME_forwrd01, FRAME_forwrd35, hover_frames_run, nullptr };
  226. static void hover_gib(edict_t *self)
  227. {
  228. gi.WriteByte(svc_temp_entity);
  229. gi.WriteByte(TE_EXPLOSION1);
  230. gi.WritePosition(self->s.origin);
  231. gi.multicast(self->s.origin, MULTICAST_PHS, false);
  232. self->s.skinnum /= 2;
  233. ThrowGibs(self, 150, {
  234. { 2, "models/objects/gibs/sm_meat/tris.md2" },
  235. { 2, "models/objects/gibs/sm_metal/tris.md2", GIB_METALLIC },
  236. { "models/monsters/hover/gibs/chest.md2", GIB_SKINNED },
  237. { 2, "models/monsters/hover/gibs/ring.md2", GIB_SKINNED | GIB_METALLIC },
  238. { 2, "models/monsters/hover/gibs/foot.md2", GIB_SKINNED },
  239. { "models/monsters/hover/gibs/head.md2", GIB_SKINNED | GIB_HEAD },
  240. });
  241. }
  242. THINK(hover_deadthink) (edict_t *self) -> void
  243. {
  244. if (!self->groundentity && level.time < self->timestamp)
  245. {
  246. self->nextthink = level.time + FRAME_TIME_S;
  247. return;
  248. }
  249. hover_gib(self);
  250. }
  251. void hover_dying(edict_t *self)
  252. {
  253. if (self->groundentity)
  254. {
  255. hover_deadthink(self);
  256. return;
  257. }
  258. if (brandom())
  259. return;
  260. gi.WriteByte(svc_temp_entity);
  261. gi.WriteByte(TE_PLAIN_EXPLOSION);
  262. gi.WritePosition(self->s.origin);
  263. gi.multicast(self->s.origin, MULTICAST_PHS, false);
  264. if (brandom())
  265. ThrowGibs(self, 120, {
  266. { "models/objects/gibs/sm_meat/tris.md2" }
  267. });
  268. else
  269. ThrowGibs(self, 120, {
  270. { "models/objects/gibs/sm_metal/tris.md2", GIB_METALLIC }
  271. });
  272. }
  273. mframe_t hover_frames_death1[] = {
  274. { ai_move },
  275. { ai_move, 0.f, hover_dying },
  276. { ai_move },
  277. { ai_move, 0.f, hover_dying },
  278. { ai_move },
  279. { ai_move, 0.f, hover_dying },
  280. { ai_move, -10, hover_dying },
  281. { ai_move, 3 },
  282. { ai_move, 5, hover_dying },
  283. { ai_move, 4, hover_dying },
  284. { ai_move, 7 }
  285. };
  286. MMOVE_T(hover_move_death1) = { FRAME_death101, FRAME_death111, hover_frames_death1, hover_dead };
  287. mframe_t hover_frames_start_attack[] = {
  288. { ai_charge, 1 },
  289. { ai_charge, 1 },
  290. { ai_charge, 1 }
  291. };
  292. MMOVE_T(hover_move_start_attack) = { FRAME_attak101, FRAME_attak103, hover_frames_start_attack, hover_attack };
  293. mframe_t hover_frames_attack1[] = {
  294. { ai_charge, -10, hover_fire_blaster },
  295. { ai_charge, -10, hover_fire_blaster },
  296. { ai_charge, 0, hover_reattack },
  297. };
  298. MMOVE_T(hover_move_attack1) = { FRAME_attak104, FRAME_attak106, hover_frames_attack1, nullptr };
  299. mframe_t hover_frames_end_attack[] = {
  300. { ai_charge, 1 },
  301. { ai_charge, 1 }
  302. };
  303. MMOVE_T(hover_move_end_attack) = { FRAME_attak107, FRAME_attak108, hover_frames_end_attack, hover_run };
  304. /* PMM - circle strafing code */
  305. #if 0
  306. mframe_t hover_frames_start_attack2[] = {
  307. { ai_charge, 15 },
  308. { ai_charge, 15 },
  309. { ai_charge, 15 }
  310. };
  311. MMOVE_T(hover_move_start_attack2) = { FRAME_attak101, FRAME_attak103, hover_frames_start_attack2, hover_attack };
  312. #endif
  313. mframe_t hover_frames_attack2[] = {
  314. { ai_charge, 10, hover_fire_blaster },
  315. { ai_charge, 10, hover_fire_blaster },
  316. { ai_charge, 10, hover_reattack },
  317. };
  318. MMOVE_T(hover_move_attack2) = { FRAME_attak104, FRAME_attak106, hover_frames_attack2, nullptr };
  319. #if 0
  320. mframe_t hover_frames_end_attack2[] = {
  321. { ai_charge, 15 },
  322. { ai_charge, 15 }
  323. };
  324. MMOVE_T(hover_move_end_attack2) = { FRAME_attak107, FRAME_attak108, hover_frames_end_attack2, hover_run };
  325. #endif
  326. // end of circle strafe
  327. void hover_reattack(edict_t *self)
  328. {
  329. if (self->enemy->health > 0)
  330. if (visible(self, self->enemy))
  331. if (frandom() <= 0.6f)
  332. {
  333. if (self->monsterinfo.attack_state == AS_STRAIGHT)
  334. {
  335. M_SetAnimation(self, &hover_move_attack1);
  336. return;
  337. }
  338. else if (self->monsterinfo.attack_state == AS_SLIDING)
  339. {
  340. M_SetAnimation(self, &hover_move_attack2);
  341. return;
  342. }
  343. else
  344. gi.Com_PrintFmt("hover_reattack: unexpected state {}\n", (int32_t) self->monsterinfo.attack_state);
  345. }
  346. M_SetAnimation(self, &hover_move_end_attack);
  347. }
  348. void hover_fire_blaster(edict_t *self)
  349. {
  350. vec3_t start;
  351. vec3_t forward, right;
  352. vec3_t end;
  353. vec3_t dir;
  354. if (!self->enemy || !self->enemy->inuse) // PGM
  355. return; // PGM
  356. AngleVectors(self->s.angles, forward, right, nullptr);
  357. vec3_t o = monster_flash_offset[(self->s.frame & 1) ? MZ2_HOVER_BLASTER_2 : MZ2_HOVER_BLASTER_1];
  358. start = M_ProjectFlashSource(self, o, forward, right);
  359. end = self->enemy->s.origin;
  360. end[2] += self->enemy->viewheight;
  361. dir = end - start;
  362. dir.normalize();
  363. // PGM - daedalus fires blaster2
  364. if (self->mass < 200)
  365. monster_fire_blaster(self, start, dir, 1, 1000, (self->s.frame & 1) ? MZ2_HOVER_BLASTER_2 : MZ2_HOVER_BLASTER_1, (self->s.frame % 4) ? EF_NONE : EF_HYPERBLASTER);
  366. else
  367. monster_fire_blaster2(self, start, dir, 1, 1000, (self->s.frame & 1) ? MZ2_DAEDALUS_BLASTER_2 : MZ2_DAEDALUS_BLASTER, (self->s.frame % 4) ? EF_NONE : EF_BLASTER);
  368. // PGM
  369. }
  370. MONSTERINFO_STAND(hover_stand) (edict_t *self) -> void
  371. {
  372. M_SetAnimation(self, &hover_move_stand);
  373. }
  374. MONSTERINFO_RUN(hover_run) (edict_t *self) -> void
  375. {
  376. if (self->monsterinfo.aiflags & AI_STAND_GROUND)
  377. M_SetAnimation(self, &hover_move_stand);
  378. else
  379. M_SetAnimation(self, &hover_move_run);
  380. }
  381. MONSTERINFO_WALK(hover_walk) (edict_t *self) -> void
  382. {
  383. M_SetAnimation(self, &hover_move_walk);
  384. }
  385. MONSTERINFO_ATTACK(hover_start_attack) (edict_t *self) -> void
  386. {
  387. M_SetAnimation(self, &hover_move_start_attack);
  388. }
  389. void hover_attack(edict_t *self)
  390. {
  391. float chance = 0.5f;
  392. if (self->mass > 150) // the daedalus strafes more
  393. chance += 0.1f;
  394. if (frandom() > chance)
  395. {
  396. M_SetAnimation(self, &hover_move_attack1);
  397. self->monsterinfo.attack_state = AS_STRAIGHT;
  398. }
  399. else // circle strafe
  400. {
  401. if (frandom() <= 0.5f) // switch directions
  402. self->monsterinfo.lefty = !self->monsterinfo.lefty;
  403. M_SetAnimation(self, &hover_move_attack2);
  404. self->monsterinfo.attack_state = AS_SLIDING;
  405. }
  406. }
  407. PAIN(hover_pain) (edict_t *self, edict_t *other, float kick, int damage, const mod_t &mod) -> void
  408. {
  409. if (level.time < self->pain_debounce_time)
  410. return;
  411. self->pain_debounce_time = level.time + 3_sec;
  412. float r = frandom();
  413. //====
  414. if (r < 0.5f)
  415. {
  416. // PMM - daedalus sounds
  417. if (self->mass < 225)
  418. gi.sound(self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);
  419. else
  420. gi.sound(self, CHAN_VOICE, daed_sound_pain1, 1, ATTN_NORM, 0);
  421. }
  422. else
  423. {
  424. // PMM - daedalus sounds
  425. if (self->mass < 225)
  426. gi.sound(self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);
  427. else
  428. gi.sound(self, CHAN_VOICE, daed_sound_pain2, 1, ATTN_NORM, 0);
  429. }
  430. // PGM
  431. //====
  432. if (!M_ShouldReactToPain(self, mod))
  433. return; // no pain anims in nightmare
  434. r = frandom();
  435. if (damage <= 25)
  436. {
  437. if (r < 0.5f)
  438. M_SetAnimation(self, &hover_move_pain3);
  439. else
  440. M_SetAnimation(self, &hover_move_pain2);
  441. }
  442. else
  443. {
  444. //====
  445. // PGM pain sequence is WAY too long
  446. if (r < 0.3f)
  447. M_SetAnimation(self, &hover_move_pain1);
  448. else
  449. M_SetAnimation(self, &hover_move_pain2);
  450. // PGM
  451. //====
  452. }
  453. }
  454. MONSTERINFO_SETSKIN(hover_setskin) (edict_t *self) -> void
  455. {
  456. if (self->health < (self->max_health / 2))
  457. self->s.skinnum |= 1; // PGM support for skins 2 & 3.
  458. else
  459. self->s.skinnum &= ~1; // PGM support for skins 2 & 3.
  460. }
  461. void hover_dead(edict_t *self)
  462. {
  463. self->mins = { -16, -16, -24 };
  464. self->maxs = { 16, 16, -8 };
  465. self->movetype = MOVETYPE_TOSS;
  466. self->think = hover_deadthink;
  467. self->nextthink = level.time + FRAME_TIME_S;
  468. self->timestamp = level.time + 15_sec;
  469. gi.linkentity(self);
  470. }
  471. DIE(hover_die) (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, const vec3_t &point, const mod_t &mod) -> void
  472. {
  473. self->s.effects = EF_NONE;
  474. self->monsterinfo.power_armor_type = IT_NULL;
  475. if (M_CheckGib(self, mod))
  476. {
  477. hover_gib(self);
  478. return;
  479. }
  480. if (self->deadflag)
  481. return;
  482. // regular death
  483. // PMM - daedalus sounds
  484. if (self->mass < 225)
  485. {
  486. if (frandom() < 0.5f)
  487. gi.sound(self, CHAN_VOICE, sound_death1, 1, ATTN_NORM, 0);
  488. else
  489. gi.sound(self, CHAN_VOICE, sound_death2, 1, ATTN_NORM, 0);
  490. }
  491. else
  492. {
  493. if (frandom() < 0.5f)
  494. gi.sound(self, CHAN_VOICE, daed_sound_death1, 1, ATTN_NORM, 0);
  495. else
  496. gi.sound(self, CHAN_VOICE, daed_sound_death2, 1, ATTN_NORM, 0);
  497. }
  498. self->deadflag = true;
  499. self->takedamage = true;
  500. M_SetAnimation(self, &hover_move_death1);
  501. }
  502. static void hover_set_fly_parameters(edict_t *self)
  503. {
  504. self->monsterinfo.fly_thrusters = false;
  505. self->monsterinfo.fly_acceleration = 20.f;
  506. self->monsterinfo.fly_speed = 120.f;
  507. // Icarus prefers to keep its distance, but flies slower than the flyer.
  508. // he never pins because of this.
  509. self->monsterinfo.fly_min_distance = 150.f;
  510. self->monsterinfo.fly_max_distance = 350.f;
  511. }
  512. /*QUAKED monster_hover (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
  513. */
  514. /*QUAKED monster_daedalus (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn Sight
  515. This is the improved icarus monster.
  516. */
  517. void SP_monster_hover(edict_t *self)
  518. {
  519. if ( !M_AllowSpawn( self ) ) {
  520. G_FreeEdict( self );
  521. return;
  522. }
  523. self->movetype = MOVETYPE_STEP;
  524. self->solid = SOLID_BBOX;
  525. self->s.modelindex = gi.modelindex("models/monsters/hover/tris.md2");
  526. gi.modelindex("models/monsters/hover/gibs/chest.md2");
  527. gi.modelindex("models/monsters/hover/gibs/foot.md2");
  528. gi.modelindex("models/monsters/hover/gibs/head.md2");
  529. gi.modelindex("models/monsters/hover/gibs/ring.md2");
  530. self->mins = { -24, -24, -24 };
  531. self->maxs = { 24, 24, 32 };
  532. self->health = 240 * st.health_multiplier;
  533. self->gib_health = -100;
  534. self->mass = 150;
  535. self->pain = hover_pain;
  536. self->die = hover_die;
  537. self->monsterinfo.stand = hover_stand;
  538. self->monsterinfo.walk = hover_walk;
  539. self->monsterinfo.run = hover_run;
  540. self->monsterinfo.attack = hover_start_attack;
  541. self->monsterinfo.sight = hover_sight;
  542. self->monsterinfo.search = hover_search;
  543. self->monsterinfo.setskin = hover_setskin;
  544. // PGM
  545. if (strcmp(self->classname, "monster_daedalus") == 0)
  546. {
  547. self->health = 450 * st.health_multiplier;
  548. self->mass = 225;
  549. self->yaw_speed = 23;
  550. if (!st.was_key_specified("power_armor_type"))
  551. self->monsterinfo.power_armor_type = IT_ITEM_POWER_SCREEN;
  552. if (!st.was_key_specified("power_armor_power"))
  553. self->monsterinfo.power_armor_power = 100;
  554. // PMM - daedalus sounds
  555. self->monsterinfo.engine_sound = gi.soundindex("daedalus/daedidle1.wav");
  556. daed_sound_pain1.assign("daedalus/daedpain1.wav");
  557. daed_sound_pain2.assign("daedalus/daedpain2.wav");
  558. daed_sound_death1.assign("daedalus/daeddeth1.wav");
  559. daed_sound_death2.assign("daedalus/daeddeth2.wav");
  560. daed_sound_sight.assign("daedalus/daedsght1.wav");
  561. daed_sound_search1.assign("daedalus/daedsrch1.wav");
  562. daed_sound_search2.assign("daedalus/daedsrch2.wav");
  563. gi.soundindex("tank/tnkatck3.wav");
  564. // pmm
  565. }
  566. else
  567. {
  568. self->yaw_speed = 18;
  569. sound_pain1.assign("hover/hovpain1.wav");
  570. sound_pain2.assign("hover/hovpain2.wav");
  571. sound_death1.assign("hover/hovdeth1.wav");
  572. sound_death2.assign("hover/hovdeth2.wav");
  573. sound_sight.assign("hover/hovsght1.wav");
  574. sound_search1.assign("hover/hovsrch1.wav");
  575. sound_search2.assign("hover/hovsrch2.wav");
  576. gi.soundindex("hover/hovatck1.wav");
  577. self->monsterinfo.engine_sound = gi.soundindex("hover/hovidle1.wav");
  578. }
  579. // PGM
  580. gi.linkentity(self);
  581. M_SetAnimation(self, &hover_move_stand);
  582. self->monsterinfo.scale = MODEL_SCALE;
  583. flymonster_start(self);
  584. // PGM
  585. if (strcmp(self->classname, "monster_daedalus") == 0)
  586. self->s.skinnum = 2;
  587. // PGM
  588. self->monsterinfo.aiflags |= AI_ALTERNATE_FLY;
  589. hover_set_fly_parameters(self);
  590. }