Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Sun, 20 Nov 2016 18:09:38 +0000 (04:09 +1000)
committerMario <mario@smbclan.net>
Sun, 20 Nov 2016 18:09:38 +0000 (04:09 +1000)
# Conflicts:
# qcsrc/client/view.qc

12 files changed:
1  2 
qcsrc/client/hud/hud.qh
qcsrc/client/view.qc
qcsrc/common/_all.inc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/t_items.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/weapons/all.qh
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/server/bot/default/havocbot/havocbot.qc
qcsrc/server/client.qc

Simple merge
@@@ -314,17 -312,15 +314,14 @@@ void viewmodel_draw(entity this
                CSQCModel_Effects_Apply(e);
        }
        {
 -              static string name_last;
                string name = wep.mdl;
-               if(wep == WEP_TUBA)
-               {
-                       name = (this.tuba_instrument == 0) ? "tuba" :
-                          (this.tuba_instrument == 1) ? "akordeon" :
-                                                    "kleinbottle";
-               }
+               string newname = wep.wr_viewmodel(wep, this);
+               if(newname)
+                       name = newname;
 -              bool swap = name != name_last;
 +              bool swap = name != this.name_last;
                // if (swap)
                {
 -                      name_last = name;
 +                      this.name_last = name;
                        CL_WeaponEntity_SetModel(this, name, swap);
                        this.viewmodel_origin = this.origin;
                        this.viewmodel_angles = this.angles;
Simple merge
Simple merge
Simple merge
@@@ -119,12 -117,14 +119,14 @@@ CLASS(Weapon, Object
          // no weapon specific image for this weapon
          return false;
      }
+     /** (CLIENT) weapon specific view model */
+     METHOD(Weapon, wr_viewmodel, string(Weapon this, entity wep)) { return string_null; }
      /** (CLIENT) weapon specific glow */
 -    METHOD(Weapon, wr_glow, vector(Weapon this, entity actor)) { return '0 0 0'; }
 +    METHOD(Weapon, wr_glow, vector(Weapon this, entity actor, entity wepent)) { return '0 0 0'; }
      /** (SERVER) the weapon is dropped */
 -    METHOD(Weapon, wr_drop, void(Weapon this, entity actor)) {}
 +    METHOD(Weapon, wr_drop, void(Weapon this, entity actor, .entity weaponentity)) {}
      /** (SERVER) a weapon is picked up */
 -    METHOD(Weapon, wr_pickup, void(Weapon this, entity actor)) {}
 +    METHOD(Weapon, wr_pickup, void(Weapon this, entity actor, .entity weaponentity)) {}
      /** (SERVER) update cvar based properties */
      METHOD(Weapon, wr_update, void(Weapon this)) {}
        METHOD(Weapon, display, void(entity this, void(string name, string icon) returns)) {
Simple merge
Simple merge