// Nades
// =======
set g_nades 0 "enable off-hand grenades"
+set g_nades_throw_offset "0 -20 0" "nade throwing offset"
set g_nades_spawn 1 "give nades right away when player spawns rather than delaying entire refire"
set g_nades_client_select 0 "allow client side selection of nade type"
set g_nades_nade_lifetime 3.5
float autocvar_g_random_gravity_negative;
float autocvar_g_random_gravity_delay;
float autocvar_g_nades;
+vector autocvar_g_nades_throw_offset;
float autocvar_g_nades_spawn;
float autocvar_g_nades_spawn_count;
float autocvar_g_nades_client_select;
Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES);
- setorigin(_nade, w_shotorg + (v_right * 25) * -1);
+ 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';
+
+ setorigin(_nade, w_shotorg + offset + (v_right * 25) * -1);
//setmodel(_nade, "models/weapons/v_ok_grenade.md3");
//setattachment(_nade, world, "");
PROJECTILE_MAKETRIGGER(_nade);