home *** CD-ROM | disk | FTP | other *** search
/ Quake 'em / QUAKEEM.BIN / quake / programs / xtrawp19 / shrapnel.qc < prev    next >
Encoding:
Text File  |  1996-08-09  |  756 b   |  38 lines

  1. void(entity targ,entity inflictor,entity attacker,float dmg) T_Damage;
  2. void(float dmg) spawn_touchblood;
  3. float() W_BestWeapon;
  4. void() W_SetCurrentAmmo;
  5.  
  6. float(float a, float b) min = 
  7. {
  8.     if (a>b) 
  9.         return b; 
  10.     else 
  11.         return a;
  12. };
  13.  
  14. void() ShrapnelTouch = 
  15. {
  16.     if (other.solid == SOLID_TRIGGER)
  17.         return;
  18.     if (pointcontents(self.origin) == CONTENT_SKY)
  19.     {
  20.         remove(self);
  21.         return;
  22.     }
  23.     if (other.takedamage)
  24.     {
  25.         spawn_touchblood(20);
  26.         T_Damage(other,self,self.owner,20);
  27.     }
  28.     else
  29.     {
  30.         WriteByte(MSG_BROADCAST,SVC_TEMPENTITY);
  31.         WriteByte(MSG_BROADCAST,TE_SUPERSPIKE);
  32.         WriteCoord(MSG_BROADCAST,self.origin_x);
  33.         WriteCoord(MSG_BROADCAST,self.origin_y);
  34.         WriteCoord(MSG_BROADCAST,self.origin_z);
  35.     }
  36.     remove(self);
  37. };
  38.