Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
fireball.qc
Go to the documentation of this file.
1#include "fireball.qh"
2
3#ifdef SVQC
4
5void 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
20 this,
21 this.realowner,
22 WEP_CVAR_PRI(WEP_FIREBALL, damage),
23 WEP_CVAR_PRI(WEP_FIREBALL, edgedamage),
24 WEP_CVAR_PRI(WEP_FIREBALL, radius),
25 NULL,
26 NULL,
27 WEP_CVAR_PRI(WEP_FIREBALL, force),
29 this.weaponentity_fld, directhitentity
30 );
31
32 if(GetResource(this.realowner, RES_HEALTH) + GetResource(this.realowner, RES_ARMOR) >= d)
33 if(!this.cnt)
34 {
35 modeleffect_spawn("models/sphere/sphere.md3", 0, 0, this.origin, '0 0 0', '0 0 0', '0 0 0', 0, WEP_CVAR_PRI(WEP_FIREBALL, bfgradius), 0.2, 0.05, 0.25);
36
37 // 2. bfg effect
38 // NOTE: this cannot be made warpzone aware by design. So, better intentionally ignore warpzones here.
39 for(e = findradius(this.origin, WEP_CVAR_PRI(WEP_FIREBALL, bfgradius)); e; e = e.chain)
40 {
41 if(e != this.realowner && e.takedamage == DAMAGE_AIM && !IS_INDEPENDENT_PLAYER(e))
42 if(!IS_PLAYER(e) || !this.realowner || DIFF_TEAM(e, this))
43 {
44
45 // can we see fireball?
46 traceline(e.origin + e.view_ofs, this.origin, MOVE_NORMAL, e);
47 if(/* trace_startsolid || */ trace_fraction != 1) // startsolid should be never happening anyway
48 continue;
49 // can we see player who shot fireball?
50 traceline(e.origin + e.view_ofs, this.realowner.origin + this.realowner.view_ofs, MOVE_NORMAL, e);
51 if(trace_ent != this.realowner)
52 if(/* trace_startsolid || */ trace_fraction != 1)
53 continue;
54 dist = vlen(this.origin - e.origin - e.view_ofs);
55 points = (1 - sqrt(dist / WEP_CVAR_PRI(WEP_FIREBALL, bfgradius)));
56 if(points <= 0)
57 continue;
58 dir = normalize(e.origin + e.view_ofs - this.origin);
59
61 accuracy_add(this.realowner, WEP_FIREBALL, 0, WEP_CVAR_PRI(WEP_FIREBALL, bfgdamage) * points, 0); // add to hit
62
63 Damage(
64 e,
65 this,
66 this.realowner,
67 WEP_CVAR_PRI(WEP_FIREBALL, bfgdamage) * points,
70 e.origin + e.view_ofs,
71 WEP_CVAR_PRI(WEP_FIREBALL, bfgforce) * dir
72 );
73
74 Send_Effect(EFFECT_FIREBALL_BFGDAMAGE, e.origin, -1 * dir, 1);
75 }
76 }
77 }
78
79 delete(this);
80}
81
86
87void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
88{
89 W_Fireball_Explode(this, trigger);
90}
91
97
98void W_Fireball_LaserPlay(entity this, float dt, float dist, float damage, float edgedamage, float burntime)
99{
100 entity e;
101 float d;
102 vector p;
103
104 if(damage <= 0)
105 return;
106
108 for(e = WarpZone_FindRadius(this.origin, dist, true); e; e = e.chain)
109 {
110 if(STAT(FROZEN, e) || StatusEffects_active(STATUSEFFECT_Frozen, e)) continue;
111 if(e == this.realowner) continue;
112 if(IS_INDEPENDENT_PLAYER(e)) continue;
113 if(e.takedamage != DAMAGE_AIM) continue;
114 if(IS_PLAYER(e) && this.realowner && SAME_TEAM(e, this)) continue;
115
116 p = e.origin;
117 p.x += e.mins.x + random() * (e.maxs.x - e.mins.x);
118 p.y += e.mins.y + random() * (e.maxs.y - e.mins.y);
119 p.z += e.mins.z + random() * (e.maxs.z - e.mins.z);
120 d = vlen(WarpZone_UnTransformOrigin(e, this.origin) - p);
121 if(d < dist)
122 {
123 e.fireball_impactvec = p;
124 RandomSelection_AddEnt(e, 1 / (1 + d), !StatusEffects_active(STATUSEFFECT_Burning, e));
125 }
126 }
128 {
130 d = damage + (edgedamage - damage) * (d / dist);
132 //trailparticles(this, particleeffectnum(EFFECT_FIREBALL_LASER), this.origin, RandomSelection_chosen_ent.fireball_impactvec);
133 Send_Effect(EFFECT_FIREBALL_LASER, this.origin, RandomSelection_chosen_ent.fireball_impactvec - this.origin, 1);
134 }
135}
136
138{
139 if(time > this.pushltime)
140 {
141 this.cnt = 1;
144 return;
145 }
146
147 W_Fireball_LaserPlay(this, 0.1, WEP_CVAR_PRI(WEP_FIREBALL, laserradius), WEP_CVAR_PRI(WEP_FIREBALL, laserdamage), WEP_CVAR_PRI(WEP_FIREBALL, laseredgedamage), WEP_CVAR_PRI(WEP_FIREBALL, laserburntime));
148
149 this.nextthink = time + 0.1;
150}
151
152void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
153{
154 if(GetResource(this, RES_HEALTH) <= 0)
155 return;
156
157 if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
158 return; // g_projectiles_damage says to halt
159
160 TakeResource(this, RES_HEALTH, damage);
161 if(GetResource(this, RES_HEALTH) <= 0)
162 {
163 this.cnt = 1;
165 }
166}
167
168void W_Fireball_Attack1(entity actor, .entity weaponentity)
169{
170 W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 2, SND_FIREBALL_FIRE2, CH_WEAPON_A, WEP_CVAR_PRI(WEP_FIREBALL, damage) + WEP_CVAR_PRI(WEP_FIREBALL, bfgdamage), WEP_FIREBALL.m_id);
171
172 W_MuzzleFlash(WEP_FIREBALL, actor, weaponentity, w_shotorg, w_shotdir);
173
174 entity proj = new(plasma_prim);
175 proj.owner = proj.realowner = actor;
176 proj.bot_dodge = true;
177 proj.bot_dodgerating = WEP_CVAR_PRI(WEP_FIREBALL, damage);
178 proj.pushltime = time + WEP_CVAR_PRI(WEP_FIREBALL, lifetime);
179 proj.use = W_Fireball_Explode_use;
181 proj.nextthink = time;
182 SetResourceExplicit(proj, RES_HEALTH, WEP_CVAR_PRI(WEP_FIREBALL, health));
183 proj.team = actor.team;
184 proj.event_damage = W_Fireball_Damage;
185 proj.takedamage = DAMAGE_YES;
186 proj.damageforcescale = WEP_CVAR_PRI(WEP_FIREBALL, damageforcescale);
188 proj.projectiledeathtype = WEP_FIREBALL.m_id;
189 proj.weaponentity_fld = weaponentity;
190 setorigin(proj, w_shotorg);
191
193 W_SetupProjVelocity_PRI(proj, WEP_FIREBALL);
194 proj.angles = vectoangles(proj.velocity);
196 setsize(proj, '-16 -16 -16', '16 16 16');
197 proj.flags = FL_PROJECTILE;
198 IL_PUSH(g_projectiles, proj);
199 IL_PUSH(g_bot_dodge, proj);
200 proj.missile_flags = MIF_SPLASH | MIF_PROXY;
201
202 CSQCProjectile(proj, true, PROJECTILE_FIREBALL, true);
203
204 MUTATOR_CALLHOOK(EditProjectile, actor, proj);
205}
206
207void W_Fireball_AttackEffect(entity actor, .entity weaponentity, float i, vector f_diff)
208{
209 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
210 w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
211 Send_Effect(EFFECT_FIREBALL_PRE_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
212}
213
214void W_Fireball_Attack1_Frame4(Weapon thiswep, entity actor, .entity weaponentity, int fire)
215{
216 W_Fireball_Attack1(actor, weaponentity);
217 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_FIREBALL, animtime), w_ready);
218}
219
220void W_Fireball_Attack1_Frame3(Weapon thiswep, entity actor, .entity weaponentity, int fire)
221{
222 W_Fireball_AttackEffect(actor, weaponentity, 0, '+1.25 +3.75 0');
223 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_FIREBALL, animtime), W_Fireball_Attack1_Frame4);
224}
225
226void W_Fireball_Attack1_Frame2(Weapon thiswep, entity actor, .entity weaponentity, int fire)
227{
228 W_Fireball_AttackEffect(actor, weaponentity, 0, '-1.25 +3.75 0');
229 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_FIREBALL, animtime), W_Fireball_Attack1_Frame3);
230}
231
232void W_Fireball_Attack1_Frame1(Weapon thiswep, entity actor, .entity weaponentity, int fire)
233{
234 W_Fireball_AttackEffect(actor, weaponentity, 1, '+1.25 -3.75 0');
235 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_FIREBALL, animtime), W_Fireball_Attack1_Frame2);
236}
237
238void W_Fireball_Attack1_Frame0(Weapon thiswep, entity actor, .entity weaponentity, int fire)
239{
240 W_Fireball_AttackEffect(actor, weaponentity, 0, '-1.25 -3.75 0');
241 sound(actor, CH_WEAPON_SINGLE, SND_FIREBALL_PREFIRE2, VOL_BASE, ATTEN_NORM);
242 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_FIREBALL, animtime), W_Fireball_Attack1_Frame1);
243}
244
246{
247 if(time > this.pushltime)
248 {
249 delete(this);
250 return;
251 }
252
253 // make it "hot" once it leaves its owner
254 if(this.owner)
255 {
256 if(vdist(this.origin - this.owner.origin - this.owner.view_ofs, >, WEP_CVAR_SEC(WEP_FIREBALL, laserradius)))
257 {
258 this.cnt += 1;
259 if(this.cnt == 3)
260 this.owner = NULL;
261 }
262 else
263 this.cnt = 0;
264 }
265
266 W_Fireball_LaserPlay(this, 0.1, WEP_CVAR_SEC(WEP_FIREBALL, laserradius), WEP_CVAR_SEC(WEP_FIREBALL, laserdamage), WEP_CVAR_SEC(WEP_FIREBALL, laseredgedamage), WEP_CVAR_SEC(WEP_FIREBALL, laserburntime));
267
268 this.nextthink = time + 0.1;
269}
270
272{
274 if(toucher.takedamage == DAMAGE_AIM)
275 if(Fire_AddDamage(toucher, this.realowner, WEP_CVAR_SEC(WEP_FIREBALL, damage), WEP_CVAR_SEC(WEP_FIREBALL, damagetime), this.projectiledeathtype) >= 0)
276 {
277 delete(this);
278 return;
279 }
281}
282
283void W_Fireball_Attack2(entity actor, .entity weaponentity)
284{
285 entity proj;
286 vector f_diff;
287 float c;
288
289 c = actor.(weaponentity).bulletcounter % 4;
290 switch(c)
291 {
292 case 0:
293 f_diff = '-1.25 -3.75 0';
294 break;
295 case 1:
296 f_diff = '+1.25 -3.75 0';
297 break;
298 case 2:
299 f_diff = '-1.25 +3.75 0';
300 break;
301 case 3:
302 default:
303 f_diff = '+1.25 +3.75 0';
304 break;
305 }
306 W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 2, SND_FIREBALL_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_FIREBALL, damage), WEP_FIREBALL.m_id | HITTYPE_SECONDARY);
307 traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, actor);
309
310 W_MuzzleFlash(WEP_FIREBALL, actor, weaponentity, w_shotorg, w_shotdir);
311
312 proj = new(grenade);
313 proj.owner = proj.realowner = actor;
314 proj.bot_dodge = true;
315 proj.bot_dodgerating = WEP_CVAR_SEC(WEP_FIREBALL, damage);
317 proj.projectiledeathtype = WEP_FIREBALL.m_id | HITTYPE_SECONDARY;
320 setsize(proj, '-4 -4 -4', '4 4 4');
321 setorigin(proj, w_shotorg);
323 proj.nextthink = time;
324 proj.damageforcescale = WEP_CVAR_SEC(WEP_FIREBALL, damageforcescale);
325 proj.pushltime = time + WEP_CVAR_SEC(WEP_FIREBALL, lifetime);
326 W_SetupProjVelocity_UP_SEC(proj, WEP_FIREBALL);
327
328 proj.angles = vectoangles(proj.velocity);
329 proj.flags = FL_PROJECTILE;
330 IL_PUSH(g_projectiles, proj);
331 IL_PUSH(g_bot_dodge, proj);
332 proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
333
334 CSQCProjectile(proj, true, PROJECTILE_FIREMINE, true);
335
336 MUTATOR_CALLHOOK(EditProjectile, actor, proj);
337}
338
339METHOD(Fireball, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
340{
341 PHYS_INPUT_BUTTON_ATCK(actor) = false;
342 PHYS_INPUT_BUTTON_ATCK2(actor) = false;
343 if(actor.bot_primary_fireballmooth == 0)
344 {
345 if(bot_aim(actor, weaponentity, WEP_CVAR_PRI(WEP_FIREBALL, speed), 0, WEP_CVAR_PRI(WEP_FIREBALL, lifetime), false, false))
346 {
347 PHYS_INPUT_BUTTON_ATCK(actor) = true;
348 if(random() < 0.02) actor.bot_primary_fireballmooth = 1;
349 }
350 }
351 else
352 {
353 if(bot_aim(actor, weaponentity, WEP_CVAR_SEC(WEP_FIREBALL, speed), WEP_CVAR_SEC(WEP_FIREBALL, speed_up), WEP_CVAR_SEC(WEP_FIREBALL, lifetime), true, false))
354 {
355 PHYS_INPUT_BUTTON_ATCK2(actor) = true;
356 if(random() < 0.01) actor.bot_primary_fireballmooth = 0;
357 }
358 }
359}
360
361METHOD(Fireball, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
362{
363 if(fire & 1)
364 {
365 if(time >= actor.(weaponentity).fireball_primarytime)
366 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(WEP_FIREBALL, refire)))
367 {
368 W_Fireball_Attack1_Frame0(thiswep, actor, weaponentity, fire);
369 actor.(weaponentity).fireball_primarytime = time + WEP_CVAR_PRI(WEP_FIREBALL, refire2) * W_WeaponRateFactor(actor);
370 }
371 }
372 else if(fire & 2)
373 {
374 if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(WEP_FIREBALL, refire)))
375 {
376 W_Fireball_Attack2(actor, weaponentity);
377 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(WEP_FIREBALL, animtime), w_ready);
378 }
379 }
380}
381
382METHOD(Fireball, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
383{
384 return true; // infinite ammo
385}
386
387METHOD(Fireball, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
388{
389 return true; // fireball has infinite ammo
390}
391
392METHOD(Fireball, wr_resetplayer, void(entity thiswep, entity actor))
393{
394 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
395 {
396 .entity weaponentity = weaponentities[slot];
397 actor.(weaponentity).fireball_primarytime = time;
398 }
399}
400
401METHOD(Fireball, wr_suicidemessage, Notification(entity thiswep))
402{
404 return WEAPON_FIREBALL_SUICIDE_FIREMINE;
405 else
406 return WEAPON_FIREBALL_SUICIDE_BLAST;
407}
408
409METHOD(Fireball, wr_killmessage, Notification(entity thiswep))
410{
412 return WEAPON_FIREBALL_MURDER_FIREMINE;
413 else
414 return WEAPON_FIREBALL_MURDER_BLAST;
415}
416
417#endif
418#ifdef CSQC
419
420METHOD(Fireball, wr_impacteffect, void(entity thiswep, entity actor))
421{
423 {
424 // firemine goes out silently
425 }
426 else
427 {
428 vector org2 = w_org + w_backoff * 2;
429 pointparticles(EFFECT_FIREBALL_EXPLODE, org2, '0 0 0', 1);
430 if(!w_issilent)
431 sound(actor, CH_SHOTS, SND_FIREBALL_IMPACT2, VOL_BASE, ATTEN_NORM * 0.25); // long range boom
432 }
433}
434
435#endif
436#ifdef MENUQC
437
438METHOD(Fireball, describe, string(Fireball this))
439{
440 TC(Fireball, this);
442 PAR(_("The %s supercharges then fires a massive fireball in a straight line, dealing heaps of splash damage over a large radius on impact."), COLORED_NAME(this));
443 PAR(_("The secondary fire launches flaming balls that set nearby players alight."));
444 PAR(_("It is a superweapon, so isn't often found in game."));
445 PAR(_("It doesn't require ammo, but it is destroyed after some time."));
446 PAR(_("Since the %s takes a moment to charge and the fireball travels slowly, using it effectively may be difficult, "
447 "but if done properly it can deal a ton of damage."), COLORED_NAME(this));
448 PAR(W_Guide_Keybinds(this));
449 PAR(W_Guide_DPS(this.netname, "primary", "secondary"));
450 return PAGE_TEXT;
451}
452
453#endif
void accuracy_add(entity this, Weapon w, float fired, float hit, float real)
update accuracy stats
Definition accuracy.qc:102
bool accuracy_isgooddamage(entity attacker, entity targ)
does this damage count towards accuracy stats?
Definition accuracy.qc:133
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
IntrusiveList g_bot_dodge
Definition api.qh:150
#define MUTATOR_CALLHOOK(id,...)
Definition base.qh:143
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:44
string netname
Definition powerups.qc:20
float lifetime
Definition powerups.qc:23
float cnt
Definition powerups.qc:24
entity owner
Definition main.qh:87
#define COLORED_NAME(this)
Definition color.qh:195
float radius
Definition impulse.qh:11
#define IS_PLAYER(s)
Definition player.qh:243
#define PHYS_INPUT_BUTTON_ATCK(s)
Definition player.qh:150
#define PHYS_INPUT_BUTTON_ATCK2(s)
Definition player.qh:152
float W_WeaponRateFactor(entity this)
const int FL_PROJECTILE
Definition constants.qh:85
vector v_up
entity trace_ent
const float MOVE_NORMAL
float time
vector v_right
vector trace_endpos
float nextthink
vector origin
float trace_fraction
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition damage.qc:503
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:981
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
Definition damage.qc:1002
vector w_org
int w_deathtype
float damageforcescale
vector w_backoff
float w_issilent
const int HITTYPE_BOUNCE
Definition all.qh:31
const int HITTYPE_SPLASH
Definition all.qh:30
const int HITTYPE_SECONDARY
Definition all.qh:29
float speed
Definition dynlight.qc:9
#define pointparticles(effect, org, vel, howmany)
Definition effect.qh:7
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
Definition all.qc:124
RES_ARMOR
Definition ent_cs.qc:130
void W_Fireball_Think(entity this)
Definition fireball.qc:137
void W_Fireball_LaserPlay(entity this, float dt, float dist, float damage, float edgedamage, float burntime)
Definition fireball.qc:98
void W_Fireball_Attack2(entity actor,.entity weaponentity)
Definition fireball.qc:283
void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
Definition fireball.qc:87
void W_Fireball_TouchExplode(entity this, entity toucher)
Definition fireball.qc:92
void W_Fireball_Firemine_Touch(entity this, entity toucher)
Definition fireball.qc:271
void W_Fireball_Attack1_Frame0(Weapon thiswep, entity actor,.entity weaponentity, int fire)
Definition fireball.qc:238
void W_Fireball_Firemine_Think(entity this)
Definition fireball.qc:245
void W_Fireball_Explode(entity this, entity directhitentity)
Definition fireball.qc:5
void W_Fireball_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition fireball.qc:152
void W_Fireball_Attack1_Frame1(Weapon thiswep, entity actor,.entity weaponentity, int fire)
Definition fireball.qc:232
void W_Fireball_Attack1_Frame4(Weapon thiswep, entity actor,.entity weaponentity, int fire)
Definition fireball.qc:214
void W_Fireball_Attack1_Frame3(Weapon thiswep, entity actor,.entity weaponentity, int fire)
Definition fireball.qc:220
void W_Fireball_Explode_think(entity this)
Definition fireball.qc:82
void W_Fireball_Attack1(entity actor,.entity weaponentity)
Definition fireball.qc:168
void W_Fireball_AttackEffect(entity actor,.entity weaponentity, float i, vector f_diff)
Definition fireball.qc:207
void W_Fireball_Attack1_Frame2(Weapon thiswep, entity actor,.entity weaponentity, int fire)
Definition fireball.qc:226
float fireball_primarytime
Definition fireball.qh:78
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
float pushltime
Definition jumppads.qh:21
#define TC(T, sym)
Definition _all.inc:82
#define STAT(...)
Definition stats.qh:82
entity WarpZone_FindRadius(vector org, float rad, bool needlineofsight)
Definition common.qc:686
vector WarpZone_UnTransformOrigin(entity wz, vector v)
Definition common.qc:545
float random(void)
float vlen(vector v)
vector vectoangles(vector v)
float sqrt(float f)
vector normalize(vector v)
void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2)
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
const int MOVETYPE_FLY
Definition movetypes.qh:134
const int MOVETYPE_BOUNCE
Definition movetypes.qh:139
var void func_null()
entity Notification
always last
Definition all.qh:81
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define NULL
Definition post.qh:14
const int PROJECTILE_FIREMINE
const int PROJECTILE_FIREBALL
ERASEABLE void RandomSelection_Init()
Definition random.qc:4
#define RandomSelection_AddEnt(e, weight, priority)
Definition random.qh:14
entity RandomSelection_chosen_ent
Definition random.qh:5
float health
Legacy fields for the resources. To be removed.
Definition resources.qh:9
#define setthink(e, f)
vector
Definition self.qh:92
entity entity toucher
Definition self.qh:72
#define settouch(e, f)
Definition self.qh:73
#define IS_INDEPENDENT_PLAYER(e)
Definition client.qh:312
int dir
Definition impulse.qc:89
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
Definition common.qc:45
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
Definition common.qc:87
const int MIF_SPLASH
Definition common.qh:46
int projectiledeathtype
Definition common.qh:21
#define PROJECTILE_TOUCH(e, t)
Definition common.qh:28
IntrusiveList g_projectiles
Definition common.qh:58
const int MIF_PROXY
Definition common.qh:48
const int MIF_ARC
Definition common.qh:47
#define PROJECTILE_MAKETRIGGER(e)
Definition common.qh:34
const int CH_WEAPON_SINGLE
Definition sound.qh:9
const float VOL_BASE
Definition sound.qh:36
const int CH_SHOTS
Definition sound.qh:14
const int CH_WEAPON_A
Definition sound.qh:7
const float ATTEN_NORM
Definition sound.qh:30
#define sound(e, c, s, v, a)
Definition sound.qh:52
bool StatusEffects_active(StatusEffect this, entity actor)
#define PAGE_TEXT
Definition string.qh:643
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:649
#define PAGE_TEXT_INIT()
Definition string.qh:642
const int DAMAGE_YES
Definition subs.qh:80
const int DAMAGE_NO
Definition subs.qh:79
const int DAMAGE_AIM
Definition subs.qh:81
float takedamage
Definition subs.qh:78
#define SAME_TEAM(a, b)
Definition teams.qh:241
#define DIFF_TEAM(a, b)
Definition teams.qh:242
entity realowner
vector w_shotdir
Definition tracing.qh:20
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
Definition tracing.qh:30
#define W_SetupProjVelocity_PRI(ent, wep)
Definition tracing.qh:65
vector w_shotorg
Definition tracing.qh:19
#define W_SetupProjVelocity_UP_SEC(ent, wep)
Definition tracing.qh:56
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
Definition vector.qh:8
string W_Guide_Keybinds(Weapon wep)
Definition all.qc:836
string W_Guide_DPS(string name, string pri, string sec)
Definition all.qc:930
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
Definition all.qc:728
#define WEP_CVAR_PRI(wep, name)
Definition all.qh:322
#define WEP_CVAR_SEC(wep, name)
Definition all.qh:323
const int MAX_WEAPONSLOTS
Definition weapon.qh:16
entity weaponentities[MAX_WEAPONSLOTS]
Definition weapon.qh:17
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
float bulletcounter
entity weaponentity_fld