From: Mario Date: Sat, 20 Oct 2018 21:28:53 +0000 (+1000) Subject: Don't attach nades to the server-side weapon entity, so it can be disabled safely X-Git-Tag: xonotic-v0.8.5~1753 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=00da55ddccb903191155b984789695c784dd78e2;p=xonotic%2Fxonotic-data.pk3dir.git Don't attach nades to the server-side weapon entity, so it can be disabled safely --- 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)