3 float hittype, dmg, rad, edge, thisdmg;
4 vector force, org, thisforce;
17 force = decompressShortVector(ReadShort());
19 for(self = findradius(org, rad); self; self = self.chain)
21 print("findradius found something\n");
25 thisdmg = vlen(self.origin - org) / rad;
26 print("thisdmg = ", ftos(thisdmg), "\n");
29 thisdmg = dmg + (edge - dmg) * thisdmg;
30 thisforce = force_z * normalize(self.origin - org);
38 if(self.damageforcescale)
41 self.move_velocity = self.move_velocity + self.damageforcescale * thisforce;
42 self.move_flags &~= FL_ONGROUND;
46 self.event_damage(thisdmg, hittype, org, thisforce);
51 // TODO spawn particle effects and sounds based on hittype
53 print("hit: ", ftos(hittype), "\n");
55 if(!DEATH_ISSPECIAL(hittype))
57 float hitwep, secondary;
58 hitwep = DEATH_WEAPONOFWEAPONDEATH(hittype);
59 secondary = hittype & HITTYPE_SECONDARY;
61 print("hit: ", ftos(hitwep), "\n");
68 sound (self, CHAN_PROJECTILE, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
69 pointparticles(particleeffectnum("crylink_impact"), org, '0 0 0', 1);
73 sound (self, CHAN_PROJECTILE, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
74 pointparticles(particleeffectnum("crylink_impactbig"), org, '0 0 0', 1);