From 00da55ddccb903191155b984789695c784dd78e2 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 21 Oct 2018 07:28:53 +1000 Subject: [PATCH] Don't attach nades to the server-side weapon entity, so it can be disabled safely --- qcsrc/common/mutators/mutator/nades/nades.qc | 3 ++- qcsrc/server/weapons/weaponsystem.qc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index b4a3066fb..43de3b8cd 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -1103,7 +1103,8 @@ void spawn_held_nade(entity player, entity nowner, float ntime, int ntype, strin n.alpha = Nades_from(STAT(NADE_BONUS_TYPE, n)).m_alpha; setmodel(fn, MDL_NADE_VIEW); - setattachment(fn, player.(weaponentity), ""); + //setattachment(fn, player.(weaponentity), ""); + fn.viewmodelforclient = player; fn.realowner = fn.owner = player; fn.colormod = Nades_from(STAT(NADE_BONUS_TYPE, n)).m_color; fn.colormap = player.colormap; diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 4a45b257a..d791fc798 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -50,7 +50,7 @@ bool CL_Weaponentity_CustomizeEntityForClient(entity this, entity client) { this.viewmodelforclient = this.owner; if (IS_SPEC(client) && client.enemy == this.owner) this.viewmodelforclient = client; - return true; + return false; } vector CL_Weapon_GetShotOrg(int wpn) -- 2.39.2