#include "_all.qh"
#include "gibs.qh"
-#include "movetypes.qh"
#include "prandom.qh"
-#include "vehicles/all.qh"
+#include "../common/vehicles/all.qh"
#include "../common/constants.qh"
#include "../common/deathtypes.qh"
+#include "../common/movetypes/movetypes.qh"
#include "../common/util.qh"
#include "../common/weapons/all.qh"
pointparticles(self.team, org, '0 0 0', 1);
}
-void DamageEffect(vector hitorg, float dmg, int type, int specnum)
+void DamageEffect(vector hitorg, float thedamage, int type, int specnum)
{
// particle effects for players and objects damaged by weapons (eg: flames coming out of victims shot with rockets)
return; // allow a single damage on non-skeletal models
}
- life = bound(autocvar_cl_damageeffect_lifetime_min, dmg * autocvar_cl_damageeffect_lifetime, autocvar_cl_damageeffect_lifetime_max);
+ life = bound(autocvar_cl_damageeffect_lifetime_min, thedamage * autocvar_cl_damageeffect_lifetime, autocvar_cl_damageeffect_lifetime_max);
effectname = get_weaponinfo(DEATH_WEAPONOF(type)).netname;
void Ent_DamageInfo(float isNew)
{
- float dmg, rad, edge, thisdmg;
+ float thedamage, rad, edge, thisdmg;
bool hitplayer = false;
int species, forcemul;
vector force, thisforce;
w_org.y = ReadCoord();
w_org.z = ReadCoord();
- dmg = ReadByte();
+ thedamage = ReadByte();
rad = ReadByte();
edge = ReadByte();
force = decompressShortVector(ReadShort());
continue;
if(thisdmg < 0)
thisdmg = 0;
- if(dmg)
+ if(thedamage)
{
- thisdmg = dmg + (edge - dmg) * thisdmg;
- thisforce = forcemul * vlen(force) * (thisdmg / dmg) * normalize(self.origin - w_org);
+ thisdmg = thedamage + (edge - thedamage) * thisdmg;
+ thisforce = forcemul * vlen(force) * (thisdmg / thedamage) * normalize(self.origin - w_org);
}
else
{
if(vlen(nearest - w_org) > bound(MIN_DAMAGEEXTRARADIUS, self.damageextraradius, MAX_DAMAGEEXTRARADIUS))
continue;
- thisdmg = dmg;
+ thisdmg = thedamage;
thisforce = forcemul * force;
}
w_random = prandom();
traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
- if(trace_fraction < 1 && hitwep != WEP_VORTEX && hitwep != WEP_VAPORIZER)
+ if(trace_fraction < 1 && hitwep != WEP_VORTEX.m_id && hitwep != WEP_VAPORIZER.m_id)
w_backoff = trace_plane_normal;
else
w_backoff = -1 * normalize(force);