Merge branch 'master' into TimePath/items 245/head
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Oct 2015 07:57:34 +0000 (18:57 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 29 Oct 2015 07:57:34 +0000 (18:57 +1100)
# Conflicts:
# qcsrc/lib/misc.qh
# qcsrc/lib/oo.qh

47 files changed:
1  2 
qcsrc/client/hud.qc
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/common/turrets/turret/ewheel_weapon.qc
qcsrc/common/turrets/turret/flac_weapon.qc
qcsrc/common/turrets/turret/hellion_weapon.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/machinegun_weapon.qc
qcsrc/common/turrets/turret/mlrs_weapon.qc
qcsrc/common/turrets/turret/phaser_weapon.qc
qcsrc/common/turrets/turret/plasma_dual.qc
qcsrc/common/turrets/turret/plasma_weapon.qc
qcsrc/common/turrets/turret/tesla_weapon.qc
qcsrc/common/turrets/turret/walker_weapon.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hmg.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/rpc.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/lib/misc.qh
qcsrc/lib/oo.qh
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh
qcsrc/server/weapons/throwing.qc

Simple merge
Simple merge
@@@ -1,7 -1,8 +1,9 @@@
  #ifndef WEAPON_H
  #define WEAPON_H
 +#include "../items/item/pickup.qh"
  
+ const int MAX_WEAPONSLOTS = 2;
  .int ammo_shells;
  .int ammo_nails;
  .int ammo_rockets;
Simple merge
Simple merge
Simple merge
@@@ -43,9 -43,9 +43,9 @@@ HMG_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP
  #ifdef IMPLEMENTATION
  #ifdef SVQC
  
 -spawnfunc(weapon_hmg) { weapon_defaultspawnfunc(WEP_HMG.m_id); }
 +spawnfunc(weapon_hmg) { weapon_defaultspawnfunc(this, WEP_HMG); }
  
- void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, bool fire1, bool fire2)
+ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, int slot, int fire)
  {
        if (!actor.BUTTON_ATCK)
        {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
  
  #define GET(name) name##get
  #define GETTER(type, name) type GET(name)() { return name; }
 -
 +#define PROPERTY(type, name) type name; GETTER(type, name)
- #define LAMBDA(...) { __VA_ARGS__ ; }
+ #define LAMBDA(...) { __VA_ARGS__; }
  
- // Can't wrap with do-while as block may contain continue or break
- #define WITH(type, name, value, block) { \
-     type __with_save = (name); \
-     name = (value); \
-     LAMBDA(block) \
-     name = __with_save; \
- } do { } while (0)
+ // With block may not contain continue or break
+ #define WITH(type, name, value, block) \
+       do \
+       { \
+               type __with_save = (name); \
+               name = (value); \
+               LAMBDA(block) \
+               name = __with_save; \
+       } \
+       while (0)
  
  #endif
diff --cc qcsrc/lib/oo.qh
@@@ -87,46 -94,58 +94,58 @@@ STATIC_INIT(RegisterClasses
  #define INIT(cname) [[accumulate]] cname spawn##cname##_1(cname this)
  
  #define CLASS(cname, base)                  \
-     entityclass(cname, base);               \
-     class(cname) .bool instanceOf##cname;   \
-     VTBL(cname, base)                       \
-     INIT_STATIC(cname) {                    \
-         if (cname##_vtbl) {                 \
-             copyentity(cname##_vtbl, this); \
-             return;                         \
-         }                                   \
-         spawn##base##_static(this);         \
-         this.instanceOf##cname = true;      \
-     }                                       \
-     INIT(cname) {                           \
-         /* Only statically initialize the current class, it contains everything it inherits */ \
-         if (cname##_vtbl.vtblname == this.classname) { \
-             spawn##cname##_static(this);    \
-             this.classname = #cname;        \
-             this.vtblname = string_null;    \
-             this.vtblbase = cname##_vtbl;   \
-         }                                   \
-         spawn##base##_1(this);              \
-     }
+       entityclass(cname, base);               \
+       class(cname).bool instanceOf##cname;   \
+       VTBL(cname, base)                       \
+       INIT_STATIC(cname) \
+       {                    \
+               if (cname##_vtbl) \
+               {                 \
+                       copyentity(cname##_vtbl, this); \
+                       return;                         \
+               }                                   \
+               spawn##base##_static(this);         \
+               this.instanceOf##cname = true;      \
+       }                                       \
+       INIT(cname) \
+       {                           \
+               /* Only statically initialize the current class, it contains everything it inherits */ \
+               if (cname##_vtbl.vtblname == this.classname) \
+               { \
+                       spawn##cname##_static(this);    \
+                       this.classname = #cname;        \
+                       this.vtblname = string_null;    \
+                       this.vtblbase = cname##_vtbl;   \
+               }                                   \
+               spawn##base##_1(this);              \
+       }
  
  #define METHOD(cname, name, prototype)      \
-     class(cname) .prototype name;           \
-     prototype cname##_##name;               \
-     INIT_STATIC(cname) { this.name = cname##_##name; } \
-     prototype cname##_##name
+       class(cname).prototype name;           \
+       prototype cname##_##name;               \
+       INIT_STATIC(cname) \
+       { \
+               this.name = cname##_##name; \
+       } \
+       prototype cname##_##name
  
  #define ATTRIB(cname, name, type, val)      \
-     class(cname) .type name;                \
-     INIT(cname) { this.name = val; }
+       class(cname).type name;                \
+       INIT(cname) \
+       { \
+               this.name = val; \
+       }
  
  #define ATTRIBARRAY(cname, name, type, cnt) \
-     class(cname) .type name[cnt];
+       class(cname).type name[cnt];
  
  #define ENDCLASS(cname) \
-     INIT(cname) { return this; }
 -      [[last]] INIT(cname) \
++      INIT(cname) \
+       { \
+               return this; \
+       }
  
  #define SUPER(cname) (cname##_vtbl.vtblbase)
- #define super (this.vtblbase.vtblbase)
  
  #define spawn_static(this)
  #define spawn_1(this)
Simple merge
Simple merge
Simple merge
Simple merge