Merge branch 'master' into Mario/use1
authorMario <mario@smbclan.net>
Sun, 27 Mar 2016 11:53:07 +0000 (21:53 +1000)
committerMario <mario@smbclan.net>
Sun, 27 Mar 2016 11:53:07 +0000 (21:53 +1000)
# Conflicts:
# qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
# qcsrc/common/triggers/target/spawn.qc
# qcsrc/common/triggers/trigger/gamestart.qc
# qcsrc/lib/defer.qh
# qcsrc/server/mutators/mutator/gamemode_assault.qc

22 files changed:
1  2 
qcsrc/common/gamemodes/gamemode/onslaught/onslaught.qc
qcsrc/common/t_items.qc
qcsrc/common/t_items.qh
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/door_rotating.qc
qcsrc/common/triggers/func/plat.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/target/spawn.qc
qcsrc/common/triggers/teleporters.qh
qcsrc/common/triggers/trigger/jumppads.qc
qcsrc/common/triggers/trigger/jumppads.qh
qcsrc/common/turrets/turret/walker.qc
qcsrc/lib/self.qh
qcsrc/server/cheats.qc
qcsrc/server/g_lights.qc
qcsrc/server/g_models.qc
qcsrc/server/g_subs.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/mutators/mutator/gamemode_domination.qc
qcsrc/server/race.qc

@@@ -1941,11 -1951,11 +1941,11 @@@ MUTATOR_HOOKFUNCTION(ons, MonsterMove
        return false;
  }
  
