if (proj.cnt == PROJECTILE_NAPALM_FOUNTAIN)
{
- loopsound(proj, CH_SHOTS_SINGLE, SND(FIREBALL_FLY2), VOL_BASE, ATTEN_NORM);
+ loopsound(proj, CH_SHOTS_SINGLE, SND_FIREBALL_FLY2, VOL_BASE, ATTEN_NORM);
proj.mins = '-16 -16 -16';
proj.maxs = '16 16 16';
}
DrawNadeProgressBar(myPos, mySize, bonusProgress, nadeColor);
if(autocvar_hud_panel_ammo_text)
- drawstring_aspect(textPos, ftos(bonusNades), eX * (2/3) * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(textPos, ftos(bonusNades), vec2((2/3) * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
if(draw_expanding)
drawpic_aspect_skin_expanding(iconPos, nadeIcon, '1 1 0' * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, expand_time);
{
d = vlen(WarpZone_UnTransformOrigin(RandomSelection_chosen_ent, this.origin) - RandomSelection_chosen_ent.fireball_impactvec);
d = damage + (edgedamage - damage) * (d / dist);
- Fire_AddDamage(RandomSelection_chosen_ent, this.realowner, d * burntime, burntime, this.projectiledeathtype | HITTYPE_BOUNCE);
+ Fire_AddDamage(RandomSelection_chosen_ent, this.realowner, d * burntime, burntime, this.projectiledeathtype);
//trailparticles(this, particleeffectnum(EFFECT_FIREBALL_LASER), this.origin, RandomSelection_chosen_ent.fireball_impactvec);
Send_Effect(EFFECT_FIREBALL_LASER, this.origin, RandomSelection_chosen_ent.fireball_impactvec - this.origin, 1);
}
entity proj;
vector kick;
- spamsound(this, CH_SHOTS, SND(FIREBALL_FIRE), VOL_BASE, ATTEN_NORM);
+ spamsound(this, CH_SHOTS, SND_FIREBALL_FIRE, VOL_BASE, ATTEN_NORM);
proj = new(grenade);
proj.owner = this.owner;
if(!pushdeltatime) return;
// div0: ticrate independent, 1 = identity (not 20)
- toucher.velocity = toucher.velocity * pow(autocvar_g_nades_entrap_strength, pushdeltatime);
+ toucher.velocity = toucher.velocity * (autocvar_g_nades_entrap_strength ** pushdeltatime);
#ifdef SVQC
UpdateCSQCProjectile(toucher);
if(autocvar_g_nades_pickup)
if(time >= this.spawnshieldtime)
if(!toucher.nade && this.health == this.max_health) // no boosted shot pickups, thank you very much
- if(!STAT(FROZEN, toucher))
if(CanThrowNade(toucher)) // prevent some obvious things, like dead players
if(IS_REAL_CLIENT(toucher)) // above checks for IS_PLAYER, don't need to do it here
{
//UpdateCSQCProjectile(this);
if(this.health == this.max_health)
{
- spamsound(this, CH_SHOTS, SND(GRENADE_BOUNCE_RANDOM()), VOL_BASE, ATTEN_NORM);
+ spamsound(this, CH_SHOTS, SND_GRENADE_BOUNCE_RANDOM(), VOL_BASE, ATTEN_NORM);
return;
}
if(this.vehicle)
return false;
- if(gameover)
- return false;
-
if(IS_DEAD(this))
return false;
if(!STAT(FROZEN, frag_target) || !autocvar_g_freezetag_revive_nade)
toss_nade(frag_target, true, '0 0 100', max(frag_target.nade.wait, time + 0.05));
- float killcount_bonus = ((frag_attacker.killcount >= 1) ? bound(0, autocvar_g_nades_bonus_score_minor * frag_attacker.killcount, autocvar_g_nades_bonus_score_medium) : autocvar_g_nades_bonus_score_minor);
-
if(IS_PLAYER(frag_attacker))
{
+ float killcount_bonus = ((CS(frag_attacker).killcount >= 1) ? bound(0, autocvar_g_nades_bonus_score_minor * CS(frag_attacker).killcount, autocvar_g_nades_bonus_score_medium) : autocvar_g_nades_bonus_score_minor);
+
if (SAME_TEAM(frag_attacker, frag_target) || frag_attacker == frag_target)
nades_RemoveBonus(frag_attacker);
else if(frag_target.flagcarried)
nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_medium);
- else if(autocvar_g_nades_bonus_score_spree && frag_attacker.killcount > 1)
+ else if(autocvar_g_nades_bonus_score_spree && CS(frag_attacker).killcount > 1)
{
#define SPREE_ITEM(counta,countb,center,normal,gentle) \
case counta: { nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_spree); break; }
- switch(frag_attacker.killcount)
+ switch(CS(frag_attacker).killcount)
{
KILL_SPREE_LIST
default: nades_GiveBonus(frag_attacker, autocvar_g_nades_bonus_score_minor); break;