Don't attach nades to the server-side weapon entity, so it can be disabled safely
authorMario <mario@smbclan.net>
Sat, 20 Oct 2018 21:28:53 +0000 (07:28 +1000)
committerMario <mario@smbclan.net>
Sat, 20 Oct 2018 21:28:53 +0000 (07:28 +1000)
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/server/weapons/weaponsystem.qc

index b4a3066..43de3b8 100644 (file)
@@ -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;
index 4a45b25..d791fc7 100644 (file)
@@ -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)