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

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