]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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
index 9c19493dced8d4a72e34053237c816449e44335e,c85d075a668f34bb33009d55d16ffb0cff18d7a0..b98e5df0fce34fbdf7e09164196cf87ceb64e4c6
@@@ -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
index 782f3c5cedcbf414c98c6712ce8e21ba44063044,b287b148f3175727cebf8fa1e44a288099ae8e2b..c873f4463302337faf73b3e29ddbba2471b9bf15
@@@ -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