home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / patch / mbq093 / player.qc < prev    next >
Encoding:
Text File  |  1996-08-30  |  19.9 KB  |  775 lines

  1. /*
  2.     Heavily Modified for TeamFortress V1.1
  3.     Robin Walker, John Cook
  4. */
  5. // Prototypes
  6. void() bubble_bob;
  7. void() W_FireAssaultCannon;
  8.  
  9. /*
  10. ==============================================================================
  11.  
  12. PLAYER
  13.  
  14. ==============================================================================
  15. */
  16.  
  17. $cd /raid/quake/id1/models/player_4
  18. $origin 0 -6 24
  19. $base base        
  20. $skin skin
  21.  
  22. //
  23. // running
  24. //
  25. $frame axrun1 axrun2 axrun3 axrun4 axrun5 axrun6
  26.  
  27. $frame rockrun1 rockrun2 rockrun3 rockrun4 rockrun5 rockrun6
  28.  
  29. //
  30. // standing
  31. //
  32. $frame stand1 stand2 stand3 stand4 stand5
  33.  
  34. $frame axstnd1 axstnd2 axstnd3 axstnd4 axstnd5 axstnd6
  35. $frame axstnd7 axstnd8 axstnd9 axstnd10 axstnd11 axstnd12
  36.  
  37.  
  38. //
  39. // pain
  40. //
  41. $frame axpain1 axpain2 axpain3 axpain4 axpain5 axpain6
  42.  
  43. $frame pain1 pain2 pain3 pain4 pain5 pain6
  44.  
  45.  
  46. //
  47. // death
  48. //
  49.  
  50. $frame axdeth1 axdeth2 axdeth3 axdeth4 axdeth5 axdeth6
  51. $frame axdeth7 axdeth8 axdeth9
  52.  
  53. $frame deatha1 deatha2 deatha3 deatha4 deatha5 deatha6 deatha7 deatha8
  54. $frame deatha9 deatha10 deatha11
  55.  
  56. $frame deathb1 deathb2 deathb3 deathb4 deathb5 deathb6 deathb7 deathb8
  57. $frame deathb9
  58.  
  59. $frame deathc1 deathc2 deathc3 deathc4 deathc5 deathc6 deathc7 deathc8
  60. $frame deathc9 deathc10 deathc11 deathc12 deathc13 deathc14 deathc15
  61.  
  62. $frame deathd1 deathd2 deathd3 deathd4 deathd5 deathd6 deathd7
  63. $frame deathd8 deathd9
  64.  
  65. $frame deathe1 deathe2 deathe3 deathe4 deathe5 deathe6 deathe7
  66. $frame deathe8 deathe9
  67.  
  68. //
  69. // attacks
  70. //
  71. $frame nailatt1 nailatt2
  72.  
  73. $frame light1 light2
  74.  
  75. $frame rockatt1 rockatt2 rockatt3 rockatt4 rockatt5 rockatt6
  76.  
  77. $frame shotatt1 shotatt2 shotatt3 shotatt4 shotatt5 shotatt6
  78.  
  79. $frame axatt1 axatt2 axatt3 axatt4 axatt5 axatt6
  80.  
  81. $frame axattb1 axattb2 axattb3 axattb4 axattb5 axattb6
  82.  
  83. $frame axattc1 axattc2 axattc3 axattc4 axattc5 axattc6
  84.  
  85. $frame axattd1 axattd2 axattd3 axattd4 axattd5 axattd6
  86.  
  87.  
  88. /*
  89. ==============================================================================
  90. PLAYER
  91. ==============================================================================
  92. */
  93.  
  94. void() player_run;
  95.  
  96. void()    player_stand1 =[    $axstnd1,    player_stand1    ]
  97. {
  98.     self.weaponframe=0;
  99.     if (self.velocity_x || self.velocity_y)
  100.     {
  101.         self.walkframe=0;
  102.         player_run();
  103.         return;
  104.     }
  105.  
  106.     if (self.weapon == IT_AXE)
  107.     {
  108.         if (self.walkframe >= 12)
  109.             self.walkframe = 0;
  110.         self.frame = $axstnd1 + self.walkframe;
  111.     }
  112.     else
  113.     {
  114.         if (self.walkframe >= 5)
  115.             self.walkframe = 0;
  116.         self.frame = $stand1 + self.walkframe;
  117.     }
  118.     self.walkframe = self.walkframe + 1;    
  119. };
  120.  
  121. void()    player_run =[    $rockrun1,    player_run    ]
  122. {
  123.     self.weaponframe=0;
  124.     if (!self.velocity_x && !self.velocity_y)
  125.     {
  126.         self.walkframe=0;
  127.         player_stand1();
  128.         return;
  129.     }
  130.  
  131.     if (self.weapon == IT_AXE)
  132.     {
  133.         if (self.walkframe == 6)
  134.             self.walkframe = 0;
  135.         self.frame = $axrun1 + self.walkframe;
  136.     }
  137.     else
  138.     {
  139.         if (self.walkframe == 6)
  140.             self.walkframe = 0;
  141.         self.frame = self.frame + self.walkframe;
  142.     }
  143.     self.walkframe = self.walkframe + 1;
  144. };
  145.  
  146.  
  147. void()    player_shot1 =    [$shotatt1, player_shot2    ] {self.weaponframe=1;
  148. self.effects = self.effects | EF_MUZZLEFLASH;};
  149. void()    player_shot2 =    [$shotatt2, player_shot3    ] {self.weaponframe=2;};
  150. void()    player_shot3 =    [$shotatt3, player_shot4    ] {self.weaponframe=3;};
  151. void()    player_shot4 =    [$shotatt4, player_shot5    ] {self.weaponframe=4;};
  152. void()    player_shot5 =    [$shotatt5, player_shot6    ] {self.weaponframe=5;};
  153. void()    player_shot6 =    [$shotatt6, player_run    ] {self.weaponframe=6;};
  154.  
  155. void()    player_autorifle1 =    [$shotatt1, player_autorifle2    ] {self.weaponframe=1;
  156. self.effects = self.effects | EF_MUZZLEFLASH;};
  157. void()    player_autorifle2 =    [$shotatt2, player_autorifle3    ] {self.weaponframe=2;};
  158. void()    player_autorifle3 =    [$shotatt6, player_run    ] {self.weaponframe=6;};
  159.  
  160. void()    player_axe1 =    [$axatt1, player_axe2    ] {self.weaponframe=1;};
  161. void()    player_axe2 =    [$axatt2, player_axe3    ] {self.weaponframe=2;};
  162. void()    player_axe3 =    [$axatt3, player_axe4    ] {self.weaponframe=3;W_FireAxe();};
  163. void()    player_axe4 =    [$axatt4, player_run    ] {self.weaponframe=4;};
  164.  
  165. void()    player_axeb1 =    [$axattb1, player_axeb2    ] {self.weaponframe=5;};
  166. void()    player_axeb2 =    [$axattb2, player_axeb3    ] {self.weaponframe=6;};
  167. void()    player_axeb3 =    [$axattb3, player_axeb4    ] {self.weaponframe=7;W_FireAxe();};
  168. void()    player_axeb4 =    [$axattb4, player_run    ] {self.weaponframe=8;};
  169.  
  170. void()    player_axec1 =    [$axattc1, player_axec2    ] {self.weaponframe=1;};
  171. void()    player_axec2 =    [$axattc2, player_axec3    ] {self.weaponframe=2;};
  172. void()    player_axec3 =    [$axattc3, player_axec4    ] {self.weaponframe=3;W_FireAxe();};
  173. void()    player_axec4 =    [$axattc4, player_run    ] {self.weaponframe=4;};
  174.  
  175. void()    player_axed1 =    [$axattd1, player_axed2    ] {self.weaponframe=5;};
  176. void()    player_axed2 =    [$axattd2, player_axed3    ] {self.weaponframe=6;};
  177. void()    player_axed3 =    [$axattd3, player_axed4    ] {self.weaponframe=7;W_FireAxe();};
  178. void()    player_axed4 =    [$axattd4, player_run    ] {self.weaponframe=8;};
  179.  
  180.  
  181. //============================================================================
  182.  
  183. void() player_nail1   =[$nailatt1, player_nail2  ] 
  184. {
  185.     self.effects = self.effects | EF_MUZZLEFLASH;
  186.  
  187.     if (!self.button0)
  188.         {player_run ();return;}
  189.     self.weaponframe = self.weaponframe + 1;
  190.     if (self.weaponframe == 9)
  191.         self.weaponframe = 1;
  192.     SuperDamageSound();
  193.     W_FireSpikes (4);
  194.     self.attack_finished = time + 0.2;
  195. };
  196. void() player_nail2   =[$nailatt2, player_nail1  ]
  197. {
  198.     self.effects = self.effects | EF_MUZZLEFLASH;
  199.  
  200.     if (!self.button0)
  201.         {player_run ();return;}
  202.     self.weaponframe = self.weaponframe + 1;
  203.     if (self.weaponframe == 9)
  204.         self.weaponframe = 1;
  205.     SuperDamageSound();
  206.     W_FireSpikes (-4);
  207.     self.attack_finished = time + 0.2;
  208. };
  209.  
  210. //============================================================================
  211.  
  212. void() player_assaultcannon1   =[$nailatt1, player_assaultcannon2  ] 
  213. {
  214.     local string st;
  215.  
  216.     self.effects = self.effects | EF_MUZZLEFLASH;
  217.  
  218.     if ((!self.button0) || (self.ammo_shells < 1))
  219.     {
  220.         // Let him/her walk again
  221.         self.movetype = MOVETYPE_WALK;
  222.         stuffcmd(self, "v_idlescale 0\n");
  223.  
  224.         // Cool
  225.          sprint(self, "cooling...\n");
  226.         self.cooling = spawn();
  227.         self.cooling.owner = self;
  228.         self.cooling.nextthink = time + (self.heat * 4);
  229.         self.cooling.think = W_Cool_assault_cannon;
  230.  
  231.         self.weapon = W_BestWeapon ();
  232.         W_SetCurrentAmmo ();
  233.  
  234.         player_run ();
  235.         return;
  236.     }
  237.  
  238.     self.weaponframe = self.weaponframe + 1;
  239.     if (self.weaponframe == 9)
  240.         self.weaponframe = 1;
  241.     SuperDamageSound();
  242.     W_FireAssaultCannon();
  243.  
  244.     stuffcmd(self, "v_idlescale ");
  245.     if (self.heat < 5)
  246.         st = ftos(self.heat * 4);
  247.     else
  248.         st = "20";
  249.     stuffcmd(self, st);
  250.     stuffcmd(self, "\n");
  251.     self.attack_finished = time + 0.1;
  252. };
  253.  
  254. void() player_assaultcannon2   =[$nailatt2, player_assaultcannon1  ]
  255. {
  256.     local string st;
  257.  
  258.     self.effects = self.effects | EF_MUZZLEFLASH;
  259.  
  260.     if ((!self.button0) || (self.ammo_shells < 1))
  261.     {
  262.         // Let him/her walk again
  263.         self.movetype = MOVETYPE_WALK;
  264.         stuffcmd(self, "v_idlescale 0\n");
  265.  
  266.         // Cool
  267.          sprint(self, "cooling...\n");
  268.         self.cooling = spawn();
  269.         self.cooling.owner = self;
  270.         self.cooling.nextthink = time + (self.heat * 4);
  271.         self.cooling.think = W_Cool_assault_cannon;
  272.  
  273.         self.weapon = W_BestWeapon ();
  274.         W_SetCurrentAmmo ();
  275.  
  276.         player_run ();
  277.         return;
  278.     }
  279.  
  280.     self.weaponframe = self.weaponframe + 1;
  281.     if (self.weaponframe == 9)
  282.         self.weaponframe = 1;
  283.     SuperDamageSound();
  284.     W_FireAssaultCannon();
  285.  
  286.     // increase the heat of the cannon
  287.     self.heat = self.heat + 0.1;
  288.     stuffcmd(self, "v_idlescale 0\n");
  289.     stuffcmd(self, "bf\n");
  290.     self.attack_finished = time + 0.1;
  291. };
  292.  
  293. //============================================================================
  294.  
  295. void() player_light1   =[$light1, player_light2  ] 
  296. {
  297.     self.effects = self.effects | EF_MUZZLEFLASH;
  298.  
  299.     if (!self.button0)
  300.         {player_run ();return;}
  301.     self.weaponframe = self.weaponframe + 1;
  302.     if (self.weaponframe == 5)
  303.         self.weaponframe = 1;
  304.     SuperDamageSound();
  305.     W_FireLightning();
  306.     self.attack_finished = time + 0.2;
  307. };
  308. void() player_light2   =[$light2, player_light1  ]
  309. {
  310.     self.effects = self.effects | EF_MUZZLEFLASH;
  311.  
  312.     if (!self.button0)
  313.         {player_run ();return;}
  314.     self.weaponframe = self.weaponframe + 1;
  315.     if (self.weaponframe == 5)
  316.         self.weaponframe = 1;
  317.     SuperDamageSound();
  318.     W_FireLightning();
  319.     self.attack_finished = time + 0.2;
  320. };
  321.  
  322. //============================================================================
  323.  
  324.  
  325. void() player_rocket1   =[$rockatt1, player_rocket2  ] {self.weaponframe=1;
  326. self.effects = self.effects | EF_MUZZLEFLASH;};
  327. void() player_rocket2   =[$rockatt2, player_rocket3  ] {self.weaponframe=2;};
  328. void() player_rocket3   =[$rockatt3, player_rocket4  ] {self.weaponframe=3;};
  329. void() player_rocket4   =[$rockatt4, player_rocket5  ] {self.weaponframe=4;};
  330. void() player_rocket5   =[$rockatt5, player_rocket6  ] {self.weaponframe=5;};
  331. void() player_rocket6   =[$rockatt6, player_run  ] {self.weaponframe=6;};
  332. void(float num_bubbles) DeathBubbles;
  333.  
  334. void() PainSound =
  335. {
  336. local float        rs;
  337.  
  338.     if (self.health < 0)
  339.         return;
  340.  
  341.     if (damage_attacker.classname == "teledeath")
  342.     {
  343.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  344.         return;
  345.     }
  346.  
  347. // water pain sounds
  348.     if (self.watertype == CONTENT_WATER && self.waterlevel == 3)
  349.     {
  350.         DeathBubbles(1);
  351.         if (random() > 0.5)
  352.             sound (self, CHAN_VOICE, "player/drown1.wav", 1, ATTN_NORM);
  353.         else
  354.             sound (self, CHAN_VOICE, "player/drown2.wav", 1, ATTN_NORM);
  355.         return;
  356.     }
  357.  
  358. // slime pain sounds
  359.     if (self.watertype == CONTENT_SLIME)
  360.     {
  361. // FIX ME    put in some steam here
  362.         if (random() > 0.5)
  363.             sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  364.         else
  365.             sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
  366.         return;
  367.     }
  368.  
  369.     if (self.watertype == CONTENT_LAVA)
  370.     {
  371.         if (random() > 0.5)
  372.             sound (self, CHAN_VOICE, "player/lburn1.wav", 1, ATTN_NORM);
  373.         else
  374.             sound (self, CHAN_VOICE, "player/lburn2.wav", 1, ATTN_NORM);
  375.         return;
  376.     }
  377.  
  378.     if (self.pain_finished > time)
  379.     {
  380.         self.axhitme = 0;
  381.         return;
  382.     }
  383.     self.pain_finished = time + 0.5;
  384.  
  385. // don't make multiple pain sounds right after each other
  386.  
  387. // ax pain sound
  388.     if (self.axhitme == 1)
  389.     {
  390.         self.axhitme = 0;
  391.         sound (self, CHAN_VOICE, "player/axhit1.wav", 1, ATTN_NORM);
  392.         return;
  393.     }
  394.     
  395.  
  396.     rs = rint((random() * 5) + 1);
  397.  
  398.     self.noise = "";
  399.     if (rs == 1)
  400.         self.noise = "player/pain1.wav";
  401.     else if (rs == 2)
  402.         self.noise = "player/pain2.wav";
  403.     else if (rs == 3)
  404.         self.noise = "player/pain3.wav";
  405.     else if (rs == 4)
  406.         self.noise = "player/pain4.wav";
  407.     else if (rs == 5)
  408.         self.noise = "player/pain5.wav";
  409.     else
  410.         self.noise = "player/pain6.wav";
  411.  
  412.     sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);
  413.     return;
  414. };
  415.  
  416. void()    player_pain1 =    [    $pain1,    player_pain2    ] {PainSound();self.weaponframe=0;};
  417. void()    player_pain2 =    [    $pain2,    player_pain3    ] {};
  418. void()    player_pain3 =    [    $pain3,    player_pain4    ] {};
  419. void()    player_pain4 =    [    $pain4,    player_pain5    ] {};
  420. void()    player_pain5 =    [    $pain5,    player_pain6    ] {};
  421. void()    player_pain6 =    [    $pain6,    player_run    ] {};
  422.  
  423. void()    player_axpain1 =    [    $axpain1,    player_axpain2    ] {PainSound();self.weaponframe=0;};
  424. void()    player_axpain2 =    [    $axpain2,    player_axpain3    ] {};
  425. void()    player_axpain3 =    [    $axpain3,    player_axpain4    ] {};
  426. void()    player_axpain4 =    [    $axpain4,    player_axpain5    ] {};
  427. void()    player_axpain5 =    [    $axpain5,    player_axpain6    ] {};
  428. void()    player_axpain6 =    [    $axpain6,    player_run    ] {};
  429.  
  430. void() player_pain =
  431. {
  432.     if (self.weaponframe)
  433.         return;
  434.  
  435.     if (self.invisible_finished > time)
  436.         return;        // eyes don't have pain frames
  437.  
  438.     if (self.weapon == IT_AXE)
  439.         player_axpain1 ();
  440.     else
  441.         player_pain1 ();
  442. };
  443.  
  444. void() player_diea1;
  445. void() player_dieb1;
  446. void() player_diec1;
  447. void() player_died1;
  448. void() player_diee1;
  449. void() player_die_ax1;
  450.  
  451. void() DeathBubblesSpawn =
  452. {
  453. local entity    bubble;
  454.     if (self.owner.waterlevel != 3)
  455.         return;
  456.     bubble = spawn();
  457.     setmodel (bubble, "progs/s_bubble.spr");
  458.     setorigin (bubble, self.owner.origin + '0 0 24');
  459.     bubble.movetype = MOVETYPE_NOCLIP;
  460.     bubble.solid = SOLID_NOT;
  461.     bubble.velocity = '0 0 15';
  462.     bubble.nextthink = time + 0.5;
  463.     bubble.think = bubble_bob;
  464.     bubble.classname = "bubble";
  465.     bubble.frame = 0;
  466.     bubble.cnt = 0;
  467.     setsize (bubble, '-8 -8 -8', '8 8 8');
  468.     self.nextthink = time + 0.1;
  469.     self.think = DeathBubblesSpawn;
  470.     self.air_finished = self.air_finished + 1;
  471.     if (self.air_finished >= self.bubble_count)
  472.         remove(self);
  473. };
  474.  
  475. void(float num_bubbles) DeathBubbles =
  476. {
  477. local entity    bubble_spawner;
  478.     
  479.     bubble_spawner = spawn();
  480.     setorigin (bubble_spawner, self.origin);
  481.     bubble_spawner.movetype = MOVETYPE_NONE;
  482.     bubble_spawner.solid = SOLID_NOT;
  483.     bubble_spawner.nextthink = time + 0.1;
  484.     bubble_spawner.think = DeathBubblesSpawn;
  485.     bubble_spawner.air_finished = 0;
  486.     bubble_spawner.owner = self;
  487.     bubble_spawner.bubble_count = num_bubbles;
  488.     return;
  489. };
  490.  
  491.  
  492. void() DeathSound =
  493. {
  494. local float        rs;
  495.  
  496.     // water death sounds
  497.     if (self.waterlevel == 3)
  498.     {
  499.         DeathBubbles(20);
  500.         sound (self, CHAN_VOICE, "player/h2odeath.wav", 1, ATTN_NONE);
  501.         return;
  502.     }
  503.     
  504.     rs = rint ((random() * 4) + 1);
  505.     if (rs == 1)
  506.         self.noise = "player/death1.wav";
  507.     if (rs == 2)
  508.         self.noise = "player/death2.wav";
  509.     if (rs == 3)
  510.         self.noise = "player/death3.wav";
  511.     if (rs == 4)
  512.         self.noise = "player/death4.wav";
  513.     if (rs == 5)
  514.         self.noise = "player/death5.wav";
  515.  
  516.     sound (self, CHAN_VOICE, self.noise, 1, ATTN_NONE);
  517.     return;
  518. };
  519.  
  520.  
  521. void() PlayerDead =
  522. {
  523.     self.nextthink = -1;
  524. // allow respawn after a certain time
  525.     self.deadflag = DEAD_DEAD;
  526. };
  527.  
  528. vector(float dm) VelocityForDamage =
  529. {
  530.     local vector v;
  531.  
  532.     v_x = 100 * crandom();
  533.     v_y = 100 * crandom();
  534.     v_z = 200 + 100 * random();
  535.  
  536.     if (dm > -50)
  537.     {
  538. //        dprint ("level 1\n");
  539.         v = v * 0.7;
  540.     }
  541.     else if (dm > -200)
  542.     {
  543. //        dprint ("level 3\n");
  544.         v = v * 2;
  545.     }
  546.     else
  547.         v = v * 10;
  548.  
  549.     return v;
  550. };
  551.  
  552. void(string gibname, float dm) ThrowGib =
  553. {
  554.     local    entity new;
  555.  
  556.     new = spawn();
  557.     new.origin = self.origin;
  558.     setmodel (new, gibname);
  559.     setsize (new, '0 0 0', '0 0 0');
  560.     new.velocity = VelocityForDamage (dm);
  561.     new.movetype = MOVETYPE_BOUNCE;
  562.     new.solid = SOLID_NOT;
  563.     new.avelocity_x = random()*600;
  564.     new.avelocity_y = random()*600;
  565.     new.avelocity_z = random()*600;
  566.     new.think = SUB_Remove;
  567.     new.ltime = time;
  568.     new.nextthink = time + 10 + random()*10;
  569.     new.frame = 0;
  570.     new.flags = 0;
  571. };
  572.  
  573. void(string gibname, float dm) ThrowHead =
  574. {
  575.     setmodel (self, gibname);
  576.     self.frame = 0;
  577.     self.nextthink = -1;
  578.     self.movetype = MOVETYPE_BOUNCE;
  579.     self.takedamage = DAMAGE_NO;
  580.     self.solid = SOLID_NOT;
  581.     self.view_ofs = '0 0 8';
  582.     setsize (self, '-16 -16 0', '16 16 56');
  583.     self.velocity = VelocityForDamage (dm);
  584.     self.origin_z = self.origin_z - 24;
  585.     self.flags = self.flags - (self.flags & FL_ONGROUND);
  586.     self.avelocity = crandom() * '0 600 0';
  587. };
  588.  
  589.  
  590. void() GibPlayer =
  591. {
  592.     ThrowHead ("progs/h_player.mdl", self.health);
  593.     ThrowGib ("progs/gib1.mdl", self.health);
  594.     ThrowGib ("progs/gib2.mdl", self.health);
  595.     ThrowGib ("progs/gib3.mdl", self.health);
  596.  
  597.     self.deadflag = DEAD_DEAD;
  598.  
  599.     if (damage_attacker.classname == "teledeath")
  600.     {
  601.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  602.         return;
  603.     }
  604.  
  605.     if (damage_attacker.classname == "teledeath2")
  606.     {
  607.         sound (self, CHAN_VOICE, "player/teledth1.wav", 1, ATTN_NONE);
  608.         return;
  609.     }
  610.         
  611.     if (random() < 0.5)
  612.         sound (self, CHAN_VOICE, "player/gib.wav", 1, ATTN_NONE);
  613.     else
  614.         sound (self, CHAN_VOICE, "player/udeath.wav", 1, ATTN_NONE);
  615. };
  616.  
  617. void() PlayerDie =
  618. {
  619.     local    float    i;
  620.     
  621.     self.items = self.items - (self.items & IT_INVISIBILITY);
  622.     self.invisible_finished = 0;    // don't die as eyes
  623.     self.invincible_finished = 0;
  624.     self.super_damage_finished = 0;
  625.     self.radsuit_finished = 0;
  626.     self.modelindex = modelindex_player;    // don't use eyes
  627.  
  628.     if (self.Weapon)
  629.         remove(self.Weapon);
  630.     if (self.cooling)
  631.         remove(self.cooling);
  632.     if (self.cyclictimer)
  633.         remove(self.cyclictimer);
  634.     if (self.Grenade)
  635.         remove(self.Grenade);
  636.     if (self.detpack)
  637.         remove(self.detpack);
  638.     if (self.cheattimer)
  639.         remove(self.cheattimer);
  640.     if (self.concusstimer)
  641.         remove(self.concusstimer);
  642.  
  643.     self.reload_shotgun = 0;
  644.     self.reload_super_shotgun = 0;
  645.     self.reload_grenade_launcher = 0;
  646.     self.reload_rocket_launcher = 0;
  647.     self.grenadeprimed = 0;
  648.     self.reloading = 0;
  649.  
  650.     if (deathmatch || coop)
  651.         DropBackpack();
  652.     
  653.     self.weaponmodel="";
  654.     self.view_ofs = '0 0 -8';
  655.     self.deadflag = DEAD_DYING;
  656.     self.solid = SOLID_NOT;
  657.     self.flags = self.flags - (self.flags & FL_ONGROUND);
  658.     self.movetype = MOVETYPE_TOSS;
  659.     if (self.velocity_z < 10)
  660.         self.velocity_z = self.velocity_z + random()*300;
  661.  
  662.     if (self.health < -40)
  663.     {
  664.         GibPlayer ();
  665.         return;
  666.     }
  667.  
  668.     DeathSound();
  669.     
  670.     self.angles_x = 0;
  671.     self.angles_z = 0;
  672.  
  673.     if (self.weapon == IT_AXE)
  674.     {
  675.         player_die_ax1 ();
  676.         return;
  677.     }
  678.     
  679.     i = cvar("temp1");
  680.     if (!i)
  681.         i = 1 + floor(random()*6);
  682.     
  683.     if (i == 1)
  684.         player_diea1();
  685.     else if (i == 2)
  686.         player_dieb1();
  687.     else if (i == 3)
  688.         player_diec1();
  689.     else if (i == 4)
  690.         player_died1();
  691.     else
  692.         player_diee1();
  693.  
  694. };
  695.  
  696. void() set_suicide_frame =
  697. {    // used by kill command and diconnect command
  698.     if (self.model != "progs/player.mdl")
  699.         return;    // allready gibbed
  700.     self.frame = $deatha11;
  701.     self.solid = SOLID_NOT;
  702.     self.movetype = MOVETYPE_TOSS;
  703.     self.deadflag = DEAD_DEAD;
  704.     self.nextthink = -1;
  705. };
  706.  
  707.  
  708. void()    player_diea1    =    [    $deatha1,    player_diea2    ] {};
  709. void()    player_diea2    =    [    $deatha2,    player_diea3    ] {};
  710. void()    player_diea3    =    [    $deatha3,    player_diea4    ] {};
  711. void()    player_diea4    =    [    $deatha4,    player_diea5    ] {};
  712. void()    player_diea5    =    [    $deatha5,    player_diea6    ] {};
  713. void()    player_diea6    =    [    $deatha6,    player_diea7    ] {};
  714. void()    player_diea7    =    [    $deatha7,    player_diea8    ] {};
  715. void()    player_diea8    =    [    $deatha8,    player_diea9    ] {};
  716. void()    player_diea9    =    [    $deatha9,    player_diea10    ] {};
  717. void()    player_diea10    =    [    $deatha10,    player_diea11    ] {};
  718. void()    player_diea11    =    [    $deatha11,    player_diea11 ] {PlayerDead();};
  719.  
  720. void()    player_dieb1    =    [    $deathb1,    player_dieb2    ] {};
  721. void()    player_dieb2    =    [    $deathb2,    player_dieb3    ] {};
  722. void()    player_dieb3    =    [    $deathb3,    player_dieb4    ] {};
  723. void()    player_dieb4    =    [    $deathb4,    player_dieb5    ] {};
  724. void()    player_dieb5    =    [    $deathb5,    player_dieb6    ] {};
  725. void()    player_dieb6    =    [    $deathb6,    player_dieb7    ] {};
  726. void()    player_dieb7    =    [    $deathb7,    player_dieb8    ] {};
  727. void()    player_dieb8    =    [    $deathb8,    player_dieb9    ] {};
  728. void()    player_dieb9    =    [    $deathb9,    player_dieb9    ] {PlayerDead();};
  729.  
  730. void()    player_diec1    =    [    $deathc1,    player_diec2    ] {};
  731. void()    player_diec2    =    [    $deathc2,    player_diec3    ] {};
  732. void()    player_diec3    =    [    $deathc3,    player_diec4    ] {};
  733. void()    player_diec4    =    [    $deathc4,    player_diec5    ] {};
  734. void()    player_diec5    =    [    $deathc5,    player_diec6    ] {};
  735. void()    player_diec6    =    [    $deathc6,    player_diec7    ] {};
  736. void()    player_diec7    =    [    $deathc7,    player_diec8    ] {};
  737. void()    player_diec8    =    [    $deathc8,    player_diec9    ] {};
  738. void()    player_diec9    =    [    $deathc9,    player_diec10    ] {};
  739. void()    player_diec10    =    [    $deathc10,    player_diec11    ] {};
  740. void()    player_diec11    =    [    $deathc11,    player_diec12    ] {};
  741. void()    player_diec12    =    [    $deathc12,    player_diec13    ] {};
  742. void()    player_diec13    =    [    $deathc13,    player_diec14    ] {};
  743. void()    player_diec14    =    [    $deathc14,    player_diec15    ] {};
  744. void()    player_diec15    =    [    $deathc15,    player_diec15 ] {PlayerDead();};
  745.  
  746. void()    player_died1    =    [    $deathd1,    player_died2    ] {};
  747. void()    player_died2    =    [    $deathd2,    player_died3    ] {};
  748. void()    player_died3    =    [    $deathd3,    player_died4    ] {};
  749. void()    player_died4    =    [    $deathd4,    player_died5    ] {};
  750. void()    player_died5    =    [    $deathd5,    player_died6    ] {};
  751. void()    player_died6    =    [    $deathd6,    player_died7    ] {};
  752. void()    player_died7    =    [    $deathd7,    player_died8    ] {};
  753. void()    player_died8    =    [    $deathd8,    player_died9    ] {};
  754. void()    player_died9    =    [    $deathd9,    player_died9    ] {PlayerDead();};
  755.  
  756. void()    player_diee1    =    [    $deathe1,    player_diee2    ] {};
  757. void()    player_diee2    =    [    $deathe2,    player_diee3    ] {};
  758. void()    player_diee3    =    [    $deathe3,    player_diee4    ] {};
  759. void()    player_diee4    =    [    $deathe4,    player_diee5    ] {};
  760. void()    player_diee5    =    [    $deathe5,    player_diee6    ] {};
  761. void()    player_diee6    =    [    $deathe6,    player_diee7    ] {};
  762. void()    player_diee7    =    [    $deathe7,    player_diee8    ] {};
  763. void()    player_diee8    =    [    $deathe8,    player_diee9    ] {};
  764. void()    player_diee9    =    [    $deathe9,    player_diee9    ] {PlayerDead();};
  765.  
  766. void()    player_die_ax1    =    [    $axdeth1,    player_die_ax2    ] {};
  767. void()    player_die_ax2    =    [    $axdeth2,    player_die_ax3    ] {};
  768. void()    player_die_ax3    =    [    $axdeth3,    player_die_ax4    ] {};
  769. void()    player_die_ax4    =    [    $axdeth4,    player_die_ax5    ] {};
  770. void()    player_die_ax5    =    [    $axdeth5,    player_die_ax6    ] {};
  771. void()    player_die_ax6    =    [    $axdeth6,    player_die_ax7    ] {};
  772. void()    player_die_ax7    =    [    $axdeth7,    player_die_ax8    ] {};
  773. void()    player_die_ax8    =    [    $axdeth8,    player_die_ax9    ] {};
  774. void()    player_die_ax9    =    [    $axdeth9,    player_die_ax9    ] {PlayerDead();};
  775.