Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
mortar.qc
Go to the documentation of this file.
1#include "mortar.qh"
2
3#ifdef SVQC
4
5void W_Mortar_Grenade_Explode(entity this, entity directhitentity)
6{
7 if(directhitentity.takedamage == DAMAGE_AIM)
8 if(IS_PLAYER(directhitentity))
9 if(DIFF_TEAM(this.realowner, directhitentity))
10 if(!IS_DEAD(directhitentity))
11 if(IsFlying(directhitentity))
12 Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_AIRSHOT);
13
14 this.event_damage = func_null;
15 this.takedamage = DAMAGE_NO;
16
18 this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
19
20 RadiusDamage(this, this.realowner, WEP_CVAR_PRI(WEP_MORTAR, damage), WEP_CVAR_PRI(WEP_MORTAR, edgedamage), WEP_CVAR_PRI(WEP_MORTAR, radius), NULL, NULL, WEP_CVAR_PRI(WEP_MORTAR, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
21
22 delete(this);
23}
24
26{
27 W_Mortar_Grenade_Explode(this, trigger);
28}
29
30void W_Mortar_Grenade_Explode2(entity this, entity directhitentity)
31{
32 if(directhitentity.takedamage == DAMAGE_AIM)
33 if(IS_PLAYER(directhitentity))
34 if(DIFF_TEAM(this.realowner, directhitentity))
35 if(!IS_DEAD(directhitentity))
36 if(IsFlying(directhitentity))
37 Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_AIRSHOT);
38
39 this.event_damage = func_null;
40 this.takedamage = DAMAGE_NO;
41
43 this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
44
45 RadiusDamage(this, this.realowner, WEP_CVAR_SEC(WEP_MORTAR, damage), WEP_CVAR_SEC(WEP_MORTAR, edgedamage), WEP_CVAR_SEC(WEP_MORTAR, radius), NULL, NULL, WEP_CVAR_SEC(WEP_MORTAR, force), this.projectiledeathtype, this.weaponentity_fld, directhitentity);
46
47 delete(this);
48}
49
51{
52 W_Mortar_Grenade_Explode2(this, trigger);
53}
54
55void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
56{
57 if(GetResource(this, RES_HEALTH) <= 0)
58 return;
59
60 if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
61 return; // g_projectiles_damage says to halt
62
63 TakeResource(this, RES_HEALTH, damage);
64
65 if(GetResource(this, RES_HEALTH) <= 0)
66 W_PrepareExplosionByDamage(this, attacker, adaptor_think2use);
67}
68
70{
71 this.nextthink = time;
72 if(time > this.cnt)
73 {
76 return;
77 }
78 if(this.gl_detonate_later && this.gl_bouncecnt >= WEP_CVAR_PRI(WEP_MORTAR, remote_minbouncecnt))
80}
81
83{
85 if(toucher.takedamage == DAMAGE_AIM || WEP_CVAR_PRI(WEP_MORTAR, type) == 0) // always explode when hitting a player, or if normal mortar projectile
86 {
87 this.use(this, NULL, toucher);
88 }
89 else if(WEP_CVAR_PRI(WEP_MORTAR, type) == 1) // bounce
90 {
92 Send_Effect(EFFECT_HAGAR_BOUNCE, this.origin, this.velocity, 1);
94 this.gl_bouncecnt += 1;
95 }
96 else if(WEP_CVAR_PRI(WEP_MORTAR, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick
97 {
98 spamsound(this, CH_SHOTS, SND_MORTAR_STICK, VOL_BASE, ATTN_NORM);
99
100 // let it stick whereever it is
101 this.movedir = this.velocity; // save to this temporary field, will be restored on explosion
102 this.velocity = '0 0 0';
103 set_movetype(this, MOVETYPE_NONE); // also disables gravity
104 this.gravity = 0; // nope, it does NOT! maybe a bug in CSQC code? TODO
106
107 // do not respond to any more touches
108 this.solid = SOLID_NOT;
109
110 this.nextthink = min(this.nextthink, time + WEP_CVAR_PRI(WEP_MORTAR, lifetime_stick));
111 }
112}
113
115{
117 if(toucher.takedamage == DAMAGE_AIM || WEP_CVAR_SEC(WEP_MORTAR, type) == 0) // always explode when hitting a player, or if normal mortar projectile
118 {
119 this.use(this, NULL, toucher);
120 }
121 else if(WEP_CVAR_SEC(WEP_MORTAR, type) == 1) // bounce
122 {
124 Send_Effect(EFFECT_HAGAR_BOUNCE, this.origin, this.velocity, 1);
126 this.gl_bouncecnt += 1;
127
128 if(WEP_CVAR_SEC(WEP_MORTAR, lifetime_bounce) && this.gl_bouncecnt == 1)
129 this.nextthink = time + WEP_CVAR_SEC(WEP_MORTAR, lifetime_bounce);
130
131 }
132 else if(WEP_CVAR_SEC(WEP_MORTAR, type) == 2 && (!toucher || (toucher.takedamage != DAMAGE_AIM && toucher.move_movetype == MOVETYPE_NONE))) // stick
133 {
134 spamsound(this, CH_SHOTS, SND_MORTAR_STICK, VOL_BASE, ATTN_NORM);
135
136 // let it stick whereever it is
137 this.movedir = this.velocity; // save to this temporary field, will be restored on explosion
138 this.velocity = '0 0 0';
139 set_movetype(this, MOVETYPE_NONE); // also disables gravity
140 this.gravity = 0; // nope, it does NOT! maybe a bug in CSQC code? TODO
142
143 // do not respond to any more touches
144 this.solid = SOLID_NOT;
145
146 this.nextthink = min(this.nextthink, time + WEP_CVAR_SEC(WEP_MORTAR, lifetime_stick));
147 }
148}
149
150void W_Mortar_Attack(Weapon thiswep, entity actor, .entity weaponentity)
151{
152 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(WEP_MORTAR, ammo), weaponentity);
153
154 W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_MORTAR_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(WEP_MORTAR, damage), thiswep.m_id);
155 w_shotdir = v_forward; // no TrueAim for grenades please
156
157 W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
158
159 entity gren = new(grenade);
160 gren.owner = gren.realowner = actor;
161 gren.bot_dodge = true;
162 gren.bot_dodgerating = WEP_CVAR_PRI(WEP_MORTAR, damage);
164 gren.bouncefactor = WEP_CVAR(WEP_MORTAR, bouncefactor);
165 gren.bouncestop = WEP_CVAR(WEP_MORTAR, bouncestop);
167 gren.projectiledeathtype = thiswep.m_id;
168 gren.weaponentity_fld = weaponentity;
169 setorigin(gren, w_shotorg);
170 setsize(gren, '-3 -3 -3', '3 3 3');
171
172 gren.cnt = time + WEP_CVAR_PRI(WEP_MORTAR, lifetime);
173 gren.nextthink = time;
177
178 gren.takedamage = DAMAGE_YES;
179 SetResourceExplicit(gren, RES_HEALTH, WEP_CVAR_PRI(WEP_MORTAR, health));
180 gren.damageforcescale = WEP_CVAR_PRI(WEP_MORTAR, damageforcescale);
181 gren.event_damage = W_Mortar_Grenade_Damage;
182 gren.damagedbycontents = true;
184 gren.missile_flags = MIF_SPLASH | MIF_ARC;
185 W_SetupProjVelocity_UP_PRI(gren, WEP_MORTAR);
186
187 gren.angles = vectoangles(gren.velocity);
188 gren.flags = FL_PROJECTILE;
189 IL_PUSH(g_projectiles, gren);
190 IL_PUSH(g_bot_dodge, gren);
191
192 if(WEP_CVAR_PRI(WEP_MORTAR, type) == 0 || WEP_CVAR_PRI(WEP_MORTAR, type) == 2)
193 CSQCProjectile(gren, true, PROJECTILE_GRENADE, true);
194 else
196
197 MUTATOR_CALLHOOK(EditProjectile, actor, gren);
198}
199
200void W_Mortar_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
201{
202 entity gren;
203
204 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(WEP_MORTAR, ammo), weaponentity);
205
206 W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_MORTAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_MORTAR, damage), thiswep.m_id | HITTYPE_SECONDARY);
207 w_shotdir = v_forward; // no TrueAim for grenades please
208
209 W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
210
211 gren = new(grenade);
212 gren.owner = gren.realowner = actor;
213 gren.bot_dodge = true;
214 gren.bot_dodgerating = WEP_CVAR_SEC(WEP_MORTAR, damage);
216 gren.bouncefactor = WEP_CVAR(WEP_MORTAR, bouncefactor);
217 gren.bouncestop = WEP_CVAR(WEP_MORTAR, bouncestop);
219 gren.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
220 gren.weaponentity_fld = weaponentity;
221 setorigin(gren, w_shotorg);
222 setsize(gren, '-3 -3 -3', '3 3 3');
223
224 gren.nextthink = time + WEP_CVAR_SEC(WEP_MORTAR, lifetime);
228
229 gren.takedamage = DAMAGE_YES;
230 SetResourceExplicit(gren, RES_HEALTH, WEP_CVAR_SEC(WEP_MORTAR, health));
231 gren.damageforcescale = WEP_CVAR_SEC(WEP_MORTAR, damageforcescale);
232 gren.event_damage = W_Mortar_Grenade_Damage;
233 gren.damagedbycontents = true;
235 gren.missile_flags = MIF_SPLASH | MIF_ARC;
236 W_SetupProjVelocity_UP_SEC(gren, WEP_MORTAR);
237
238 gren.angles = vectoangles(gren.velocity);
239 gren.flags = FL_PROJECTILE;
240 IL_PUSH(g_projectiles, gren);
241 IL_PUSH(g_bot_dodge, gren);
242
243 if(WEP_CVAR_SEC(WEP_MORTAR, type) == 0 || WEP_CVAR_SEC(WEP_MORTAR, type) == 2)
244 CSQCProjectile(gren, true, PROJECTILE_GRENADE, true);
245 else
247
248 MUTATOR_CALLHOOK(EditProjectile, actor, gren);
249}
250
252
253METHOD(Mortar, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
254{
255 PHYS_INPUT_BUTTON_ATCK(actor) = false;
256 PHYS_INPUT_BUTTON_ATCK2(actor) = false;
257 if(actor.bot_secondary_grenademooth == 0) // WEAPONTODO: merge this into using WEP_CVAR_BOTH
258 {
259 if(bot_aim(actor, weaponentity, WEP_CVAR_PRI(WEP_MORTAR, speed), WEP_CVAR_PRI(WEP_MORTAR, speed_up), WEP_CVAR_PRI(WEP_MORTAR, lifetime), true, true))
260 {
261 PHYS_INPUT_BUTTON_ATCK(actor) = true;
262 if(random() < 0.01) actor.bot_secondary_grenademooth = 1;
263 }
264 }
265 else
266 {
267 if(bot_aim(actor, weaponentity, WEP_CVAR_SEC(WEP_MORTAR, speed), WEP_CVAR_SEC(WEP_MORTAR, speed_up), WEP_CVAR_SEC(WEP_MORTAR, lifetime), true, true))
268 {
269 PHYS_INPUT_BUTTON_ATCK2(actor) = true;
270 if(random() < 0.02) actor.bot_secondary_grenademooth = 0;
271 }
272 }
273}
274
275/*case WR_CALCINFO:
276{
277 wepinfo_pri_refire = max3(sys_frametime, WEP_CVAR_PRI(WEP_MORTAR, refire), WEP_CVAR_PRI(WEP_MORTAR, animtime));
278 wepinfo_pri_dps = (WEP_CVAR_PRI(WEP_MORTAR, damage) * (1 / wepinfo_pri_refire));
279 wepinfo_pri_speed = (1 / max(1, (10000 / max(1, WEP_CVAR_PRI(WEP_MORTAR, speed)))));
280
281 // for the range calculation, closer to 1 is better
282 wepinfo_pri_range_max = 2000 * wepinfo_pri_speed;
283 wepinfo_pri_range = wepinfo_pri_speed * WEP_CVAR_PRI(WEP_MORTAR,
284
285 wepinfo_sec_refire = max3(sys_frametime, WEP_CVAR_SEC(WEP_MORTAR, refire), WEP_CVAR_SEC(WEP_MORTAR, animtime));
286 wepinfo_sec_dps = (WEP_CVAR_SEC(WEP_MORTAR, damage) * (1 / wepinfo_sec_refire));
287
288 wepinfo_sec_dps = (WEP_CVAR_SEC(WEP_MORTAR, damage) * (1 / max3(sys_frametime, WEP_CVAR_SEC(WEP_MORTAR, refire), WEP_CVAR_SEC(WEP_MORTAR, animtime))));
289 wepinfo_ter_dps = 0;
290 */
291
292METHOD(Mortar, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
293{
294 if(autocvar_g_balance_mortar_reload_ammo && actor.(weaponentity).clip_load < min(WEP_CVAR_PRI(WEP_MORTAR, ammo), WEP_CVAR_SEC(WEP_MORTAR, ammo))) { // forced reload
295 thiswep.wr_reload(thiswep, actor, weaponentity);
296 } else if(fire & 1)
297 {
298 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(WEP_MORTAR, refire)))
299 {
300 W_Mortar_Attack(thiswep, actor, weaponentity);
301 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_MORTAR, animtime), w_ready);
302 }
303 }
304 else if(fire & 2)
305 {
306 if(WEP_CVAR_SEC(WEP_MORTAR, remote_detonateprimary))
307 {
308 bool nadefound = false;
309 IL_EACH(g_projectiles, it.realowner == actor && it.classname == "grenade",
310 {
311 if(!it.gl_detonate_later)
312 {
313 it.gl_detonate_later = true;
314 nadefound = true;
315 }
316 });
317 if(nadefound)
318 sound(actor, CH_WEAPON_B, SND_MORTAR_DET, VOL_BASE, ATTN_NORM);
319 }
320 else if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(WEP_MORTAR, refire)))
321 {
322 W_Mortar_Attack2(thiswep, actor, weaponentity);
323 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(WEP_MORTAR, animtime), w_ready);
324 }
325 }
326}
327
328METHOD(Mortar, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
329{
330 float ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(WEP_MORTAR, ammo);
331 ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_PRI(WEP_MORTAR, ammo);
332 return ammo_amount;
333}
334
335METHOD(Mortar, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
336{
337 float ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(WEP_MORTAR, ammo);
338 ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_SEC(WEP_MORTAR, ammo);
339 return ammo_amount;
340}
341
342METHOD(Mortar, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
343{
344 W_Reload(actor, weaponentity, min(WEP_CVAR_PRI(WEP_MORTAR, ammo), WEP_CVAR_SEC(WEP_MORTAR, ammo)), SND_RELOAD); // WEAPONTODO
345}
346
347METHOD(Mortar, wr_suicidemessage, Notification(entity thiswep))
348{
350 return WEAPON_MORTAR_SUICIDE_BOUNCE;
351 else
352 return WEAPON_MORTAR_SUICIDE_EXPLODE;
353}
354
355METHOD(Mortar, wr_killmessage, Notification(entity thiswep))
356{
358 return WEAPON_MORTAR_MURDER_BOUNCE;
359 else
360 return WEAPON_MORTAR_MURDER_EXPLODE;
361}
362
363#endif
364#ifdef CSQC
365
366METHOD(Mortar, wr_impacteffect, void(entity thiswep, entity actor))
367{
368 vector org2 = w_org + w_backoff * 2;
369 pointparticles(EFFECT_GRENADE_EXPLODE, org2, '0 0 0', 1);
370 if(!w_issilent)
371 sound(actor, CH_SHOTS, SND_MORTAR_IMPACT, VOL_BASE, ATTN_NORM);
372}
373
374#endif
375#ifdef MENUQC
377
378METHOD(Mortar, describe, string(Mortar this))
379{
380 TC(Mortar, this);
382 PAR(_("The %s launches a grenade that explodes immediately on impact, dealing a medium amount of splash damage."), COLORED_NAME(this));
383 PAR(_("The secondary fire shoots a similar grenade that explodes shortly after bouncing."));
384 PAR(_("It consumes %s ammo for every grenade launched."), COLORED_NAME(ITEM_Rockets));
385 PAR(_("The %s works best at close to medium ranges, but it's quite tricky to hit an enemy if they're airborne. "
386 "Since the secondary fire grenade bounces before exploding, it can be bounced against walls to damage enemies lurking around a corner."), COLORED_NAME(this));
387 PAR(W_Guide_Keybinds(this));
388 PAR(W_Guide_DPS(this.netname, "primary", "secondary"));
389 return PAGE_TEXT;
390}
391
392#endif
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
int m_id
Definition weapon.qh:45
string netname
Definition powerups.qc:20
float lifetime
Definition powerups.qc:23
float cnt
Definition powerups.qc:24
float gravity
Definition items.qh:17
#define COLORED_NAME(this)
Definition color.qh:195
float radius
Definition impulse.qh:11
bool IsFlying(entity this)
Definition player.qc:836
#define IS_DEAD(s)
Definition player.qh:245
#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
const int FL_PROJECTILE
Definition constants.qh:85
vector velocity
const float SOLID_NOT
float time
float nextthink
vector v_forward
vector origin
const float ATTN_NORM
#define use
void UpdateCSQCProjectile(entity e)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
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
IntrusiveList g_damagedbycontents
Definition damage.qh:135
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_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
solid
Definition ent_cs.qc:165
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define TC(T, sym)
Definition _all.inc:82
vector movedir
Definition viewloc.qh:18
float random(void)
vector vectoangles(vector v)
float min(float f,...)
void W_Mortar_Attack2(Weapon thiswep, entity actor,.entity weaponentity)
Definition mortar.qc:200
void W_Mortar_Grenade_Explode2(entity this, entity directhitentity)
Definition mortar.qc:30
void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition mortar.qc:55
void W_Mortar_Grenade_Explode_use(entity this, entity actor, entity trigger)
Definition mortar.qc:25
void W_Mortar_Grenade_Think1(entity this)
Definition mortar.qc:69
void W_Mortar_Grenade_Touch2(entity this, entity toucher)
Definition mortar.qc:114
float bot_secondary_grenademooth
Definition mortar.qc:251
void W_Mortar_Grenade_Explode(entity this, entity directhitentity)
Definition mortar.qc:5
void W_Mortar_Grenade_Explode2_use(entity this, entity actor, entity trigger)
Definition mortar.qc:50
void W_Mortar_Attack(Weapon thiswep, entity actor,.entity weaponentity)
Definition mortar.qc:150
void W_Mortar_Grenade_Touch1(entity this, entity toucher)
Definition mortar.qc:82
float gl_bouncecnt
Definition mortar.qh:77
float gl_detonate_later
Definition mortar.qh:76
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
const int MOVETYPE_NONE
Definition movetypes.qh:129
float bouncefactor
Definition movetypes.qh:47
float move_movetype
Definition movetypes.qh:76
float bouncestop
Definition movetypes.qh:46
const int MOVETYPE_BOUNCE
Definition movetypes.qh:139
var void func_null()
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
Definition all.qc:1573
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_GRENADE_BOUNCING
Definition projectiles.qh:9
const int PROJECTILE_GRENADE
Definition projectiles.qh:8
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
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
void adaptor_think2use_hittype_splash(entity this)
Definition common.qc:106
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_ARC
Definition common.qh:47
#define PROJECTILE_MAKETRIGGER(e)
Definition common.qh:34
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
#define sound(e, c, s, v, a)
Definition sound.qh:52
const int CH_WEAPON_B
Definition sound.qh:8
Sound SND_GRENADE_BOUNCE_RANDOM()
Definition all.inc:17
float spamsound(entity e, int chan, Sound samp, float vol, float _atten)
use this one if you might be causing spam (e.g.
Definition all.qc:124
#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
float ammo
Definition sv_turrets.qh:43
#define DIFF_TEAM(a, b)
Definition teams.qh:242
entity realowner
#define W_SetupProjVelocity_UP_PRI(ent, wep)
Definition tracing.qh:54
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
vector w_shotorg
Definition tracing.qh:19
#define W_SetupProjVelocity_UP_SEC(ent, wep)
Definition tracing.qh:56
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(wep, name)
Definition all.qh:321
#define WEP_CVAR_SEC(wep, name)
Definition all.qh:323
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)
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)
entity weaponentity_fld
float weapon_load[REGISTRY_MAX(Weapons)]