From 7a070f6c94fabdf83d776e449119383b7833b353 Mon Sep 17 00:00:00 2001 From: fruitiex Date: Wed, 2 Dec 2009 13:36:45 +0000 Subject: [PATCH] disable weapon throwing in mode 1 of weapon_stay, add a g_weapon_throwable cvar (default 1) git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8348 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/defaultNexuiz.cfg | 3 ++- data/qcsrc/server/cl_weapons.qc | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index 76fdfd913..117c933c4 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -450,7 +450,8 @@ set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun positi set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2" set g_shootfromfixedorigin "" "if set to a string like 0 y z, the gun is moved to the given y and z coordinates. If set to a string like x y z, the whole shot origin is used" set g_pinata 0 "if set to 1 you will not only drop your current weapon when you are killed, but you will drop all weapons that you possessed" -set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)" +set g_weapon_stay 0 "if set to 1 or 2, weapons stay after they were picked up (1: weapons you don't have yet give you ammo of their type and they can not be dropped, 2: weapons don't give ammo, but instead players start with one pickup-load of ammo by default, 3: weapons give ammo, weapons only stay as ammo-less ghosts)" +set g_weapon_throwable 1 "if set to 1, weapons can be dropped" set g_powerup_superhealth 1 "if set to 0 the mega health powerup will not spawn on the map" set g_powerup_strength 1 "if set to 0 the strength powerup will not spawn on the map" set g_powerup_shield 1 "if set to 0 the shield (invincibility) powerup will not spawn on the map" diff --git a/data/qcsrc/server/cl_weapons.qc b/data/qcsrc/server/cl_weapons.qc index 9a0c02f2a..5c2e08e24 100644 --- a/data/qcsrc/server/cl_weapons.qc +++ b/data/qcsrc/server/cl_weapons.qc @@ -271,7 +271,13 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce) return; if (g_nexball && w == WEP_GRENADE_LAUNCHER) return; - if (!cvar("g_pickup_items") || g_ca) + if (!cvar("g_pickup_items")) + return; + if (g_ca) + return; + if(!cvar("g_weapon_throwable")) + return; + if(cvar("g_weapon_stay") == 1) return; if(!W_IsWeaponThrowable(w)) return; -- 2.39.2