#define DAMAGEEFFECTS_H
#ifdef CSQC
-#include "../../deathtypes/all.qh"
-#include "../../physics/movetypes/movetypes.qh"
-#include "../../../client/mutators/events.qh"
-#include "../../vehicles/all.qh"
-#include "../../weapons/all.qh"
+#include <common/deathtypes/all.qh>
+#include <common/physics/movetypes/movetypes.qh>
+#include <client/mutators/events.qh>
+#include <common/vehicles/all.qh>
+#include <common/weapons/all.qh>
#endif
#endif
continue; // player model bone blacklist
// now choose the bone closest to impact origin
- if(nearestbone == 0 || vlen(hitorg - gettaginfo(self, tagnum)) <= vlen(hitorg - gettaginfo(self, nearestbone)))
+ if(nearestbone == 0 || vlen2(hitorg - gettaginfo(self, tagnum)) <= vlen2(hitorg - gettaginfo(self, nearestbone)))
nearestbone = tagnum;
}
gettaginfo(self, nearestbone); // set gettaginfo_name
}
else
{
- if(vlen(nearest - w_org) > bound(MIN_DAMAGEEXTRARADIUS, self.damageextraradius, MAX_DAMAGEEXTRARADIUS))
+ if(vdist((nearest - w_org), >, bound(MIN_DAMAGEEXTRARADIUS, self.damageextraradius, MAX_DAMAGEEXTRARADIUS)))
continue;
thisdmg = thedamage;
}
if(self.damageforcescale)
- if(vlen(thisforce))
+ if(vdist(thisforce, !=, 0))
{
self.move_velocity = self.move_velocity + damage_explosion_calcpush(self.damageforcescale * thisforce, self.move_velocity, autocvar_g_balance_damagepush_speedfactor);
self.move_flags &= ~FL_ONGROUND;
self.silent = 1;
if(self.event_damage)
- self.event_damage(thisdmg, w_deathtype, w_org, thisforce);
+ self.event_damage(self, thisdmg, w_deathtype, w_org, thisforce);
DamageEffect(w_org, thisdmg, w_deathtype, species);