]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 b4a3066fb04a17621faa46e165db9160320e9308..43de3b8cdc6482a91d8f561aec1a9b52f0c81bae 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 4a45b257a5db060c8b68a98facfaac9dd3ca4e5a..d791fc798e3056c1eb8dd6c5931561f4b282871e 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)