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);
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);
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);
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);
167 gren.projectiledeathtype = thiswep.
m_id;
168 gren.weaponentity_fld = weaponentity;
170 setsize(gren,
'-3 -3 -3',
'3 3 3');
173 gren.nextthink =
time;
182 gren.damagedbycontents =
true;
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);
212 gren.owner = gren.realowner = actor;
213 gren.bot_dodge =
true;
214 gren.bot_dodgerating =
WEP_CVAR_SEC(WEP_MORTAR, damage);
220 gren.weaponentity_fld = weaponentity;
222 setsize(gren,
'-3 -3 -3',
'3 3 3');
233 gren.damagedbycontents =
true;
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;
295 thiswep.wr_reload(thiswep, actor, weaponentity);
308 bool nadefound =
false;
311 if(!it.gl_detonate_later)
313 it.gl_detonate_later = true;
350 return WEAPON_MORTAR_SUICIDE_BOUNCE;
352 return WEAPON_MORTAR_SUICIDE_EXPLODE;
358 return WEAPON_MORTAR_MURDER_BOUNCE;
360 return WEAPON_MORTAR_MURDER_EXPLODE;
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));
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
IntrusiveList g_bot_dodge
#define MUTATOR_CALLHOOK(id,...)
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...
#define COLORED_NAME(this)
bool IsFlying(entity this)
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
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)
IntrusiveList g_damagedbycontents
const int HITTYPE_SECONDARY
#define pointparticles(effect, org, vel, howmany)
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
void W_Mortar_Attack2(Weapon thiswep, entity actor,.entity weaponentity)
void W_Mortar_Grenade_Explode2(entity this, entity directhitentity)
void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void W_Mortar_Grenade_Explode_use(entity this, entity actor, entity trigger)
void W_Mortar_Grenade_Think1(entity this)
void W_Mortar_Grenade_Touch2(entity this, entity toucher)
float bot_secondary_grenademooth
void W_Mortar_Grenade_Explode(entity this, entity directhitentity)
void W_Mortar_Grenade_Explode2_use(entity this, entity actor, entity trigger)
void W_Mortar_Attack(Weapon thiswep, entity actor,.entity weaponentity)
void W_Mortar_Grenade_Touch1(entity this, entity toucher)
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCE
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_GRENADE_BOUNCING
const int PROJECTILE_GRENADE
float health
Legacy fields for the resources. To be removed.
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
void adaptor_think2use_hittype_splash(entity this)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
#define sound(e, c, s, v, a)
Sound SND_GRENADE_BOUNCE_RANDOM()
float spamsound(entity e, int chan, Sound samp, float vol, float _atten)
use this one if you might be causing spam (e.g.
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
#define W_SetupProjVelocity_UP_PRI(ent, wep)
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupProjVelocity_UP_SEC(ent, wep)
string W_Guide_Keybinds(Weapon wep)
string W_Guide_DPS(string name, string pri, string sec)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR(wep, name)
#define WEP_CVAR_SEC(wep, name)
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)
float weapon_load[REGISTRY_MAX(Weapons)]