if(this.realowner.(weaponentity).m_weapon == thiswep)
{
if(GetResource(this.realowner, thiswep.ammo_type) < WEP_CVAR(devastator, ammo))
- if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(this.realowner.items & IT_UNLIMITED_AMMO))
{
this.realowner.cnt = thiswep.m_id;
ATTACK_FINISHED(this.realowner, weaponentity) = time;
bool handled_as_rocketjump = false;
entity head = NULL;
+ bool allow_rocketjump = WEP_CVAR(devastator, remote_jump);
+ MUTATOR_CALLHOOK(AllowRocketJumping, allow_rocketjump);
+ allow_rocketjump = M_ARGV(0, bool);
- if(WEP_CVAR(devastator, remote_jump_radius))
+ if(allow_rocketjump && WEP_CVAR(devastator, remote_jump_radius))
{
head = WarpZone_FindRadius(
this.origin,
if(this.realowner.(weaponentity).m_weapon == thiswep)
{
if(GetResource(this.realowner, thiswep.ammo_type) < WEP_CVAR(devastator, ammo))
- if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
+ if(!(this.realowner.items & IT_UNLIMITED_AMMO))
{
this.realowner.cnt = thiswep.m_id;
ATTACK_FINISHED(this.realowner, weaponentity) = time;
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(devastator, ammo), weaponentity);
W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage), thiswep.m_id);
- Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
+ W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
entity missile = WarpZone_RefSys_SpawnSameRefSys(actor);
missile.weaponentity_fld = weaponentity;
if(WEP_CVAR(devastator, detonatedelay) >= 0)
missile.spawnshieldtime = time + WEP_CVAR(devastator, detonatedelay);
else
- missile.spawnshieldtime = -1;
+ missile.spawnshieldtime = -1; // NOTE: proximity based when rocket jumping
missile.pushltime = time + WEP_CVAR(devastator, guidedelay);
missile.classname = "rocket";
missile.bot_dodge = true;
CSQCProjectile(missile, WEP_CVAR(devastator, guiderate) == 0 && WEP_CVAR(devastator, speedaccel) == 0, PROJECTILE_ROCKET, false); // because of fly sound
- // muzzle flash for 1st person view
- entity flash = spawn();
- setmodel(flash, MDL_DEVASTATOR_MUZZLEFLASH); // precision set below
- SUB_SetFade(flash, time, 0.1);
- flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
- W_AttachToShotorg(actor, weaponentity, flash, '5 0 0');
-
// common properties
MUTATOR_CALLHOOK(EditProjectile, actor, missile);
});
float desirabledamage;
desirabledamage = enemydamage;
- if(time > actor.invincible_finished && time > actor.spawnshieldtime)
+ if(time > STAT(INVINCIBLE_FINISHED, actor) && time > actor.spawnshieldtime)
desirabledamage = desirabledamage - selfdamage * autocvar_g_balance_selfdamagepercent;
if(teamplay && actor.team)
desirabledamage = desirabledamage - teamdamage;