home *** CD-ROM | disk | FTP | other *** search
/ Superpower (Alt) / SUPERPOWER.iso / q / patch / mbq717 / corpse.qc < prev    next >
Encoding:
Text File  |  1996-07-28  |  1013 b   |  46 lines

  1. /*
  2.  * Corpse-related material
  3.  * By AsmodeusB
  4.  * It's a solid corpse which can be gibbed, and moved (by running into it).
  5.  */
  6.  
  7.  
  8. void() CorpsePain =
  9. {
  10.  SpawnMeatSpray (self.origin, crandom() * 100 * v_right);
  11. };
  12.  
  13. void() CorpseMove = 
  14. {
  15.  local float dir;
  16.  
  17.  dir = vectoyaw(other.velocity);
  18.  walkmove(dir, 7);
  19. };
  20.  
  21. /*
  22.  * Have to set self.th_die outside of this function, since it's different
  23.  * for each monster.
  24.  */
  25.  
  26. void() MakeSolidCorpse =
  27. {
  28. // Make a gibbable corpse, change the size so we can jump on it
  29.  
  30.     self.health = 40;
  31. // DAMAGE_AIM so that grenades don't bounce off like they do for DAMAGE_YES
  32.     self.takedamage = DAMAGE_AIM;
  33.     self.solid = SOLID_BBOX;
  34.     self.movetype = MOVETYPE_STEP;
  35.     self.flags = self.flags & (!FL_MONSTER);
  36.     setsize (self, '-32 -32 -24', '32 32 10');
  37.     self.th_stand = SUB_Null;
  38.     self.th_walk = SUB_Null;
  39.     self.th_run = SUB_Null;
  40.     self.th_pain = CorpsePain;
  41.     self.th_melee = SUB_Null;
  42.     self.th_missile = SUB_Null;
  43.     self.touch = CorpseMove;
  44. };
  45.  
  46.