oldone.qc 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. /* Copyright (C) 1996-1997 Id Software, Inc.
  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. OLD ONE
  18. ==============================================================================
  19. */
  20. $cd /raid/quake/id1/models/old_one
  21. $origin 0 0 24
  22. $base base
  23. $skin skin
  24. $scale 1
  25. void() finale_1;
  26. void() finale_2;
  27. void() finale_3;
  28. void() finale_4;
  29. entity shub;
  30. $frame old1 old2 old3 old4 old5 old6 old7 old8 old9
  31. $frame old10 old11 old12 old13 old14 old15 old16 old17 old18 old19
  32. $frame old20 old21 old22 old23 old24 old25 old26 old27 old28 old29
  33. $frame old30 old31 old32 old33 old34 old35 old36 old37 old38 old39
  34. $frame old40 old41 old42 old43 old44 old45 old46
  35. $frame shake1 shake2 shake3 shake4 shake5 shake6 shake7 shake8
  36. $frame shake9 shake10 shake11 shake12 shake12 shake13 shake14
  37. $frame shake15 shake16 shake17 shake18 shake19 shake20
  38. //void() old_stand =[ $old1, old_stand ] {};
  39. void() old_idle1 =[ $old1, old_idle2 ] {};
  40. void() old_idle2 =[ $old2, old_idle3 ] {};
  41. void() old_idle3 =[ $old3, old_idle4 ] {};
  42. void() old_idle4 =[ $old4, old_idle5 ] {};
  43. void() old_idle5 =[ $old5, old_idle6 ] {};
  44. void() old_idle6 =[ $old6, old_idle7 ] {};
  45. void() old_idle7 =[ $old7, old_idle8 ] {};
  46. void() old_idle8 =[ $old8, old_idle9 ] {};
  47. void() old_idle9 =[ $old9, old_idle10 ] {};
  48. void() old_idle10 =[ $old10, old_idle11 ] {};
  49. void() old_idle11 =[ $old11, old_idle12 ] {};
  50. void() old_idle12 =[ $old12, old_idle13 ] {};
  51. void() old_idle13 =[ $old13, old_idle14 ] {};
  52. void() old_idle14 =[ $old14, old_idle15 ] {};
  53. void() old_idle15 =[ $old15, old_idle16 ] {};
  54. void() old_idle16 =[ $old16, old_idle17 ] {};
  55. void() old_idle17 =[ $old17, old_idle18 ] {};
  56. void() old_idle18 =[ $old18, old_idle19 ] {};
  57. void() old_idle19 =[ $old19, old_idle20 ] {};
  58. void() old_idle20 =[ $old20, old_idle21 ] {};
  59. void() old_idle21 =[ $old21, old_idle22 ] {};
  60. void() old_idle22 =[ $old22, old_idle23 ] {};
  61. void() old_idle23 =[ $old23, old_idle24 ] {};
  62. void() old_idle24 =[ $old24, old_idle25 ] {};
  63. void() old_idle25 =[ $old25, old_idle26 ] {};
  64. void() old_idle26 =[ $old26, old_idle27 ] {};
  65. void() old_idle27 =[ $old27, old_idle28 ] {};
  66. void() old_idle28 =[ $old28, old_idle29 ] {};
  67. void() old_idle29 =[ $old29, old_idle30 ] {};
  68. void() old_idle30 =[ $old30, old_idle31 ] {};
  69. void() old_idle31 =[ $old31, old_idle32 ] {};
  70. void() old_idle32 =[ $old32, old_idle33 ] {};
  71. void() old_idle33 =[ $old33, old_idle34 ] {};
  72. void() old_idle34 =[ $old34, old_idle35 ] {};
  73. void() old_idle35 =[ $old35, old_idle36 ] {};
  74. void() old_idle36 =[ $old36, old_idle37 ] {};
  75. void() old_idle37 =[ $old37, old_idle38 ] {};
  76. void() old_idle38 =[ $old38, old_idle39 ] {};
  77. void() old_idle39 =[ $old39, old_idle40 ] {};
  78. void() old_idle40 =[ $old40, old_idle41 ] {};
  79. void() old_idle41 =[ $old41, old_idle42 ] {};
  80. void() old_idle42 =[ $old42, old_idle43 ] {};
  81. void() old_idle43 =[ $old43, old_idle44 ] {};
  82. void() old_idle44 =[ $old44, old_idle45 ] {};
  83. void() old_idle45 =[ $old45, old_idle46 ] {};
  84. void() old_idle46 =[ $old46, old_idle1 ] {};
  85. void() old_thrash1 =[ $shake1, old_thrash2 ] {lightstyle(0, "m");};
  86. void() old_thrash2 =[ $shake2, old_thrash3 ] {lightstyle(0, "k");};
  87. void() old_thrash3 =[ $shake3, old_thrash4 ] {lightstyle(0, "k");};
  88. void() old_thrash4 =[ $shake4, old_thrash5 ] {lightstyle(0, "i");};
  89. void() old_thrash5 =[ $shake5, old_thrash6 ] {lightstyle(0, "g");};
  90. void() old_thrash6 =[ $shake6, old_thrash7 ] {lightstyle(0, "e");};
  91. void() old_thrash7 =[ $shake7, old_thrash8 ] {lightstyle(0, "c");};
  92. void() old_thrash8 =[ $shake8, old_thrash9 ] {lightstyle(0, "a");};
  93. void() old_thrash9 =[ $shake9, old_thrash10 ] {lightstyle(0, "c");};
  94. void() old_thrash10 =[ $shake10, old_thrash11 ] {lightstyle(0, "e");};
  95. void() old_thrash11 =[ $shake11, old_thrash12 ] {lightstyle(0, "g");};
  96. void() old_thrash12 =[ $shake12, old_thrash13 ] {lightstyle(0, "i");};
  97. void() old_thrash13 =[ $shake13, old_thrash14 ] {lightstyle(0, "k");};
  98. void() old_thrash14 =[ $shake14, old_thrash15 ] {lightstyle(0, "m");};
  99. void() old_thrash15 =[ $shake15, old_thrash16 ] {lightstyle(0, "m");
  100. self.cnt = self.cnt + 1;
  101. if (self.cnt != 3)
  102. self.think = old_thrash1;
  103. };
  104. void() old_thrash16 =[ $shake16, old_thrash17 ] {lightstyle(0, "g");};
  105. void() old_thrash17 =[ $shake17, old_thrash18 ] {lightstyle(0, "c");};
  106. void() old_thrash18 =[ $shake18, old_thrash19 ] {lightstyle(0, "b");};
  107. void() old_thrash19 =[ $shake19, old_thrash20 ] {lightstyle(0, "a");};
  108. void() old_thrash20 =[ $shake20, old_thrash20 ] {finale_4();};
  109. //============================================================================
  110. void() finale_1 =
  111. {
  112. local entity pos, pl;
  113. local entity timer;
  114. intermission_exittime = time + 10000000; // never allow exit
  115. intermission_running = 1;
  116. // find the intermission spot
  117. pos = find (world, classname, "info_intermission");
  118. if (!pos)
  119. error ("no info_intermission");
  120. pl = find (world, classname, "misc_teleporttrain");
  121. if (!pl)
  122. error ("no teleporttrain");
  123. remove (pl);
  124. WriteByte (MSG_ALL, SVC_FINALE);
  125. WriteString (MSG_ALL, "");
  126. pl = find (world, classname, "player");
  127. while (pl != world)
  128. {
  129. pl.view_ofs = '0 0 0';
  130. pl.angles = other.v_angle = pos.mangle;
  131. pl.fixangle = TRUE; // turn this way immediately
  132. pl.map = self.map;
  133. pl.nextthink = time + 0.5;
  134. pl.takedamage = DAMAGE_NO;
  135. pl.solid = SOLID_NOT;
  136. pl.movetype = MOVETYPE_NONE;
  137. pl.modelindex = 0;
  138. setorigin (pl, pos.origin);
  139. pl = find (pl, classname, "player");
  140. }
  141. // make fake versions of all players as standins, and move the real
  142. // players to the intermission spot
  143. // wait for 1 second
  144. timer = spawn();
  145. timer.nextthink = time + 1;
  146. timer.think = finale_2;
  147. };
  148. void() finale_2 =
  149. {
  150. local vector o;
  151. // start a teleport splash inside shub
  152. o = shub.origin - '0 100 0';
  153. WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
  154. WriteByte (MSG_BROADCAST, TE_TELEPORT);
  155. WriteCoord (MSG_BROADCAST, o_x);
  156. WriteCoord (MSG_BROADCAST, o_y);
  157. WriteCoord (MSG_BROADCAST, o_z);
  158. sound (shub, CHAN_VOICE, "misc/r_tele1.wav", 1, ATTN_NORM);
  159. self.nextthink = time + 2;
  160. self.think = finale_3;
  161. };
  162. void() finale_3 =
  163. {
  164. // start shub thrashing wildly
  165. shub.think = old_thrash1;
  166. sound (shub, CHAN_VOICE, "boss2/death.wav", 1, ATTN_NORM);
  167. lightstyle(0, "abcdefghijklmlkjihgfedcb");
  168. };
  169. void() finale_4 =
  170. {
  171. // throw tons of meat chunks
  172. local vector oldo;
  173. local float x, y, z;
  174. local float r;
  175. local entity n;
  176. sound (self, CHAN_VOICE, "boss2/pop2.wav", 1, ATTN_NORM);
  177. oldo = self.origin;
  178. z = 16;
  179. while (z <= 144)
  180. {
  181. x = -64;
  182. while (x <= 64)
  183. {
  184. y = -64;
  185. while (y <= 64)
  186. {
  187. self.origin_x = oldo_x + x;
  188. self.origin_y = oldo_y + y;
  189. self.origin_z = oldo_z + z;
  190. r = random();
  191. if (r < 0.3)
  192. ThrowGib ("progs/gib1.mdl", -999);
  193. else if (r < 0.6)
  194. ThrowGib ("progs/gib2.mdl", -999);
  195. else
  196. ThrowGib ("progs/gib3.mdl", -999);
  197. y = y + 32;
  198. }
  199. x = x + 32;
  200. }
  201. z = z + 96;
  202. }
  203. // start the end text
  204. WriteByte (MSG_ALL, SVC_FINALE);
  205. WriteString (MSG_ALL, "Congratulations and well done! You have\nbeaten the hideous Shub-Niggurath, and\nher hundreds of ugly changelings and\nmonsters. You have proven that your\nskill and your cunning are greater than\nall the powers of Quake. You are the\nmaster now. Id Software salutes you.");
  206. // put a player model down
  207. n = spawn();
  208. setmodel (n, "progs/player.mdl");
  209. oldo = oldo - '32 264 0';
  210. setorigin (n, oldo);
  211. n.angles = '0 290 0';
  212. n.frame = 1;
  213. remove (self);
  214. // switch cd track
  215. WriteByte (MSG_ALL, SVC_CDTRACK);
  216. WriteByte (MSG_ALL, 3);
  217. WriteByte (MSG_ALL, 3);
  218. lightstyle(0, "m");
  219. };
  220. //============================================================================
  221. /*QUAKED monster_oldone (1 0 0) (-16 -16 -24) (16 16 32)
  222. */
  223. void() monster_oldone =
  224. {
  225. if (deathmatch)
  226. {
  227. remove(self);
  228. return;
  229. }
  230. precache_model2 ("progs/oldone.mdl");
  231. precache_sound2 ("boss2/death.wav");
  232. precache_sound2 ("boss2/idle.wav");
  233. precache_sound2 ("boss2/sight.wav");
  234. precache_sound2 ("boss2/pop2.wav");
  235. self.solid = SOLID_SLIDEBOX;
  236. self.movetype = MOVETYPE_STEP;
  237. setmodel (self, "progs/oldone.mdl");
  238. setsize (self, '-160 -128 -24', '160 128 256');
  239. self.health = 40000; // kill by telefrag
  240. self.think = old_idle1;
  241. self.nextthink = time + 0.1;
  242. self.takedamage = DAMAGE_YES;
  243. self.th_die = finale_1;
  244. shub = self;
  245. total_monsters = total_monsters + 1;
  246. };