Xonotic
fireball.qc
Go to the documentation of this file.
1 #include "fireball.qh"
2 
3 #ifdef SVQC
4 
5 void W_Fireball_Explode(entity this, entity directhitentity)
6 {
7  entity e;
8  float dist;
9  float points;
10  vector dir;
11  float d;
12 
13  this.event_damage = func_null;
14  this.takedamage = DAMAGE_NO;
15 
16  // 1. dist damage
17  d = (GetResource(this.realowner, RES_HEALTH) + GetResource(this.realowner, RES_ARMOR));
18  RadiusDamage(this, this.realowner, WEP_CVAR_PRI(fireball, damage), WEP_CVAR_PRI(fireball, edgedamage), WEP_CVAR_PRI(fireball, radius), NULL, NULL, WEP_CVAR_PRI(fireball, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
19  if(GetResource(this.realowner, RES_HEALTH) + GetResource(this.realowner, RES_ARMOR) >= d)
20  if(!this.cnt)
21  {
22  modeleffect_spawn("models/sphere/sphere.md3", 0, 0, this.origin, '0 0 0', '0 0 0', '0 0 0', 0, WEP_CVAR_PRI(fireball, bfgradius), 0.2, 0.05, 0.25);
23 
24  // 2. bfg effect
25  // NOTE: this cannot be made warpzone aware by design. So, better intentionally ignore warpzones here.
26  for(e = findradius(this.origin, WEP_CVAR_PRI(fireball, bfgradius)); e; e = e.chain)
27  if(e != this.realowner) if(e.takedamage == DAMAGE_AIM) if(!IS_PLAYER(e) || !this.realowner || DIFF_TEAM(e, this))
28  {
29  // can we see fireball?
30  traceline(e.origin + e.view_ofs, this.origin, MOVE_NORMAL, e);
31  if(/* trace_startsolid || */ trace_fraction != 1) // startsolid should be never happening anyway
32  continue;
33  // can we see player who shot fireball?
34  traceline(e.origin + e.view_ofs, this.realowner.origin + this.realowner.view_ofs, MOVE_NORMAL, e);
35  if(trace_ent != this.realowner)
36  if(/* trace_startsolid || */ trace_fraction != 1)
37  continue;
38  dist = vlen(this.origin - e.origin - e.view_ofs);
39  points = (1 - sqrt(dist / WEP_CVAR_PRI(fireball, bfgradius)));
40  if(points <= 0)
41  continue;
42  dir = normalize(e.origin + e.view_ofs - this.origin);
43 
44  if(accuracy_isgooddamage(this.realowner, e))
45  accuracy_add(this.realowner, WEP_FIREBALL, 0, WEP_CVAR_PRI(fireball, bfgdamage) * points);
46 
47  Damage(e, this, this.realowner, WEP_CVAR_PRI(fireball, bfgdamage) * points, this.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, this.weaponentity_fld, e.origin + e.view_ofs, WEP_CVAR_PRI(fireball, bfgforce) * dir);
48  Send_Effect(EFFECT_FIREBALL_BFGDAMAGE, e.origin, -1 * dir, 1);
49  }
50  }
51 
52  delete(this);
53 }
54 
55 void W_Fireball_Explode_think(entity this)
56 {
57  W_Fireball_Explode(this, NULL);
58 }
59 
60 void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
61 {
62  W_Fireball_Explode(this, trigger);
63 }
64 
65 void W_Fireball_TouchExplode(entity this, entity toucher)
66 {
67  PROJECTILE_TOUCH(this, toucher);
68  W_Fireball_Explode(this, toucher);
69 }
70 
71 void W_Fireball_LaserPlay(entity this, float dt, float dist, float damage, float edgedamage, float burntime)
72 {
73  entity e;
74  float d;
75  vector p;
76 
77  if(damage <= 0)
78  return;
79 
81  for(e = WarpZone_FindRadius(this.origin, dist, true); e; e = e.chain)
82  {
83  if(e == this.realowner) continue;
84  if(e.takedamage != DAMAGE_AIM) continue;
85  if(IS_PLAYER(e) && this.realowner && SAME_TEAM(e, this)) continue;
86 
87  p = e.origin;
88  p.x += e.mins.x + random() * (e.maxs.x - e.mins.x);
89  p.y += e.mins.y + random() * (e.maxs.y - e.mins.y);
90  p.z += e.mins.z + random() * (e.maxs.z - e.mins.z);
91  d = vlen(WarpZone_UnTransformOrigin(e, this.origin) - p);
92  if(d < dist)
93  {
94  e.fireball_impactvec = p;
95  RandomSelection_AddEnt(e, 1 / (1 + d), !StatusEffects_active(STATUSEFFECT_Burning, e));
96  }
97  }
99  {
101  d = damage + (edgedamage - damage) * (d / dist);
103  //trailparticles(this, particleeffectnum(EFFECT_FIREBALL_LASER), this.origin, RandomSelection_chosen_ent.fireball_impactvec);
104  Send_Effect(EFFECT_FIREBALL_LASER, this.origin, RandomSelection_chosen_ent.fireball_impactvec - this.origin, 1);
105  }
106 }
107 
108 void W_Fireball_Think(entity this)
109 {
110  if(time > this.pushltime)
111  {
112  this.cnt = 1;
114  W_Fireball_Explode(this, NULL);
115  return;
116  }
117 
118  W_Fireball_LaserPlay(this, 0.1, WEP_CVAR_PRI(fireball, laserradius), WEP_CVAR_PRI(fireball, laserdamage), WEP_CVAR_PRI(fireball, laseredgedamage), WEP_CVAR_PRI(fireball, laserburntime));
119 
120  this.nextthink = time + 0.1;
121 }
122 
123 void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
124 {
125  if(GetResource(this, RES_HEALTH) <= 0)
126  return;
127 
128  if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
129  return; // g_projectiles_damage says to halt
130 
131  TakeResource(this, RES_HEALTH, damage);
132  if(GetResource(this, RES_HEALTH) <= 0)
133  {
134  this.cnt = 1;
135  W_PrepareExplosionByDamage(this, attacker, W_Fireball_Explode_think);
136  }
137 }
138 
139 void W_Fireball_Attack1(entity actor, .entity weaponentity)
140 {
141  W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 2, SND_FIREBALL_FIRE2, CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage), WEP_FIREBALL.m_id);
142 
143  W_MuzzleFlash(WEP_FIREBALL, actor, weaponentity, w_shotorg, w_shotdir);
144 
145  entity proj = new(plasma_prim);
146  proj.owner = proj.realowner = actor;
147  proj.bot_dodge = true;
148  proj.bot_dodgerating = WEP_CVAR_PRI(fireball, damage);
149  proj.pushltime = time + WEP_CVAR_PRI(fireball, lifetime);
150  proj.use = W_Fireball_Explode_use;
151  setthink(proj, W_Fireball_Think);
152  proj.nextthink = time;
154  proj.team = actor.team;
155  proj.event_damage = W_Fireball_Damage;
156  proj.takedamage = DAMAGE_YES;
157  proj.damageforcescale = WEP_CVAR_PRI(fireball, damageforcescale);
159  proj.projectiledeathtype = WEP_FIREBALL.m_id;
160  proj.weaponentity_fld = weaponentity;
161  setorigin(proj, w_shotorg);
162 
163  set_movetype(proj, MOVETYPE_FLY);
164  W_SetupProjVelocity_PRI(proj, fireball);
165  proj.angles = vectoangles(proj.velocity);
166  settouch(proj, W_Fireball_TouchExplode);
167  setsize(proj, '-16 -16 -16', '16 16 16');
168  proj.flags = FL_PROJECTILE;
169  IL_PUSH(g_projectiles, proj);
170  IL_PUSH(g_bot_dodge, proj);
171  proj.missile_flags = MIF_SPLASH | MIF_PROXY;
172 
173  CSQCProjectile(proj, true, PROJECTILE_FIREBALL, true);
174 
175  MUTATOR_CALLHOOK(EditProjectile, actor, proj);
176 }
177 
178 void W_Fireball_AttackEffect(entity actor, .entity weaponentity, float i, vector f_diff)
179 {
180  W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 0, SND_Null, 0, 0, WEP_FIREBALL.m_id); // TODO: probably doesn't need deathtype, just a prefire effect
181  w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
182  Send_Effect(EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
183 }
184 
185 void W_Fireball_Attack1_Frame4(Weapon thiswep, entity actor, .entity weaponentity, int fire)
186 {
187  W_Fireball_Attack1(actor, weaponentity);
188  weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), w_ready);
189 }
190 
191 void W_Fireball_Attack1_Frame3(Weapon thiswep, entity actor, .entity weaponentity, int fire)
192 {
193  W_Fireball_AttackEffect(actor, weaponentity, 0, '+1.25 +3.75 0');
194  weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame4);
195 }
196 
197 void W_Fireball_Attack1_Frame2(Weapon thiswep, entity actor, .entity weaponentity, int fire)
198 {
199  W_Fireball_AttackEffect(actor, weaponentity, 0, '-1.25 +3.75 0');
200  weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame3);
201 }
202 
203 void W_Fireball_Attack1_Frame1(Weapon thiswep, entity actor, .entity weaponentity, int fire)
204 {
205  W_Fireball_AttackEffect(actor, weaponentity, 1, '+1.25 -3.75 0');
206  weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame2);
207 }
208 
209 void W_Fireball_Attack1_Frame0(Weapon thiswep, entity actor, .entity weaponentity, int fire)
210 {
211  W_Fireball_AttackEffect(actor, weaponentity, 0, '-1.25 -3.75 0');
212  sound(actor, CH_WEAPON_SINGLE, SND_FIREBALL_PREFIRE2, VOL_BASE, ATTEN_NORM);
213  weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame1);
214 }
215 
216 void W_Fireball_Firemine_Think(entity this)
217 {
218  if(time > this.pushltime)
219  {
220  delete(this);
221  return;
222  }
223 
224  // make it "hot" once it leaves its owner
225  if(this.owner)
226  {
227  if(vdist(this.origin - this.owner.origin - this.owner.view_ofs, >, WEP_CVAR_SEC(fireball, laserradius)))
228  {
229  this.cnt += 1;
230  if(this.cnt == 3)
231  this.owner = NULL;
232  }
233  else
234  this.cnt = 0;
235  }
236 
237  W_Fireball_LaserPlay(this, 0.1, WEP_CVAR_SEC(fireball, laserradius), WEP_CVAR_SEC(fireball, laserdamage), WEP_CVAR_SEC(fireball, laseredgedamage), WEP_CVAR_SEC(fireball, laserburntime));
238 
239  this.nextthink = time + 0.1;
240 }
241 
242 void W_Fireball_Firemine_Touch(entity this, entity toucher)
243 {
244  PROJECTILE_TOUCH(this, toucher);
245  if(toucher.takedamage == DAMAGE_AIM)
246  if(Fire_AddDamage(toucher, this.realowner, WEP_CVAR_SEC(fireball, damage), WEP_CVAR_SEC(fireball, damagetime), this.projectiledeathtype) >= 0)
247  {
248  delete(this);
249  return;
250  }
252 }
253 
254 void W_Fireball_Attack2(entity actor, .entity weaponentity)
255 {
256  entity proj;
257  vector f_diff;
258  float c;
259 
260  c = actor.(weaponentity).bulletcounter % 4;
261  switch(c)
262  {
263  case 0:
264  f_diff = '-1.25 -3.75 0';
265  break;
266  case 1:
267  f_diff = '+1.25 -3.75 0';
268  break;
269  case 2:
270  f_diff = '-1.25 +3.75 0';
271  break;
272  case 3:
273  default:
274  f_diff = '+1.25 +3.75 0';
275  break;
276  }
277  W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 2, SND_FIREBALL_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(fireball, damage), WEP_FIREBALL.m_id | HITTYPE_SECONDARY);
278  traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, actor);
280 
281  W_MuzzleFlash(WEP_FIREBALL, actor, weaponentity, w_shotorg, w_shotdir);
282 
283  proj = new(grenade);
284  proj.owner = proj.realowner = actor;
285  proj.bot_dodge = true;
286  proj.bot_dodgerating = WEP_CVAR_SEC(fireball, damage);
288  proj.projectiledeathtype = WEP_FIREBALL.m_id | HITTYPE_SECONDARY;
289  settouch(proj, W_Fireball_Firemine_Touch);
291  setsize(proj, '-4 -4 -4', '4 4 4');
292  setorigin(proj, w_shotorg);
293  setthink(proj, W_Fireball_Firemine_Think);
294  proj.nextthink = time;
295  proj.damageforcescale = WEP_CVAR_SEC(fireball, damageforcescale);
296  proj.pushltime = time + WEP_CVAR_SEC(fireball, lifetime);
297  W_SetupProjVelocity_UP_SEC(proj, fireball);
298 
299  proj.angles = vectoangles(proj.velocity);
300  proj.flags = FL_PROJECTILE;
301  IL_PUSH(g_projectiles, proj);
302  IL_PUSH(g_bot_dodge, proj);
303  proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
304 
305  CSQCProjectile(proj, true, PROJECTILE_FIREMINE, true);
306 
307  MUTATOR_CALLHOOK(EditProjectile, actor, proj);
308 }
309 
310 METHOD(Fireball, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
311 {
312  PHYS_INPUT_BUTTON_ATCK(actor) = false;
313  PHYS_INPUT_BUTTON_ATCK2(actor) = false;
314  if(actor.bot_primary_fireballmooth == 0)
315  {
316  if(bot_aim(actor, weaponentity, WEP_CVAR_PRI(fireball, speed), 0, WEP_CVAR_PRI(fireball, lifetime), false))
317  {
318  PHYS_INPUT_BUTTON_ATCK(actor) = true;
319  if(random() < 0.02) actor.bot_primary_fireballmooth = 0;
320  }
321  }
322  else
323  {
324  if(bot_aim(actor, weaponentity, WEP_CVAR_SEC(fireball, speed), WEP_CVAR_SEC(fireball, speed_up), WEP_CVAR_SEC(fireball, lifetime), true))
325  {
326  PHYS_INPUT_BUTTON_ATCK2(actor) = true;
327  if(random() < 0.01) actor.bot_primary_fireballmooth = 1;
328  }
329  }
330 }
331 METHOD(Fireball, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
332 {
333  if(fire & 1)
334  {
335  if(time >= actor.(weaponentity).fireball_primarytime)
336  if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(fireball, refire)))
337  {
338  W_Fireball_Attack1_Frame0(thiswep, actor, weaponentity, fire);
339  actor.(weaponentity).fireball_primarytime = time + WEP_CVAR_PRI(fireball, refire2) * W_WeaponRateFactor(actor);
340  }
341  }
342  else if(fire & 2)
343  {
344  if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(fireball, refire)))
345  {
346  W_Fireball_Attack2(actor, weaponentity);
347  weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(fireball, animtime), w_ready);
348  }
349  }
350 }
351 METHOD(Fireball, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
352 {
353  return true; // infinite ammo
354 }
355 METHOD(Fireball, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
356 {
357  return true; // fireball has infinite ammo
358 }
359 METHOD(Fireball, wr_resetplayer, void(entity thiswep, entity actor))
360 {
361  for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
362  {
363  .entity weaponentity = weaponentities[slot];
364  actor.(weaponentity).fireball_primarytime = time;
365  }
366 }
367 METHOD(Fireball, wr_suicidemessage, Notification(entity thiswep))
368 {
370  return WEAPON_FIREBALL_SUICIDE_FIREMINE;
371  else
372  return WEAPON_FIREBALL_SUICIDE_BLAST;
373 }
374 METHOD(Fireball, wr_killmessage, Notification(entity thiswep))
375 {
377  return WEAPON_FIREBALL_MURDER_FIREMINE;
378  else
379  return WEAPON_FIREBALL_MURDER_BLAST;
380 }
381 
382 #endif
383 #ifdef CSQC
384 
385 METHOD(Fireball, wr_impacteffect, void(entity thiswep, entity actor))
386 {
387  vector org2;
389  {
390  // firemine goes out silently
391  }
392  else
393  {
394  org2 = w_org + w_backoff * 16;
395  pointparticles(EFFECT_FIREBALL_EXPLODE, org2, '0 0 0', 1);
396  if(!w_issilent)
397  sound(actor, CH_SHOTS, SND_FIREBALL_IMPACT2, VOL_BASE, ATTEN_NORM * 0.25); // long range boom
398  }
399 }
400 
401 #endif
const int HITTYPE_SPLASH
automatically set by RadiusDamage
Definition: all.qh:27
#define WEP_CVAR_PRI(wepname, name)
Definition: all.qh:300
#define PHYS_INPUT_BUTTON_ATCK2(s)
Definition: player.qh:148
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity)
#define WEP_CVAR_SEC(wepname, name)
Definition: all.qh:301
const int HITTYPE_BOUNCE
Definition: all.qh:28
float speed
Definition: subs.qh:41
vector w_shotorg
Definition: tracing.qh:18
#define PROJECTILE_MAKETRIGGER(e)
Definition: common.qh:29
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
Definition: cl_resources.qc:15
const int MIF_ARC
Definition: common.qh:35
#define W_SetupProjVelocity_UP_SEC(ent, wepname)
Definition: tracing.qh:55
const int MIF_SPLASH
Definition: common.qh:34
ERASEABLE void RandomSelection_Init()
Definition: random.qc:4
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
Definition: tracing.qh:29
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
Definition: common.qc:49
float damageforcescale
Definition: damage.qh:137
entity() spawn
float DAMAGE_AIM
Definition: progsdefs.qc:284
const float MOVE_NORMAL
Definition: csprogsdefs.qc:252
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
float radius
Definition: impulse.qh:11
float pushltime
Definition: jumppads.qh:10
vector w_shotdir
Definition: tracing.qh:19
entity weaponentity_fld
Definition: weaponsystem.qh:27
origin
Definition: ent_cs.qc:114
float MOVETYPE_BOUNCE
Definition: progsdefs.qc:256
#define METHOD(cname, name, prototype)
Definition: oo.qh:257
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
#define DIFF_TEAM(a, b)
Definition: teams.qh:240
entity owner
Definition: main.qh:73
IntrusiveList g_bot_dodge
Definition: api.qh:150
float bulletcounter
Definition: weaponsystem.qh:25
entity trace_ent
Definition: csprogsdefs.qc:40
vector WarpZone_UnTransformOrigin(entity wz, vector v)
Definition: common.qc:535
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
Definition: cl_resources.qc:31
#define PROJECTILE_TOUCH(e, t)
Definition: common.qh:27
RES_HEALTH
Definition: ent_cs.qc:126
#define W_SetupProjVelocity_PRI(ent, wepname)
Definition: tracing.qh:64
#define RandomSelection_AddEnt(e, weight, priority)
Definition: random.qh:14
const int PROJECTILE_FIREBALL
Definition: projectiles.qh:21
float lifetime
Definition: powerups.qc:23
float cnt
Definition: powerups.qc:24
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
const int CH_WEAPON_A
Definition: sound.qh:7
vector v_up
Definition: csprogsdefs.qc:31
const int MAX_WEAPONSLOTS
Definition: weapon.qh:13
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
const int CH_WEAPON_SINGLE
Definition: sound.qh:9
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
Definition: common.qc:91
entity RandomSelection_chosen_ent
Definition: random.qh:5
#define pointparticles
Definition: csprogsdefs.qh:13
#define NULL
Definition: post.qh:17
const float VOL_BASE
Definition: sound.qh:36
vector trace_endpos
Definition: csprogsdefs.qc:37
#define PHYS_INPUT_BUTTON_ATCK(s)
Definition: player.qh:146
float takedamage
Definition: progsdefs.qc:147
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition: damage.qc:583
#define SAME_TEAM(a, b)
Definition: teams.qh:239
const int HITTYPE_SECONDARY
Definition: all.qh:25
entity WarpZone_FindRadius(vector org, float rad, bool needlineofsight)
Definition: common.qc:669
const float ATTEN_NORM
Definition: sound.qh:30
float nextthink
Definition: csprogsdefs.qc:121
const int PROJECTILE_FIREMINE
Definition: projectiles.qh:22
const int CH_SHOTS
Definition: sound.qh:14
float w_deathtype
Definition: damage.qh:97
vector(float skel, float bonenum) _skel_get_boneabs_hidden
IntrusiveList g_projectiles
Definition: common.qh:46
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
Definition: cl_resources.qc:10
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
Definition: damage.qc:1077
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
Definition: vector.qh:8
void accuracy_add(entity this, Weapon w, float fired, float hit)
Definition: accuracy.qc:83
entity Notification
always last
Definition: all.qh:82
float health
Definition: progsdefs.qc:137
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
Definition: damage.qc:1057
bool accuracy_isgooddamage(entity attacker, entity targ)
Definition: accuracy.qc:112
vector v_right
Definition: csprogsdefs.qc:31
entity realowner
Definition: common.qh:25
#define MUTATOR_CALLHOOK(id,...)
Definition: base.qh:140
entity weaponentities[MAX_WEAPONSLOTS]
Definition: weapon.qh:14
setorigin(ent, v)
#define setthink(e, f)
#define sound(e, c, s, v, a)
Definition: sound.qh:52
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition: weapon.qh:41
float time
Definition: csprogsdefs.qc:16
const int MIF_PROXY
Definition: common.qh:36
int dir
Definition: impulse.qc:89
float trace_fraction
Definition: csprogsdefs.qc:36
float W_WeaponRateFactor(entity this)
Definition: weaponsystem.qc:33
float DAMAGE_NO
Definition: progsdefs.qc:282
void set_movetype(entity this, int mt)
float MOVETYPE_FLY
Definition: progsdefs.qc:251
#define IS_PLAYER(v)
Definition: utils.qh:9
var void func_null()
float DAMAGE_YES
Definition: progsdefs.qc:283
int projectiledeathtype
Definition: common.qh:20