]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove outdated flag list from WaypointSprite_SendEntity/Ent_WaypointSprite; give...
authorterencehill <piuntn@gmail.com>
Sat, 6 Mar 2021 19:02:08 +0000 (20:02 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 6 Mar 2021 19:02:08 +0000 (20:02 +0100)
qcsrc/common/gamemodes/gamemode/assault/sv_assault.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc

index 1492c6d06c6278147428dc2d79743be62e32b9ab..477cfb0d0a873bf6ccc50c66303b2877f3ef4c6c 100644 (file)
@@ -129,7 +129,6 @@ void target_objective_decrease_activate(entity this)
                spr = WaypointSprite_SpawnFixed(WP_AssaultDefend, 0.5 * (it.absmin + it.absmax), it, assault_sprite, RADARICON_OBJECTIVE);
                spr.assault_decreaser = this;
                spr.waypointsprite_visible_for_player = assault_decreaser_sprite_visible;
-               spr.classname = "sprite_waypoint";
                WaypointSprite_UpdateRule(spr, assault_attacker_team, SPRITERULE_TEAMPLAY);
                if(it.classname == "func_assault_destructible")
                {
index d3a9806e0f05a808f8addb5384fe08b4e4ec7528..043ee685313805bc5084d4eb7e5198552f9c3ecf 100644 (file)
@@ -5,7 +5,6 @@ REGISTER_MUTATOR(waypointsprites, true);
 REGISTER_NET_LINKED(waypointsprites)
 
 #ifdef SVQC
-/** flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable] */
 bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
 {
     WriteHeader(MSG_ENTITY, waypointsprites);
@@ -15,17 +14,14 @@ bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
     if (this.max_health || (this.pain_finished && (time < this.pain_finished + 0.25)))
         sendflags |= 0x80;
 
-    int f = 0;
-    if(this.currentammo == 1)
-        f |= 1; // hideable
-    if(this.exteriormodeltoclient == to)
-        f |= 2; // my own
-    if(this.currentammo == 2)
-        f |= 2; // radar only
+    int hide_flags = 0;
+    if(this.currentammo == 1) hide_flags |= 1; // hideable
+    else if(this.currentammo == 2) hide_flags |= 2; // radar only
+    if(this.exteriormodeltoclient == to) hide_flags |= 2; // my own
 
-    MUTATOR_CALLHOOK(SendWaypoint, this, to, sendflags, f);
+    MUTATOR_CALLHOOK(SendWaypoint, this, to, sendflags, hide_flags);
     sendflags = M_ARGV(2, int);
-    f = M_ARGV(3, int);
+    hide_flags = M_ARGV(3, int);
 
     WriteByte(MSG_ENTITY, sendflags);
     WriteByte(MSG_ENTITY, this.wp_extra);
@@ -70,7 +66,7 @@ bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
         WriteCoord(MSG_ENTITY, this.fade_time);
         WriteCoord(MSG_ENTITY, this.teleport_time);
         WriteShort(MSG_ENTITY, this.fade_rate); // maxdist
-        WriteByte(MSG_ENTITY, f);
+        WriteByte(MSG_ENTITY, hide_flags);
     }
 
     if (sendflags & 32)
@@ -107,7 +103,6 @@ void Ent_RemoveWaypointSprite(entity this)
     strfree(this.netname3);
 }
 
-/** flags origin [team displayrule] [spritename] [spritename2] [spritename3] [lifetime maxdistance hideable] */
 void Ent_WaypointSprite(entity this, bool isnew)
 {
     int sendflags = ReadByte();