]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/Mario/hook_typo_fix'
authorRudolf Polzer <divverent@xonotic.org>
Wed, 4 Jun 2014 09:30:49 +0000 (11:30 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 4 Jun 2014 09:30:49 +0000 (11:30 +0200)
* origin/Mario/hook_typo_fix:
  Fix a typo in the bot role mutator hook

1  2 
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_keepaway.qc

index b8419624ffbafaf3ad6ea33a068f1808ea0fd27e,ce66a18f658ae67a9da1896837adefcdf85bcbb0..c9c9b4584b14af089b437c5b81f4c26e105dae95
@@@ -656,7 -656,7 +656,7 @@@ void ctf_FlagThink(
        if(self.mins != FLAG_MIN || self.maxs != FLAG_MAX) { // reset the flag boundaries in case it got squished
                dprint("wtf the flag got squashed?\n");
                tracebox(self.origin, FLAG_MIN, FLAG_MAX, self.origin, MOVE_NOMONSTERS, self);
 -              if(!trace_startsolid) // can we resize it without getting stuck?
 +              if(!trace_startsolid || self.noalign) // can we resize it without getting stuck?
                        setsize(self, FLAG_MIN, FLAG_MAX); }
  
        switch(self.ctf_status) // reset flag angles in case warpzones adjust it
@@@ -793,7 -793,7 +793,7 @@@ void ctf_FlagTouch(
        // special touch behaviors
        if(toucher.vehicle_flags & VHF_ISVEHICLE)
        {
 -              if(autocvar_g_ctf_allow_vehicle_touch)
 +              if(autocvar_g_ctf_allow_vehicle_touch && toucher.owner)
                        toucher = toucher.owner; // the player is actually the vehicle owner, not other
                else
                        return; // do nothing
@@@ -2182,7 -2182,7 +2182,7 @@@ MUTATOR_DEFINITION(gamemode_ctf
        MUTATOR_HOOK(VehicleEnter, ctf_VehicleEnter, CBC_ORDER_ANY);
        MUTATOR_HOOK(VehicleExit, ctf_VehicleExit, CBC_ORDER_ANY);
        MUTATOR_HOOK(AbortSpeedrun, ctf_AbortSpeedrun, CBC_ORDER_ANY);
-       MUTATOR_HOOK(HavocBot_ChooseRule, ctf_BotRoles, CBC_ORDER_ANY);
+       MUTATOR_HOOK(HavocBot_ChooseRole, ctf_BotRoles, CBC_ORDER_ANY);
  
        MUTATOR_ONADD
        {
index 942682c16ff060435497cf6ea7a5bd526bd03ea3,67490bad64dc4d160ca1446f7a06d03a21872f9d..79058b0cf0c806ec98f1d1796bc1c9eb3b83873d
@@@ -25,28 -25,28 +25,28 @@@ void ka_RespawnBall() // runs whenever 
        if(gameover) { return; }
        vector oldballorigin = self.origin;
  
 -      if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256))
 +      if(!MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256))
        {
 -              makevectors(self.angles);
 -              self.movetype = MOVETYPE_BOUNCE;
 -              self.velocity = '0 0 200';
 -              self.angles = '0 0 0';
 -              self.effects = autocvar_g_keepawayball_effects;
 -              self.think = ka_RespawnBall;
 -              self.nextthink = time + autocvar_g_keepawayball_respawntime;
 +              entity spot = SelectSpawnPoint(TRUE);
 +              setorigin(self, spot.origin);
 +              self.angles = spot.angles;
 +      }
  
 -              pointparticles(particleeffectnum("electro_combo"), oldballorigin, '0 0 0', 1);
 -              pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 1);
 +      makevectors(self.angles);
 +      self.movetype = MOVETYPE_BOUNCE;
 +      self.velocity = '0 0 200';
 +      self.angles = '0 0 0';
 +      self.effects = autocvar_g_keepawayball_effects;
 +      self.think = ka_RespawnBall;
 +      self.nextthink = time + autocvar_g_keepawayball_respawntime;
  
 -              WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
 -              WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
 +      pointparticles(particleeffectnum("electro_combo"), oldballorigin, '0 0 0', 1);
 +      pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 1);
  
 -              sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
 -      }
 -      else
 -      {
 -              ka_RespawnBall(); // finding a location failed, retry
 -      }
 +      WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
 +      WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
 +
 +      sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
  }
  
  void ka_TimeScoring()
@@@ -102,8 -102,7 +102,8 @@@ void ka_TouchEvent() // runs any time t
        // messages and sounds
        ka_EventLog("pickup", other);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname);
 -      Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname);
 +      Send_Notification(NOTIF_ALL_EXCEPT, other, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname);
 +      Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_KEEPAWAY_PICKUP_SELF);
        sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
  
        // scoring
@@@ -416,7 -415,7 +416,7 @@@ MUTATOR_DEFINITION(gamemode_keepaway
        MUTATOR_HOOK(PlayerDamage_Calculate, ka_PlayerDamage, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerPowerups, ka_PlayerPowerups, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerUseKey, ka_PlayerUseKey, CBC_ORDER_ANY);
-       MUTATOR_HOOK(HavocBot_ChooseRule, ka_BotRoles, CBC_ORDER_ANY);
+       MUTATOR_HOOK(HavocBot_ChooseRole, ka_BotRoles, CBC_ORDER_ANY);
  
        MUTATOR_ONADD
        {