- void ons_MonsterSpawn_Delayed()
- {SELFPARAM();
-       entity own = this.owner;
+ void ons_MonsterSpawn_Delayed(entity this)
+ {
 -      entity e, own = self.owner;
++      entity own = self.owner;
  
 -      if(!own) { remove(self); return; }
 +      if(!own) { remove(this); return; }
  
        if(own.targetname)
        {
@@@ -1970,9 -1981,9 +1970,9 @@@ MUTATOR_HOOKFUNCTION(ons, MonsterSpawn
        return false;
  }
  
- void ons_TurretSpawn_Delayed()
- {SELFPARAM();
+ void ons_TurretSpawn_Delayed(entity this)
+ {
 -      entity e, own = self.owner;
 +      entity own = self.owner;
  
        if(!own) { remove(self); return; }
  
Simple merge
Simple merge
@@@ -842,12 -848,12 +842,12 @@@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew
                this.trigger_touch = door_touch;
                this.draw = door_draw;
                this.drawmask = MASK_NORMAL;
 -              this.use = door_use;
 +              this.use1 = door_use;
  
-               LinkDoors();
+               LinkDoors(this);
  
                if(this.spawnflags & DOOR_START_OPEN)
-                       door_init_startopen();
+                       door_init_startopen(this);
  
                this.move_time = time;
                this.move_origin = this.origin;
Simple merge
@@@ -176,15 -176,16 +176,15 @@@ void train_link(
        //Net_LinkEntity(self, 0, false, train_send);
  }
  
 -void train_use()
 +void train_use(entity this, entity actor, entity trigger)
  {
 -    SELFPARAM();
 -      self.SUB_NEXTTHINK = self.SUB_LTIME + 1;
 -      self.SUB_THINK = train_next;
 -      self.use = func_null; // not again
 +      this.SUB_NEXTTHINK = this.SUB_LTIME + 1;
 +      this.SUB_THINK = train_next;
 +      this.use1 = func_null; // not again
  }
  
- void func_train_find()
- {SELFPARAM();
+ void func_train_find(entity this)
+ {
        entity targ;
        targ = find(world, targetname, self.target);
        self.target = targ.target;
Simple merge
@@@ -292,11 -297,11 +292,11 @@@ void target_spawn_use(entity this, enti
        }
  }
  
- void target_spawn_spawnfirst()
- {SELFPARAM();
-       entity act = self.target_spawn_activator;
-       if(self.spawnflags & 2)
+ void target_spawn_spawnfirst(entity this)
+ {
 -      activator = self.target_spawn_activator;
 -      if(self.spawnflags & 2)
 -              target_spawn_use();
++      entity act = this.target_spawn_activator;
++      if(this.spawnflags & 2)
 +              target_spawn_use(this, act, NULL);
  }
  
  void initialize_field_db()
Simple merge
Simple merge
  #endif
  
  // Step 6: Remove SELFPARAM in favor of a parameter
 -.void(entity this) selfuse;
 -void use_self() { SELFPARAM(); this.selfuse(this); }
 -#define setuse(e, f) (e.use = use_self, e.selfuse = f)
+ .void(entity this) selftouch;
+ void touch_self() { SELFPARAM(); this.selftouch(this); }
+ #define settouch(e, f) (e.touch = touch_self, e.selftouch = f)
++//.void(entity this) selfuse;
++//void use_self() { SELFPARAM(); this.selfuse(this); }
++//#define setuse(e, f) (e.use = use_self, e.selfuse = f)
+ .void(entity this) selfthink;
+ void think_self() { SELFPARAM(); this.selfthink(this); }
+ #define setthink(e, f) (e.think = think_self, e.selfthink = f)
Simple merge
Simple merge
@@@ -16,43 -16,43 +16,43 @@@ class(BGMScript) .float bgmscriptreleas
  
  .float modelscale;
  
 -void g_model_setcolormaptoactivator ()
 -{SELFPARAM();
 +void g_model_setcolormaptoactivator(entity this, entity actor, entity trigger)
 +{
        if(teamplay)
        {
 -              if(activator.team)
 -                      self.colormap = (activator.team - 1) * 0x11;
 +              if(actor.team)
 +                      this.colormap = (actor.team - 1) * 0x11;
                else
 -                      self.colormap = 0x00;
 +                      this.colormap = 0x00;
        }
        else
 -              self.colormap = floor(random() * 256);
 -      self.colormap |= BIT(10); // RENDER_COLORMAPPED
 +              this.colormap = floor(random() * 256);
 +      this.colormap |= BIT(10); // RENDER_COLORMAPPED
  }
  
 -void g_clientmodel_setcolormaptoactivator ()
 -{SELFPARAM();
 -      g_model_setcolormaptoactivator();
 -      self.SendFlags |= (BIT(3) | BIT(0));
 +void g_clientmodel_setcolormaptoactivator(entity this, entity actor, entity trigger)
 +{
 +      g_model_setcolormaptoactivator(this, actor, trigger);
 +      this.SendFlags |= (BIT(3) | BIT(0));
  }
  
 -void g_clientmodel_use()
 -{SELFPARAM();
 -      if (self.antiwall_flag == 1)
 +void g_clientmodel_use(entity this, entity actor, entity trigger)
 +{
 +      if (this.antiwall_flag == 1)
        {
 -              self.inactive = 1;
 -              self.solid = SOLID_NOT;
 +              this.inactive = 1;
 +              this.solid = SOLID_NOT;
        }
 -      else if (self.antiwall_flag == 2)
 +      else if (this.antiwall_flag == 2)
        {
 -              self.inactive = 0;
 -              self.solid = self.default_solid;
 +              this.inactive = 0;
 +              this.solid = this.default_solid;
        }
 -      g_clientmodel_setcolormaptoactivator();
 +      g_clientmodel_setcolormaptoactivator(this, actor, trigger);
  }
  
- void g_model_dropbyspawnflags()
- {SELFPARAM();
+ void g_model_dropbyspawnflags(entity this)
+ {
        if((self.spawnflags & 3) == 1) // ALIGN_ORIGIN
        {
                traceline(self.origin, self.origin - '0 0 4096', MOVE_NOMONSTERS, self);
Simple merge
Simple merge
@@@ -232,6 -242,11 +232,11 @@@ void assault_roundstart_use(entity this
                WITHSELF(it, turret_respawn());
        ));
  }
 -    assault_roundstart_use(this);
+ void assault_roundstart_use_self()
+ {
+     SELFPARAM();
++    assault_roundstart_use(this, NULL, NULL);
+ }
  
  void assault_wall_think()
  {SELFPARAM();
@@@ -422,9 -437,9 +427,9 @@@ spawnfunc(target_assault_roundstart
  
        assault_attacker_team = NUM_TEAM_1;
        self.classname = "target_assault_roundstart";
-       self.use1 = assault_roundstart_use;
-       self.reset2 = adaptor_think2use;
-       InitializeEntity(self, adaptor_think2use, INITPRIO_FINDTARGET);
 -      self.use = assault_roundstart_use_self;
++      self.use = assault_roundstart_use;
+       self.reset2 = assault_roundstart_use_self;
 -      InitializeEntity(self, assault_roundstart_use, INITPRIO_FINDTARGET);
++      InitializeEntity(self, assault_roundstart_use_self, INITPRIO_FINDTARGET);
  }
  
  // legacy bot code
Simple merge