Advertisement
Guest User

world.qc clientstat fix (oops)

a guest
Jul 23rd, 2021
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.26 KB | None | 0 0
  1.  
  2. void() InitBodyQue;
  3. //JIM
  4. //void() InitBulletHoles;
  5.  
  6.  
  7. void() main =
  8. {
  9. dprint ("main function\n");
  10.  
  11. // these are just commands the the prog compiler to copy these files
  12.  
  13. precache_file ("progs.dat");
  14. precache_file ("gfx.wad");
  15. precache_file ("quake.rc");
  16. precache_file ("default.cfg");
  17.  
  18. precache_file ("end1.bin");
  19. precache_file2 ("end2.bin");
  20.  
  21. precache_file ("demo1.dem");
  22. precache_file ("demo2.dem");
  23. precache_file ("demo3.dem");
  24.  
  25. //
  26. // these are all of the lumps from the cached.ls files
  27. //
  28. precache_file ("gfx/palette.lmp");
  29. precache_file ("gfx/colormap.lmp");
  30.  
  31. precache_file2 ("gfx/pop.lmp");
  32.  
  33. precache_file ("gfx/complete.lmp");
  34. precache_file ("gfx/inter.lmp");
  35.  
  36. precache_file ("gfx/ranking.lmp");
  37. precache_file ("gfx/vidmodes.lmp");
  38. precache_file ("gfx/finale.lmp");
  39. precache_file ("gfx/conback.lmp");
  40. precache_file ("gfx/qplaque.lmp");
  41.  
  42. precache_file ("gfx/menudot1.lmp");
  43. precache_file ("gfx/menudot2.lmp");
  44. precache_file ("gfx/menudot3.lmp");
  45. precache_file ("gfx/menudot4.lmp");
  46. precache_file ("gfx/menudot5.lmp");
  47. precache_file ("gfx/menudot6.lmp");
  48.  
  49. precache_file ("gfx/menuplyr.lmp");
  50. precache_file ("gfx/bigbox.lmp");
  51. precache_file ("gfx/dim_modm.lmp");
  52. precache_file ("gfx/dim_drct.lmp");
  53. precache_file ("gfx/dim_ipx.lmp");
  54. precache_file ("gfx/dim_tcp.lmp");
  55. precache_file ("gfx/dim_mult.lmp");
  56. precache_file ("gfx/mainmenu.lmp");
  57.  
  58. precache_file ("gfx/box_tl.lmp");
  59. precache_file ("gfx/box_tm.lmp");
  60. precache_file ("gfx/box_tr.lmp");
  61.  
  62. precache_file ("gfx/box_ml.lmp");
  63. precache_file ("gfx/box_mm.lmp");
  64. precache_file ("gfx/box_mm2.lmp");
  65. precache_file ("gfx/box_mr.lmp");
  66.  
  67. precache_file ("gfx/box_bl.lmp");
  68. precache_file ("gfx/box_bm.lmp");
  69. precache_file ("gfx/box_br.lmp");
  70.  
  71. precache_file ("gfx/sp_menu.lmp");
  72. precache_file ("gfx/ttl_sgl.lmp");
  73. precache_file ("gfx/ttl_main.lmp");
  74. precache_file ("gfx/ttl_cstm.lmp");
  75.  
  76. precache_file ("gfx/mp_menu.lmp");
  77.  
  78. precache_file ("gfx/netmen1.lmp");
  79. precache_file ("gfx/netmen2.lmp");
  80. precache_file ("gfx/netmen3.lmp");
  81. precache_file ("gfx/netmen4.lmp");
  82. precache_file ("gfx/netmen5.lmp");
  83.  
  84. precache_file ("gfx/sell.lmp");
  85.  
  86. precache_file ("gfx/help0.lmp");
  87. precache_file ("gfx/help1.lmp");
  88. precache_file ("gfx/help2.lmp");
  89. precache_file ("gfx/help3.lmp");
  90. precache_file ("gfx/help4.lmp");
  91. precache_file ("gfx/help5.lmp");
  92.  
  93. precache_file ("gfx/pause.lmp");
  94. precache_file ("gfx/loading.lmp");
  95.  
  96. precache_file ("gfx/p_option.lmp");
  97. precache_file ("gfx/p_load.lmp");
  98. precache_file ("gfx/p_save.lmp");
  99. precache_file ("gfx/p_multi.lmp");
  100.  
  101. // sounds loaded by C code
  102. precache_sound ("misc/menu1.wav");
  103. precache_sound ("misc/menu2.wav");
  104. precache_sound ("misc/menu3.wav");
  105.  
  106. precache_sound ("ambience/water1.wav");
  107. precache_sound ("ambience/wind2.wav");
  108.  
  109. // shareware
  110. precache_file ("maps/start.bsp");
  111.  
  112. precache_file ("maps/e1m1.bsp");
  113. precache_file ("maps/e1m2.bsp");
  114. precache_file ("maps/e1m3.bsp");
  115. precache_file ("maps/e1m4.bsp");
  116. precache_file ("maps/e1m5.bsp");
  117. precache_file ("maps/e1m6.bsp");
  118. precache_file ("maps/e1m7.bsp");
  119. precache_file ("maps/e1m8.bsp");
  120.  
  121. // registered
  122. precache_file2 ("gfx/pop.lmp");
  123.  
  124. precache_file2 ("maps/e2m1.bsp");
  125. precache_file2 ("maps/e2m2.bsp");
  126. precache_file2 ("maps/e2m3.bsp");
  127. precache_file2 ("maps/e2m4.bsp");
  128. precache_file2 ("maps/e2m5.bsp");
  129. precache_file2 ("maps/e2m6.bsp");
  130. precache_file2 ("maps/e2m7.bsp");
  131.  
  132. precache_file2 ("maps/e3m1.bsp");
  133. precache_file2 ("maps/e3m2.bsp");
  134. precache_file2 ("maps/e3m3.bsp");
  135. precache_file2 ("maps/e3m4.bsp");
  136. precache_file2 ("maps/e3m5.bsp");
  137. precache_file2 ("maps/e3m6.bsp");
  138. precache_file2 ("maps/e3m7.bsp");
  139.  
  140. precache_file2 ("maps/e4m1.bsp");
  141. precache_file2 ("maps/e4m2.bsp");
  142. precache_file2 ("maps/e4m3.bsp");
  143. precache_file2 ("maps/e4m4.bsp");
  144. precache_file2 ("maps/e4m5.bsp");
  145. precache_file2 ("maps/e4m6.bsp");
  146. precache_file2 ("maps/e4m7.bsp");
  147. precache_file2 ("maps/e4m8.bsp");
  148.  
  149. precache_file2 ("maps/end.bsp");
  150.  
  151. precache_file2 ("maps/dm1.bsp");
  152. precache_file2 ("maps/dm2.bsp");
  153. precache_file2 ("maps/dm3.bsp");
  154. precache_file2 ("maps/dm4.bsp");
  155. precache_file2 ("maps/dm5.bsp");
  156. precache_file2 ("maps/dm6.bsp");
  157. };
  158.  
  159.  
  160. /*
  161. ================
  162. DetectKnownRelease
  163.  
  164. This detects whether the current map is from a known release for which
  165. a backwards-compatibility hack should be applied, and sets the
  166. known_release global accordingly. -- iw
  167. ================
  168. */
  169. void() DetectKnownRelease =
  170. {
  171. local string release_name;
  172.  
  173. known_release = KNOWN_RELEASE_NOT;
  174. release_name = "";
  175.  
  176. if (mapname == "dm1" ||
  177. mapname == "dm2" ||
  178. mapname == "dm3" ||
  179. mapname == "dm4" ||
  180. mapname == "dm5" ||
  181. mapname == "dm6" ||
  182. mapname == "e1m1" ||
  183. mapname == "e1m2" ||
  184. mapname == "e1m3" ||
  185. mapname == "e1m4" ||
  186. mapname == "e1m5" ||
  187. mapname == "e1m6" ||
  188. mapname == "e1m7" ||
  189. mapname == "e1m8" ||
  190. mapname == "e2m1" ||
  191. mapname == "e2m2" ||
  192. mapname == "e2m3" ||
  193. mapname == "e2m4" ||
  194. mapname == "e2m5" ||
  195. mapname == "e2m6" ||
  196. mapname == "e2m7" ||
  197. mapname == "e3m1" ||
  198. mapname == "e3m2" ||
  199. mapname == "e3m3" ||
  200. mapname == "e3m4" ||
  201. mapname == "e3m5" ||
  202. mapname == "e3m6" ||
  203. mapname == "e3m7" ||
  204. mapname == "e4m1" ||
  205. mapname == "e4m2" ||
  206. mapname == "e4m3" ||
  207. mapname == "e4m4" ||
  208. mapname == "e4m5" ||
  209. mapname == "e4m6" ||
  210. mapname == "e4m7" ||
  211. mapname == "e4m8" ||
  212. mapname == "end" ||
  213. (mapname == "start" && world.message == "Introduction"))
  214. {
  215. known_release = KNOWN_RELEASE_ID1;
  216. release_name = "id1";
  217. }
  218.  
  219. if (mapname == "jamx_artistical" ||
  220. mapname == "jamx_bloodshot" ||
  221. mapname == "jamx_fw" ||
  222. mapname == "jamx_hcm" ||
  223. mapname == "jamx_ionous" ||
  224. mapname == "jamx_jcr" ||
  225. mapname == "jamx_kalebclark" ||
  226. mapname == "jamx_mafon" ||
  227. //mapname == "jamx_mugwump" || // dummy map
  228. mapname == "jamx_naitelveni" ||
  229. mapname == "jamx_newhouse" ||
  230. mapname == "jamx_pinchy" ||
  231. mapname == "jamx_strwrk" ||
  232. mapname == "jamx_ukko" ||
  233. mapname == "jamx_yoder" ||
  234. (mapname == "start" && world.message == "An Unending Dusk"))
  235. {
  236. known_release = KNOWN_RELEASE_FUNC_MAPJAMX;
  237. release_name = "func_mapjamx";
  238. }
  239.  
  240. if (release_name != "")
  241. {
  242. dprint ("WARNING: progs.dat detected a map from ");
  243. dprint (release_name);
  244. dprint (", attempting to behave compatibly\n");
  245. }
  246. };
  247.  
  248.  
  249. entity lastspawn;
  250.  
  251. //=======================
  252. /*QUAKED worldspawn (0 0 0) ?
  253. Only used for the world entity.
  254.  
  255. Optionally set reset_items to one of the following values:
  256. 0: don't reset the player's inventory
  257. 1: reset to shotgun, axe, and 25 shells
  258. 2: reset to axe only
  259.  
  260. message(string) : "Level name"
  261.  
  262. worldtype(choices) : "Ambience" : 0 =
  263. 0 : "Medieval"
  264. 1 : "Runic (metal)"
  265. 2 : "Present (base)"
  266.  
  267. sounds(integer) : "CD track to play" : 0
  268.  
  269. light(integer) : "Ambient light" : 0 : "Set a global minimum light level of 'n' across the whole map. This is an easy way to eliminate completely dark areas of the level, however you may lose some contrast as a result, so use with care. Default 0"
  270.  
  271. reset_items(choices) : "Reset the player's inventory on spawn" : 0 =
  272. 0 "Don't reset the player's inventory"
  273. 1 "Reset to shotgun, axe, and 25 shells"
  274. 2 "Reset to axe only"
  275.  
  276. _sunlight(integer) : "Sunlight" : 0 : "Set the brightness of the sunlight coming from an unseen sun in the sky. Sky brushes (or more accurately bsp leafs with sky contents) will emit sunlight at an angle specified by the _sun_mangle key. Default 0"
  277.  
  278. _sun_mangle(string) : "Sun mangle (Yaw pitch roll)" : "0 -90 0" : "Specifies the direction of sunlight using yaw(x), pitch(y) and roll(z) in degrees. Yaw specifies the angle around the Z-axis from 0 to 359 degrees and pitch specifies the angle from 90 (straight up) to -90 (straight down). Roll has no effect, so use any value (e.g. 0). Default is straight down (0 -90 0)"
  279.  
  280. _sunlight_penumbra(integer) : "Sunlight penumbra in degrees" : 0 : "Specifies the penumbra width, in degrees, of sunlight. Useful values are 3-4 for a gentle soft edge, or 10-20+ for more diffuse sunlight. Default is 0"
  281.  
  282. _sunlight_color(color255) : "Sunlight color R G B" : "255 255 255" : "Specify red(r), green(g) and blue(b) components for the colour of the sunlight. RGB component values are between 0 and 255 (between 0 and 1 is also accepted). Default is white light (255 255 255)"
  283.  
  284. _sunlight2(integer) : "Sunlight 2 brightness" : 0 : "Set the brightness of a large dome of lights positioned around the map (16K unit radius). Useful for simulating higly diffused light (e.g. cloudy skies) in outdoor areas. Default 0"
  285.  
  286. _sunlight2_color(color255) : "Sunlight 2 color R G B" : "255 255 255" : "Specifies the colour of _sunlight2, same format as _sunlight_color. Default is white light (255 255 255)"
  287.  
  288. _sunlight3(integer) : "Sunlight 3 brightness" : 0 : "Same as _sunlight2 but creates lights on the bottom hemisphere. Default 0"
  289.  
  290. _sunlight3_color(color255) : "Sunlight 3 color R G B" : "255 255 255" : "Specifies the colour of _sunlight3, same format as _sunlight_color. Default is white light (255 255 255)"
  291.  
  292. _dist(integer) : "Global light scale" : 1 : "Scales the fade distance of all lights by a factor of n. If n is more than 1 lights fade more quickly with distance and if n is less than 1, lights fade more slowly with distance and light reaches further"
  293.  
  294. _range(float) : "Global light range" : "0.5" : "Scales the brightness range of all lights without affecting their fade discance. Values of n more than 0.5 makes lights brighter and n less than 0.5 makes lights less bright. The same effect can be achieved on individual lights by adjusting both the 'light' and 'wait' attributes"
  295.  
  296. _anglescale(float) : "Light angle scale" : "0.5" : "Sets a scaling factor for how much influence the angle of incidence of sunlight on a surface has on the brightness of the surface. n must be between 0.0 and 1.0. Smaller values mean less attenuation, with zero meaning that angle of incidence has no effect at all on the brightness. Default 0.5"
  297.  
  298. _dirt(integer) : "Dirt mapping (AO)" : -1 : "1 enables dirtmapping (ambient occlusion) on all lights, borrowed from q3map2. This adds shadows to corners and crevices. You can override the global setting for specific lights with the _dirt light entity key or _sunlight_dirt, _sunlight2_dirt, and _minlight_dirt worldspawn keys. Default is no dirtmapping (-1)"
  299.  
  300. _sunlight_dirt(integer) : "Sunlight dirt" : -1 : "1 enables dirtmapping (ambient occlusion) on sunlight, -1 to disable (making it illuminate the dirtmapping shadows). Default is to use the value of '_dirt'"
  301.  
  302. _sunlight2_dirt(integer) : "Sublight 2 dirt" : -1 : "1 enables dirtmapping (ambient occlusion) on sunlight2, -1 to disable. Default is to use the value of '_dirt'"
  303.  
  304. _minlight_dirt(integer) : "Minlight dirt" : -1 : "1 enables dirtmapping (ambient occlusion) on minlight, -1 to disable. Default is to use the value of '_dirt'"
  305.  
  306. _dirtmode(integer) : "Dirt mode" : 0 : "Choose between ordered (0, default) and randomized (1) dirtmapping."
  307.  
  308. _dirtdepth(integer) : "Dirt depth" : 128 : "Maximum depth of occlusion checking for dirtmapping, default 128."
  309.  
  310. _dirtscale(integer) : "Dirt scale" : 1 : "Scale factor used in dirt calculations, default 1. Lower values (e.g. 0.5) make the dirt fainter, 2.0 would create much darker shadows"
  311.  
  312. _dirtgain(integer) : "Dirt gain" : 1 : "Exponent used in dirt calculation, default 1. Lower values (e.g. 0.5) make the shadows darker and stretch further away from corners"
  313.  
  314. _gamma(integer) : "Lightmap gamma" : 1 : "Adjust brightness of final lightmap. Default 1, >1 is brighter, <1 is darker"
  315.  
  316. fog(string) : "Fog Command" : : "ENGINE only 'console command' for setting fog parameters, Density/R/G/B example = (0.05 0.3 0.3 0.3)."
  317.  
  318. fog_density(string) : "Fog Density example = (0.05)"
  319.  
  320. fog_color(string) : "Fog Color R/G/B example = (0.3 0.3 0.3)"
  321.  
  322. sky(string) : "Sky Texture" : : "Must have compatible skybox textures in gfx/env folder."
  323. */
  324. //=======================
  325. void() worldspawn =
  326. {
  327. DetectKnownRelease ();
  328.  
  329. InitNewSpawnflags (); // new spawnflags for all entities -- iw
  330.  
  331. lastspawn = world;
  332. InitBodyQue ();
  333. //JIM
  334. //InitBulletHoles();
  335. // custom map attributes
  336. if (self.model == "maps/e1m8.bsp")
  337. cvar_set ("sv_gravity", "100");
  338. else
  339. cvar_set ("sv_gravity", "800");
  340.  
  341. cutscene = 0; // No cutscene is active during worldspawn. Drake -- dumptruck_ds
  342.  
  343. world_sounds = &world.sounds; //Spike via dumptruck_ds || not read-only yet...
  344.  
  345. // the area based ambient sounds MUST be the first precache_sounds
  346.  
  347. // player precaches
  348. W_Precache (); // get weapon precaches
  349. RunePrecache(); // precache the runes
  350.  
  351. // sounds used from C physics code
  352. precache_sound_land ("demon/dland2.wav"); // landing thud
  353. precache_sound ("misc/h2ohit1.wav"); // landing splash
  354.  
  355. // setup precaches always needed
  356. precache_sound ("items/itembk2.wav"); // item respawn sound
  357. precache_sound ("player/plyrjmp8.wav"); // player jump
  358. precache_sound ("items/jboots_plyrjmp1.wav"); //player airjump with jboots jcr
  359. precache_sound ("items/jboots_plyrjmp0.wav"); //player jump with jboots
  360. precache_sound ("items/jboots_got.wav"); // got the jump boots
  361. precache_sound ("items/jboots_got_timed.wav"); // got the timed jump boots
  362. precache_sound ("items/jboots_dry.wav"); // empty jump boots
  363. precache_sound ("items/jboots_g_charge.wav"); // timed jump boot powerup
  364. precache_sound ("items/jboots_timed.wav"); // timed jump boot powerup from grappling
  365. precache_sound ("player/land.wav"); // player landing
  366. precache_sound ("player/land2.wav"); // player hurt landing
  367. precache_sound ("player/drown1.wav"); // drowning pain
  368. precache_sound ("player/drown2.wav"); // drowning pain
  369. precache_sound ("player/gasp1.wav"); // gasping for air
  370. precache_sound ("player/gasp2.wav"); // taking breath
  371. precache_sound ("player/h2odeath.wav"); // drowning death
  372.  
  373. precache_sound ("misc/talk.wav"); // talk
  374. precache_sound ("player/teledth1.wav"); // telefrag
  375. precache_sound ("misc/r_tele1.wav"); // teleport sounds
  376. precache_sound ("misc/r_tele2.wav");
  377. precache_sound ("misc/r_tele3.wav");
  378. precache_sound ("misc/r_tele4.wav");
  379. precache_sound ("misc/r_tele5.wav");
  380. precache_sound ("weapons/lock4.wav"); // ammo pick up
  381. precache_sound ("weapons/pkup.wav"); // weapon up
  382. precache_sound ("items/armor1.wav"); // armor up
  383. precache_sound ("weapons/lhit.wav"); //lightning
  384. precache_sound ("weapons/lstart.wav"); //lightning start
  385.  
  386. // iw -- fix powerup cheat sounds // noticed this in Copper so why not? --ds
  387. // sounds used by cheats
  388. precache_sound ("items/suit2.wav"); // suit (finish)
  389. precache_sound ("items/protect2.wav"); // pent (finish)
  390. precache_sound ("items/protect3.wav"); // pent (protect)
  391. precache_sound ("items/inv2.wav"); // ring (finish)
  392. precache_sound ("items/inv3.wav"); // ring (idle)
  393. precache_sound ("items/damage2.wav"); // quad (finish)
  394. precache_sound ("items/damage3.wav"); // quad (attack)
  395. // iw -- END
  396.  
  397. precache_sound ("misc/power.wav"); //lightning for boss
  398.  
  399. // player gib sounds
  400. precache_sound ("player/gib.wav"); // player gib sound
  401. precache_sound ("player/udeath.wav"); // player gib sound
  402. precache_sound ("player/tornoff2.wav"); // gib sound
  403.  
  404. // player pain sounds
  405.  
  406. precache_sound ("player/pain1.wav");
  407. precache_sound ("player/pain2.wav");
  408. precache_sound ("player/pain3.wav");
  409. precache_sound ("player/pain4.wav");
  410. precache_sound ("player/pain5.wav");
  411. precache_sound ("player/pain6.wav");
  412.  
  413. // player death sounds
  414. precache_sound ("player/death1.wav");
  415. precache_sound ("player/death2.wav");
  416. precache_sound ("player/death3.wav");
  417. precache_sound ("player/death4.wav");
  418. precache_sound ("player/death5.wav");
  419.  
  420. // ax sounds
  421. precache_sound ("weapons/ax1.wav"); // ax swoosh
  422. precache_sound ("player/axhit1.wav"); // ax hit meat
  423. precache_sound ("player/axhit2.wav"); // ax hit world
  424.  
  425. precache_sound ("player/h2ojump.wav"); // player jumping into water
  426. precache_sound ("player/slimbrn2.wav"); // player enter slime
  427. precache_sound ("player/inh2o.wav"); // player enter water
  428. precache_sound ("player/inlava.wav"); // player enter lava
  429. precache_sound ("misc/outwater.wav"); // leaving water sound
  430.  
  431. precache_sound ("player/lburn1.wav"); // lava burn
  432. precache_sound ("player/lburn2.wav"); // lava burn
  433.  
  434. precache_sound ("misc/water1.wav"); // swimming
  435. precache_sound ("misc/water2.wav"); // swimming
  436.  
  437. // PGM Addition Sounds
  438. precache_sound ("enforcer/enfstop.wav"); // shield impact
  439. precache_sound ("plasma/explode.wav");
  440. precache_sound ("plasma/flight.wav");
  441. precache_sound ("plasma/fire.wav");
  442. precache_sound ("shield/hit.wav");
  443. precache_sound ("belt/use.wav");
  444. precache_sound ("items/damage2.wav");
  445.  
  446.  
  447. //MED 10/21/96 added flies sound
  448. precache_sound ("misc/flys.wav");
  449. //MED 01/13/97 added explosion sounds
  450. precache_sound ("misc/shortexp.wav");
  451. precache_sound ("misc/longexpl.wav");
  452. precache_sound ("misc/foot1.wav");
  453. precache_sound ("misc/foot2.wav");
  454. precache_sound ("misc/foot3.wav");
  455. precache_sound ("misc/foot4.wav");
  456. precache_sound ("misc/foot5.wav");
  457. precache_sound ("misc/foot6.wav");
  458. precache_sound ("misc/foot7.wav");
  459.  
  460. precache_model ("progs/player.mdl");
  461. precache_model ("progs/s_null.spr"); // Invisible -- Drake -- dumptruck_ds
  462. // precache_model ("progs/null_256.spr"); // Invisible -- Drake -- dumptruck_ds
  463. precache_model ("progs/eyes.mdl");
  464. precache_model ("progs/h_player.mdl");
  465. //MED 12/03/96 added player with hammer
  466. precache_model ("progs/playham.mdl");
  467. precache_model ("progs/gib1.mdl");
  468. precache_model ("progs/gib2.mdl");
  469. precache_model ("progs/gib3.mdl");
  470.  
  471. precache_model ("progs/s_bubble.spr"); // drowning bubbles
  472. precache_model ("progs/s_explod.spr"); // sprite explosion
  473.  
  474. precache_model ("progs/v_axe.mdl");
  475. precache_model ("progs/v_shot.mdl");
  476. precache_model ("progs/v_nail.mdl");
  477. precache_model ("progs/v_rock.mdl");
  478. precache_model ("progs/v_shot2.mdl");
  479. precache_model ("progs/v_nail2.mdl");
  480. precache_model ("progs/v_rock2.mdl");
  481.  
  482. // Lava Gun models - pgm change
  483. precache_model ("progs/v_lava.mdl");
  484. precache_model ("progs/v_lava2.mdl");
  485. precache_model ("progs/v_multi.mdl");
  486. precache_model ("progs/v_multi2.mdl");
  487.  
  488.  
  489. //MED 10/31/96 added precache for hip view models
  490. precache_model ("progs/v_laserg.mdl");
  491. precache_model ("progs/v_laserr.mdl");
  492. precache_model ("progs/v_railg.mdl");
  493. precache_model ("progs/v_hammer.mdl");
  494. precache_model ("progs/throwham.mdl");
  495. precache_model ("progs/v_hammerpw.mdl");
  496. precache_model ("progs/v_prox.mdl");
  497. precache_model ("progs/proxbomb.mdl");
  498.  
  499. precache_model ("progs/bolt.mdl"); // for lightning gun
  500. precache_model ("progs/bolt2.mdl"); // for lightning gun
  501. precache_model ("progs/bolt3.mdl"); // for boss shock
  502. precache_model ("progs/lavaball.mdl"); // for testing
  503. //MED 10/18/96 added precache for laser cannon
  504. precache_model ("progs/lasrspik.mdl");
  505.  
  506. precache_model ("progs/missile.mdl");
  507. precache_model ("progs/grenade.mdl");
  508. precache_model ("progs/spike.mdl");
  509. // dumptruck_ds added w_spike due to errors
  510. // with custom_mdls in precache_proj_model in wizard.qc
  511. // precache_model ("progs/w_spike.mdl");
  512. // this is on hold for now head and body are working
  513.  
  514. // PGM addition
  515. precache_model ("progs/mervup.mdl");
  516. precache_model ("progs/rockup.mdl");
  517. precache_model ("progs/rockup_d.mdl");
  518. precache_model ("progs/lspike.mdl");
  519. precache_model ("progs/shield.mdl");
  520. precache_model ("progs/p_shield.mdl");
  521. precache_model ("progs/s_spike.mdl");
  522.  
  523. precache_model ("progs/backpack.mdl");
  524.  
  525. precache_model ("progs/zom_gib.mdl");
  526.  
  527. precache_model ("progs/v_light.mdl");
  528.  
  529. precache_model ("progs/plasma.mdl");
  530. precache_model ("progs/v_plasma.mdl");
  531.  
  532. //ZOID--
  533. // hook for CTF
  534. precache_model ("progs/hook.mdl");
  535. precache_model ("progs/v_grpple3.mdl");
  536. precache_model ("progs/v_grpple2.mdl");
  537. precache_model ("progs/v_grpple1.mdl");
  538. precache_model ("progs/v_grpple0.mdl");
  539. precache_model ("progs/v_grpplesw3.mdl");
  540. precache_model ("progs/v_grpplesw2.mdl");
  541. precache_model ("progs/v_grpplesw1.mdl");
  542. precache_model ("progs/v_grpplesw0.mdl");
  543. precache_sound ("grapple/uncharged.wav");
  544. precache_sound ("grapple/charge.wav");
  545. // precache_model ("progs/bit.mdl");
  546. //--ZOID
  547.  
  548. precache_model ("progs/w_s_key.mdl"); // dumptruck_ds needed for DropStuff
  549. precache_model ("progs/w_g_key.mdl"); //
  550. precache_sound ("misc/medkey.wav");
  551. precache_sound ("misc/runekey.wav");
  552. precache_model ("progs/m_s_key.mdl");
  553. precache_model ("progs/m_g_key.mdl");
  554. precache_sound2 ("misc/basekey.wav");
  555. precache_model2 ("progs/b_s_key.mdl");
  556. precache_model2 ("progs/b_g_key.mdl");
  557. precache_model ("progs/h_mdls/pd_vial.mdl"); // DropVial -- dumptruck_ds
  558. precache_sound ("items/r_item1.wav");
  559. precache_sound ("dump/pd_armor1_sh.wav"); // DropShard -- dumptruck_ds
  560. precache_model ("progs/pd_armor_sh.mdl");
  561.  
  562.  
  563.  
  564. precache_model ("progs/jboots.mdl"); //jboots model jcr
  565. precache_model ("progs/jboots_timed.mdl"); //timed jboots model jcr
  566.  
  567. //
  568. // Setup light animation tables. 'a' is total darkness, 'z' is maxbright.
  569. //
  570.  
  571. // 0 normal
  572. lightstyle(0, "m");
  573.  
  574. // 1 FLICKER (first variety)
  575. lightstyle(1, "mmnmmommommnonmmonqnmmo");
  576.  
  577. // 2 SLOW STRONG PULSE
  578. lightstyle(2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");
  579.  
  580. // 3 CANDLE (first variety)
  581. lightstyle(3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");
  582.  
  583. // 4 FAST STROBE
  584. lightstyle(4, "mamamamamama");
  585.  
  586. // 5 GENTLE PULSE 1
  587. lightstyle(5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj");
  588.  
  589. // 6 FLICKER (second variety)
  590. lightstyle(6, "nmonqnmomnmomomno");
  591.  
  592. // 7 CANDLE (second variety)
  593. lightstyle(7, "mmmaaaabcdefgmmmmaaaammmaamm");
  594.  
  595. // 8 CANDLE (third variety)
  596. lightstyle(8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");
  597.  
  598. // 9 SLOW STROBE (fourth variety)
  599. lightstyle(9, "aaaaaaaazzzzzzzz");
  600.  
  601. // 10 FLUORESCENT FLICKER
  602. lightstyle(10, "mmamammmmammamamaaamammma");
  603.  
  604. // 11 SLOW PULSE NOT FADE TO BLACK
  605. lightstyle(11, "abcdefghijklmnopqrrqponmlkjihgfedcba");
  606.  
  607. // styles 32-62 are assigned by the light program for switchable lights
  608.  
  609. // 63 testing
  610. lightstyle(63, "a");
  611. //MED
  612. if (cvar("crosshair") == 2)
  613. footsteps = 1;
  614. else
  615. footsteps = 0;
  616.  
  617. float ext_active = cvar("pr_checkextension"); // Check for extra extensions
  618. if (ext_active)
  619. {
  620. clientstat(NAILGUNMODE, EV_FLOAT, nailgun_mode);
  621. clientstat(SUPERNAILGUNMODE, EV_FLOAT, super_nailgun_mode);
  622. clientstat(GRENADELAUNCHERMODE, EV_FLOAT, grenade_launcher_mode);
  623. clientstat(ROCKETLAUNCHERMODE, EV_FLOAT, rocket_launcher_mode);
  624. clientstat(LIGHTNINGGUNMODE, EV_FLOAT, lightning_gun_mode);
  625. clientstat(LASERCANNONMODE, EV_FLOAT, laser_cannon_mode);
  626. clientstat(EMPATHYON, EV_FLOAT, empathy_on);
  627. clientstat(WETON, EV_FLOAT, wet_on);
  628. }
  629. };
  630.  
  631. void() StartFrame =
  632. {
  633. if (!done_inhibition_summary) // new spawnflags for all entities -- iw
  634. PrintInhibitionSummary ();
  635.  
  636. // modifiers = cvar("scratch4");
  637.  
  638.  
  639.  
  640. teamplay = cvar("teamplay");
  641. skill = cvar("skill");
  642. framecount = framecount + 1;
  643. };
  644.  
  645. /*
  646. ==============================================================================
  647.  
  648. BODY QUE
  649.  
  650. ==============================================================================
  651. */
  652.  
  653. entity bodyque_head;
  654.  
  655. void() bodyque =
  656. { // just here so spawn functions don't complain after the world
  657. // creates bodyques
  658. };
  659.  
  660. void() InitBodyQue =
  661. {
  662. //local entity e;
  663. bodyque_head = spawn();
  664. bodyque_head.classname = "bodyque";
  665. bodyque_head.owner = spawn();
  666. bodyque_head.owner.classname = "bodyque";
  667. bodyque_head.owner.owner = spawn();
  668. bodyque_head.owner.owner.classname = "bodyque";
  669. bodyque_head.owner.owner.owner = spawn();
  670. bodyque_head.owner.owner.owner.classname = "bodyque";
  671. bodyque_head.owner.owner.owner.owner = bodyque_head;
  672. };
  673.  
  674.  
  675. // make a body que entry for the given ent so the ent can be
  676. // respawned elsewhere
  677. void(entity ent) CopyToBodyQue =
  678. {
  679. bodyque_head.angles = ent.angles;
  680. bodyque_head.model = ent.model;
  681. bodyque_head.modelindex = ent.modelindex;
  682. bodyque_head.frame = ent.frame;
  683. bodyque_head.colormap = ent.colormap;
  684. bodyque_head.movetype = ent.movetype;
  685. bodyque_head.velocity = ent.velocity;
  686. bodyque_head.flags = 0;
  687. setorigin (bodyque_head, ent.origin);
  688. setsize (bodyque_head, ent.mins, ent.maxs);
  689. bodyque_head = bodyque_head.owner;
  690. };
  691.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement