Merge branch 'TimePath/modules'
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 21 Aug 2016 06:29:24 +0000 (16:29 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 21 Aug 2016 06:29:39 +0000 (16:29 +1000)
# Conflicts:
# qcsrc/common/turrets/turret/fusionreactor.qc

1  2 
qcsrc/common/mutators/mutator/waypoints/all.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/turrets/turret/fusionreactor.qh
qcsrc/server/g_damage.qc
qcsrc/server/mutators/events.qh

index e08d9e9873f4d9ca239766bd912603c885eac4d2,d99b27e932babd17acb43590a98d8256ffc8381a..77c4312001de399edeaaddd1d9a1abcc7de55020
@@@ -1,9 -1,8 +1,8 @@@
- #ifndef WAYPOINTS_ALL_H
- #define WAYPOINTS_ALL_H
+ #pragma once
  
  #include "waypointsprites.qh"
  
 -REGISTRY(Waypoints, BITS(6))
 +REGISTRY(Waypoints, BITS(7))
  #define Waypoints_from(i) _Waypoints_from(i, WP_Null)
  REGISTER_REGISTRY(Waypoints)
  REGISTRY_CHECK(Waypoints)
@@@ -58,5 -57,3 +57,3 @@@ REGISTER_RADARICON(Vehicle,         1)
  REGISTER_RADARICON(Weapon,          1);
  
  #include "all.inc"
- #endif
index 4c98f32821beaf40cd47db062fc6be9dc6b8109f,8bcb2d62ac28a4fb76f74ededaebd17c14d6f6bf..7e5f79317f6dc046238f83bf5c8995da2b12b077
@@@ -1,7 -1,5 +1,5 @@@
  #include "waypointsprites.qh"
  
- #ifdef IMPLEMENTATION
  REGISTER_MUTATOR(waypointsprites, true);
  
  REGISTER_NET_LINKED(waypointsprites)
@@@ -18,12 -16,10 +16,12 @@@ bool WaypointSprite_SendEntity(entity t
          sendflags |= 0x80;
  
      int f = 0;
 -    if(this.currentammo)
 +    if(this.currentammo == 1)
          f |= 1; // hideable
      if(this.exteriormodeltoclient == to)
          f |= 2; // my own
 +    if(this.currentammo == 2)
 +        f |= 2; // radar only
  
      MUTATOR_CALLHOOK(SendWaypoint, this, to, sendflags, f);
      sendflags = M_ARGV(2, int);
@@@ -1149,4 -1145,3 +1147,3 @@@ void WaypointSprite_PlayerGone(entity t
      WaypointSprite_DetachCarrier(this);
  }
  #endif
- #endif
index 0000000000000000000000000000000000000000,5d3313e5561b763ae9750ea3fc42cddfe73429cb..134b805e9f56a881ef43cd3b8145a04002f84358
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,13 +1,13 @@@
 -/* netname    */ ATTRIB(FusionReactor, netname, string, "fusionreactor");
+ #pragma once
+ CLASS(FusionReactor, Turret)
+ /* spawnflags */ ATTRIB(FusionReactor, spawnflags, int, TUR_FLAG_SUPPORT | TUR_FLAG_AMMOSOURCE);
+ /* mins       */ ATTRIB(FusionReactor, mins, vector, '-34 -34 0');
+ /* maxs       */ ATTRIB(FusionReactor, maxs, vector, '34 34 90');
+ /* modelname  */ ATTRIB(FusionReactor, mdl, string, "base.md3");
+ /* model      */ ATTRIB_STRZONE(FusionReactor, model, string, strcat("models/turrets/", this.mdl));
+ /* head_model */ ATTRIB_STRZONE(FusionReactor, head_model, string, strcat("models/turrets/", "reactor.md3"));
++/* netname    */ ATTRIB(FusionReactor, netname, string, "fusreac");
+ /* fullname   */ ATTRIB(FusionReactor, turret_name, string, _("Fusion Reactor"));
+ ENDCLASS(FusionReactor)
+ REGISTER_TURRET(FUSIONREACTOR, NEW(FusionReactor));
diff --combined qcsrc/server/g_damage.qc
index 72904757af216e8d7e8789f9c83c66ba22cf104d,612528a61bd32dc32c483d1f32b673754ddd54cb..e3cada6c84b0acc6332325b7cc9f71ddce10797a
@@@ -2,14 -2,14 +2,14 @@@
  
  #include "bot/api.qh"
  #include "g_hook.qh"
- #include "mutators/all.qh"
+ #include "mutators/_mod.qh"
  #include "scores.qh"
  #include "spawnpoints.qh"
  #include "../common/state.qh"
  #include "../common/physics/player.qh"
  #include "../common/t_items.qh"
  #include "../common/vehicles/all.qh"
- #include "../common/items/all.qc"
+ #include "../common/items/_mod.qh"
  #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
  #include "weapons/accuracy.qh"
  #include "weapons/csqcprojectile.qh"
@@@ -21,7 -21,7 +21,7 @@@
  #include "../common/playerstats.qh"
  #include "../common/teams.qh"
  #include "../common/util.qh"
- #include "../common/weapons/all.qh"
+ #include <common/weapons/_all.qh>
  #include "../lib/csqcmodel/sv_model.qh"
  #include "../lib/warpzone/common.qh"
  
@@@ -111,6 -111,8 +111,8 @@@ void GiveFrags (entity attacker, entit
                UpdateFrags(attacker, f);
  }
  
+ .entity kh_next;
  string AppendItemcodes(string s, entity player)
  {
        int w = PS(player).m_weapon.m_id;
@@@ -788,7 -790,7 +790,7 @@@ void Damage (entity targ, entity inflic
                        else
                                victim = targ;
  
 -                      if(IS_PLAYER(victim) || (IS_TURRET(victim) && victim.active == ACTIVE_ACTIVE) || IS_MONSTER(victim) || MUTATOR_CALLHOOK(PlayHitsound, victim))
 +                      if(IS_PLAYER(victim) || (IS_TURRET(victim) && victim.active == ACTIVE_ACTIVE) || IS_MONSTER(victim) || MUTATOR_CALLHOOK(PlayHitsound, victim, attacker))
                        {
                                if(DIFF_TEAM(victim, attacker) && !STAT(FROZEN, victim))
                                {
index 83d39f8bb51100bae80a53746fdad9753d8a6d95,ae0fd211c275d0797ae2eb66cfda14416af36e55..ae867e9a3d2119f3c787488c7744bb02d70cc99f
@@@ -58,7 -58,6 +58,7 @@@ MUTATOR_HOOKABLE(PlayerDies, EV_PlayerD
  /** called when a player dies to e.g. remove stuff he was carrying */
  #define EV_PlayHitsound(i, o) \
      /** victim */ i(entity, MUTATOR_ARGV_0_entity) \
 +    /** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
      /**/
  MUTATOR_HOOKABLE(PlayHitsound, EV_PlayHitsound);
  
@@@ -360,7 -359,7 +360,7 @@@ MUTATOR_HOOKABLE(W_DecreaseAmmo, EV_W_D
      /**/
  MUTATOR_HOOKABLE(W_Reload, EV_W_Reload);
  
- /** called at the end of player_powerups() in cl_client.qc, used for manipulating the values which are set by powerup items. */
+ /** called at the end of player_powerups() in client.qc, used for manipulating the values which are set by powerup items. */
  #define EV_PlayerPowerups(i, o) \
      /** player */    i(entity, MUTATOR_ARGV_0_entity) \
      /** old items */ i(int, MUTATOR_ARGV_1_int) \
@@@ -509,7 -508,7 +509,7 @@@ MUTATOR_HOOKABLE(BotShouldAttack, EV_Bo
  MUTATOR_HOOKABLE(PortalTeleport, EV_PortalTeleport);
  
  /**
-  * called whenever a player uses impulse 33 (help me) in cl_impulse.qc
+  * called whenever a player uses impulse 33 (help me) in impulse.qc
   * normally help me ping uses .waypointsprite_attachedforcarrier,
   * but if your mutator uses something different then you can handle it
   * in a special manner using this hook