From 2d9fdd7d30c7e457a516d84bd9b1c1d43c19009b Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Mon, 4 Oct 2010 23:57:02 +0300 Subject: [PATCH] Allow switching to the Mine Layer with no ammo when we have planted mines (wasn't that tricky :) ) --- qcsrc/server/cl_weaponsystem.qc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index e5ad4b66d..c9a5dfc4a 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -981,6 +981,13 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) self = cl; f = weapon_action(wpn, WR_CHECKAMMO1); f = f + weapon_action(wpn, WR_CHECKAMMO2); + + // always allow selecting the Mine Layer if we placed mines, so that we can detonate them + local entity mine; + if(wpn == WEP_MINE_LAYER) + for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self) + f = 1; + self = oldself; } if (!f) -- 2.39.2