5 void W_Mortar_Grenade_Explode(
entity this,
entity directhitentity)
12 Send_Notification(NOTIF_ONE, this.
realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_AIRSHOT);
20 RadiusDamage(
this, this.
realowner,
WEP_CVAR_PRI(mortar, damage),
WEP_CVAR_PRI(mortar, edgedamage),
WEP_CVAR_PRI(mortar,
radius),
NULL,
NULL,
WEP_CVAR_PRI(mortar, force), this.
projectiledeathtype, this.
weaponentity_fld, directhitentity);
27 W_Mortar_Grenade_Explode(
this, trigger);
30 void W_Mortar_Grenade_Explode2(
entity this,
entity directhitentity)
37 Send_Notification(NOTIF_ONE, this.
realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_AIRSHOT);
45 RadiusDamage(
this, this.
realowner,
WEP_CVAR_SEC(mortar, damage),
WEP_CVAR_SEC(mortar, edgedamage),
WEP_CVAR_SEC(mortar,
radius),
NULL,
NULL,
WEP_CVAR_SEC(mortar, force), this.
projectiledeathtype, this.
weaponentity_fld, directhitentity);
52 W_Mortar_Grenade_Explode2(
this, trigger);
69 void W_Mortar_Grenade_Think1(
entity this)
75 W_Mortar_Grenade_Explode(
this,
NULL);
78 if(this.gl_detonate_later && this.gl_bouncecnt >=
WEP_CVAR_PRI(mortar, remote_minbouncecnt))
79 W_Mortar_Grenade_Explode(
this,
NULL);
82 void W_Mortar_Grenade_Touch1(
entity this,
entity toucher)
94 this.gl_bouncecnt += 1;
114 void W_Mortar_Grenade_Touch2(
entity this,
entity toucher)
126 this.gl_bouncecnt += 1;
128 if(
WEP_CVAR_SEC(mortar, lifetime_bounce) && this.gl_bouncecnt == 1)
154 W_SetupShot_ProjectileSize(actor, weaponentity,
'-3 -3 -3',
'3 3 3',
false, 4, SND_GRENADE_FIRE,
CH_WEAPON_A,
WEP_CVAR_PRI(mortar, damage), thiswep.
m_id);
159 entity gren =
new(grenade);
160 gren.owner = gren.realowner = actor;
161 gren.bot_dodge =
true;
167 gren.projectiledeathtype = thiswep.
m_id;
168 gren.weaponentity_fld = weaponentity;
170 setsize(gren,
'-3 -3 -3',
'3 3 3');
173 gren.nextthink =
time;
174 setthink(gren, W_Mortar_Grenade_Think1);
175 gren.use = W_Mortar_Grenade_Explode_use;
176 settouch(gren, W_Mortar_Grenade_Touch1);
181 gren.event_damage = W_Mortar_Grenade_Damage;
182 gren.damagedbycontents =
true;
188 gren.flags = FL_PROJECTILE;
206 W_SetupShot_ProjectileSize(actor, weaponentity,
'-3 -3 -3',
'3 3 3',
false, 4, SND_GRENADE_FIRE,
CH_WEAPON_A,
WEP_CVAR_SEC(mortar, damage), thiswep.
m_id |
HITTYPE_SECONDARY);
212 gren.owner = gren.realowner = actor;
213 gren.bot_dodge =
true;
220 gren.weaponentity_fld = weaponentity;
222 setsize(gren,
'-3 -3 -3',
'3 3 3');
226 gren.use = W_Mortar_Grenade_Explode2_use;
227 settouch(gren, W_Mortar_Grenade_Touch2);
232 gren.event_damage = W_Mortar_Grenade_Damage;
233 gren.damagedbycontents =
true;
239 gren.flags = FL_PROJECTILE;
251 .float bot_secondary_grenademooth;
257 if(actor.bot_secondary_grenademooth == 0)
262 if(
random() < 0.01) actor.bot_secondary_grenademooth = 1;
270 if(
random() < 0.02) actor.bot_secondary_grenademooth = 0;
293 thiswep.wr_reload(thiswep, actor, weaponentity);
298 W_Mortar_Attack(thiswep, actor, weaponentity);
306 bool nadefound =
false;
309 if(!it.gl_detonate_later)
311 it.gl_detonate_later = true;
320 W_Mortar_Attack2(thiswep, actor, weaponentity);
344 return WEAPON_MORTAR_SUICIDE_BOUNCE;
346 return WEAPON_MORTAR_SUICIDE_EXPLODE;
351 return WEAPON_MORTAR_MURDER_BOUNCE;
353 return WEAPON_MORTAR_MURDER_EXPLODE;
362 org2 = w_org + w_backoff * 12;
const int PROJECTILE_GRENADE
#define WEP_CVAR_PRI(wepname, name)
#define PHYS_INPUT_BUTTON_ATCK2(s)
#define IL_EACH(this, cond, body)
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity)
#define WEP_CVAR_SEC(wepname, name)
float weapon_load[REGISTRY_MAX(Weapons)]
#define PROJECTILE_MAKETRIGGER(e)
Sound SND_GRENADE_BOUNCE_RANDOM()
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
#define W_SetupProjVelocity_UP_SEC(ent, wepname)
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
IntrusiveList g_damagedbycontents
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
#define WEP_CVAR(wepname, name)
#define METHOD(cname, name, prototype)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
IntrusiveList g_bot_dodge
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
#define PROJECTILE_TOUCH(e, t)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void UpdateCSQCProjectile(entity e)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
#define PHYS_INPUT_BUTTON_ATCK(s)
const int HITTYPE_SECONDARY
bool IsFlying(entity this)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
IntrusiveList g_projectiles
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
entity Notification
always last
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)
#define MUTATOR_CALLHOOK(id,...)
const int PROJECTILE_GRENADE_BOUNCING
void adaptor_think2use_hittype_splash(entity this)
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
#define sound(e, c, s, v, a)
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
#define W_SetupProjVelocity_UP_PRI(ent, wepname)
void set_movetype(entity this, int mt)
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)