47 e.projectiledeathtype = deathtype;
49 e.dmg_edge = edgedamage;
50 bool rad_negative =
false;
58 e.dmg_force =
vlen(force);
59 e.velocity = (e.dmg_force ? force / e.dmg_force :
'0 0 0');
61 e.species = bloodtype &
BITS(4);
65 e.colormap = (
teamplay) ? dmgowner.team : dmgowner.clientcolors;
92 if(
time >= this.
cnt || !this.
owner || !this.
owner.modelindex || !
this.owner.drawmask)
95 this.
owner.total_damages =
max(0, this.
owner.total_damages - 1);
103 this.
owner.total_damages =
max(0, this.
owner.total_damages - 1);
113 __pointparticles(this.
team,
org,
'0 0 0', 1);
158 nearestbone = tagnum;
178 string effectname = wep.wr_damageeffect_getname ? wep.wr_damageeffect_getname(wep) :
strcat(
"damage_", wep.netname);
185 effectname =
strcat(specstr, effectname);
190 int effect = _particleeffectnum(effectname);
199 e.team = _particleeffectnum(effectname);
207 float thedamage, rad, edge, thisdmg;
208 bool hitplayer =
false;
210 vector force_dir, force, thisforce;
223 force_dir.x = ReadChar() /
BITS(7);
224 force_dir.y = ReadChar() /
BITS(7);
225 force_dir.z = ReadChar() /
BITS(7);
226 if (force_dir ==
'0 0 0')
227 force_dir =
'0 0 -1';
229 int vlen_force =
ReadByte() * 4 + 2;
230 force = force_dir * vlen_force;
243 forcemul = (rad_negative ? -1 : 1);
245 int tcolor = dmg_colors;
249 tcolor = (dmg_colors - 1) * 0x11;
270 thisdmg = thedamage + (edge - thedamage) * thisdmg;
271 thisforce = forcemul * vlen_force * (thisdmg / thedamage) *
normalize(it.origin -
w_org);
285 thisforce = forcemul * force;
288 if(it.damageforcescale)
289 if(
vdist(thisforce, !=, 0))
323 case DEATH_VH_SPID_MINIGUN:
327 case DEATH_VH_SPID_ROCKET:
331 case DEATH_VH_SPID_DEATH:
336 case DEATH_VH_WAKI_GUN:
340 case DEATH_VH_WAKI_ROCKET:
344 case DEATH_VH_WAKI_DEATH:
349 case DEATH_VH_RAPT_CANNON:
353 case DEATH_VH_RAPT_FRAGMENT:
356 for(i = 1; i < 4; ++i)
365 case DEATH_VH_RAPT_BOMB:
369 case DEATH_VH_RAPT_DEATH:
373 case DEATH_VH_BUMB_GUN:
393 case DEATH_TURRET_EWHEEL:
398 case DEATH_TURRET_FLAC:
403 case DEATH_TURRET_MLRS:
404 case DEATH_TURRET_HK:
405 case DEATH_TURRET_WALK_ROCKET:
406 case DEATH_TURRET_HELLION:
411 case DEATH_TURRET_MACHINEGUN:
412 case DEATH_TURRET_WALK_GUN:
417 case DEATH_TURRET_PLASMA:
422 case DEATH_TURRET_WALK_MELEE:
427 case DEATH_TURRET_PHASER:
430 case DEATH_TURRET_TESLA:
431 te_smallflash(this.
origin);
440 if(!hitplayer || rad)
#define MUTATOR_CALLHOOK(id,...)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
vector damage_explosion_calcpush(vector explosion_f, vector target_v, float speedfactor)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
virtual void wr_impacteffect()
(CLIENT) impact effect for weapon explosion
float damagepush_speedfactor
#define colormapPaletteColor(c, isPants)
#define setmodel(this, m)
const int SPECIES_ROBOT_SOLID
const int SPECIES_ROBOT_RUSTY
const int SPECIES_RESERVED
const int SPECIES_ROBOT_SHINY
const float MOVE_NOMONSTERS
vector particles_colormin
float trace_dphitq3surfaceflags
vector particles_colormax
vector trace_plane_normal
string species_prefix(int specnum)
void DamageEffect_Think(entity this)
bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
void DamageEffect(entity this, vector hitorg, float thedamage, int type, int specnum)
int total_damages
number of effects which currently are attached to a player
void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner)
float autocvar_cl_damageeffect_ticrate
const float MAX_DAMAGEEXTRARADIUS
float autocvar_cl_damageeffect_lifetime
bool autocvar_cl_damageeffect_distribute
float autocvar_cl_damageeffect_lifetime_max
int autocvar_cl_damageeffect
float autocvar_cl_damageeffect_bones
float autocvar_cl_damageeffect_lifetime_min
const float MIN_DAMAGEEXTRARADIUS
#define DEATH_ISTURRET(t)
#define DEATH_ISSPECIAL(t)
#define DEATH_ISVEHICLE(t)
#define DEATH_WEAPONOF(t)
#define pointparticles(effect, org, vel, howmany)
WriteByte(chan, ent.angles.y/DEC_FACTOR)
#define FOREACH_ENTITY_RADIUS(org, dist, cond, body)
#define NET_HANDLE(id, param)
#define WriteHeader(to, id)
#define REGISTER_NET_LINKED(id)
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
#define UNSET_ONGROUND(s)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define new_pure(class)
purely logical entities (not linked to the area grid)
float prandom()
Predictable random number generator (not seeded yet).
void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
#define sound(e, c, s, v, a)
Sound SND_FLACEXP_RANDOM()
bool sound_allowed(int to, entity e)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt().
ERASEABLE vector NearestPointOnBox(entity box, vector org)
int autocvar_chase_active
int autocvar_cl_gentle_damage