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

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
qcsrc/server/steerlib.qc
qcsrc/server/steerlib.qh

index d99b27e932babd17acb43590a98d8256ffc8381a..77c4312001de399edeaaddd1d9a1abcc7de55020 100644 (file)
@@ -2,7 +2,7 @@
 
 #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)
index 8bcb2d62ac28a4fb76f74ededaebd17c14d6f6bf..7e5f79317f6dc046238f83bf5c8995da2b12b077 100644 (file)
@@ -16,10 +16,12 @@ bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
         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);
index 5d3313e5561b763ae9750ea3fc42cddfe73429cb..134b805e9f56a881ef43cd3b8145a04002f84358 100644 (file)
@@ -7,7 +7,7 @@ CLASS(FusionReactor, Turret)
 /* 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, "fusionreactor");
+/* netname    */ ATTRIB(FusionReactor, netname, string, "fusreac");
 /* fullname   */ ATTRIB(FusionReactor, turret_name, string, _("Fusion Reactor"));
 ENDCLASS(FusionReactor)
 REGISTER_TURRET(FUSIONREACTOR, NEW(FusionReactor));
index 612528a61bd32dc32c483d1f32b673754ddd54cb..e3cada6c84b0acc6332325b7cc9f71ddce10797a 100644 (file)
@@ -790,7 +790,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                        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 ae0fd211c275d0797ae2eb66cfda14416af36e55..ae867e9a3d2119f3c787488c7744bb02d70cc99f 100644 (file)
@@ -58,6 +58,7 @@ MUTATOR_HOOKABLE(PlayerDies, EV_PlayerDies);
 /** 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);
 
index c69230d88fce5f09b5d277f13ae72a15c8c451e8..5312eb8140b06d1002e3c6471ec98238d8112622 100644 (file)
@@ -7,10 +7,11 @@
 /**
     Uniform pull towards a point
 **/
-vector steerlib_pull(entity this, vector point)
+#define steerlib_pull(ent,point) normalize(point - (ent).origin)
+/*vector steerlib_pull(entity this, vector point)
 {
     return normalize(point - this.origin);
-}
+}*/
 
 /**
     Uniform push from a point
index fa21610f042d29c794149cb2a28a0ec02a824569..4beb69f6328ba6c337d3b34e803104464e8a73d3 100644 (file)
@@ -4,4 +4,4 @@
 
 vector steerlib_arrive(entity this, vector point, float maximal_distance);
 vector steerlib_attract2(entity this, vector point, float min_influense, float max_distance, float max_influense);
-vector steerlib_pull(entity this, vector point);
+//vector steerlib_pull(entity this, vector point);