case PROJECTILE_NADE_BURN: return EFFECT_NADE_TRAIL_BURN(nade_team);
}
- FOREACH(Nades, true, LAMBDA(
+ FOREACH(Nades, true, {
for (int j = 0; j < 2; j++)
{
if (it.m_projectile[j] == proj)
break;
}
}
- ));
+ });
return EFFECT_Null;
}
delete(e.fake_nade);
e.fake_nade = NULL;
+ Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER, CPID_NADES);
+
makevectors(e.v_angle);
// NOTE: always throw from first weapon entity?
W_SetupShot(e, _nade.weaponentity_fld, false, false, SND_Null, CH_WEAPON_A, 0);
- Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER, CPID_NADES);
-
vector offset = (v_forward * autocvar_g_nades_throw_offset.x)
- + (v_right * autocvar_g_nades_throw_offset.y)
- + (v_up * autocvar_g_nades_throw_offset.z);
- if(autocvar_g_nades_throw_offset == '0 0 0')
- offset = '0 0 0';
+ + (v_right * autocvar_g_nades_throw_offset.y)
+ + (v_up * autocvar_g_nades_throw_offset.z);
- setorigin(_nade, w_shotorg + offset + (v_right * 25) * -1);
+ setorigin(_nade, w_shotorg + offset);
//setmodel(_nade, MDL_PROJECTILE_NADE);
//setattachment(_nade, NULL, "");
PROJECTILE_MAKETRIGGER(_nade);
}
else
{
- ntype = ((autocvar_g_nades_client_select) ? this.cvar_cl_nade_type : autocvar_g_nades_nade_type);
- pntype = ((autocvar_g_nades_client_select) ? this.cvar_cl_pokenade_type : autocvar_g_nades_pokenade_monster_type);
+ ntype = ((autocvar_g_nades_client_select) ? CS(this).cvar_cl_nade_type : autocvar_g_nades_nade_type);
+ pntype = ((autocvar_g_nades_client_select) ? CS(this).cvar_cl_pokenade_type : autocvar_g_nades_pokenade_monster_type);
}
spawn_held_nade(this, this, autocvar_g_nades_nade_lifetime, ntype, pntype);
if(autocvar_g_nades_bonus_client_select)
{
- player.nade_type = player.cvar_cl_nade_type;
- player.pokenade_type = player.cvar_cl_pokenade_type;
+ player.nade_type = CS(player).cvar_cl_nade_type;
+ player.pokenade_type = CS(player).cvar_cl_pokenade_type;
}
else
{
{
vector revive_extra_size = '1 1 1' * autocvar_g_freezetag_revive_extra_size;
n = 0;
- FOREACH_CLIENT(IS_PLAYER(it) && it != player, LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && it != player, {
if(!IS_DEAD(it))
if(STAT(FROZEN, it) == 0)
if(SAME_TEAM(it, player))
it.reviving = true;
++n;
}
- ));
+ });
}
if(n && STAT(FROZEN, player) == 3) // OK, there is at least one teammate reviving us
Send_Notification(NOTIF_ONE, o, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname);
}
- FOREACH_CLIENT(IS_PLAYER(it) && it.reviving, LAMBDA(
+ FOREACH_CLIENT(IS_PLAYER(it) && it.reviving, {
it.revive_progress = player.revive_progress;
it.reviving = false;
- ));
+ });
}
}
player.nade_refire = time + autocvar_g_nades_nade_refire;
if(autocvar_g_nades_bonus_client_select)
- player.nade_type = player.cvar_cl_nade_type;
+ player.nade_type = CS(player).cvar_cl_nade_type;
player.nade_timer = 0;
M_ARGV(0, string) = strcat(M_ARGV(0, string), ":Nades");
}
-MUTATOR_HOOKFUNCTION(nades, BuildMutatorsPrettyString)
-{
- M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Nades");
-}
-
MUTATOR_HOOKFUNCTION(nades, BuildGameplayTipsString)
{
M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3nades^8 are enabled, press 'g' to use them\n");