]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "powerups_dropondeath: Added dropped waypoint"
authorz411 <z411@omaera.org>
Sat, 27 Nov 2021 00:58:23 +0000 (21:58 -0300)
committerz411 <z411@omaera.org>
Sat, 27 Nov 2021 00:58:23 +0000 (21:58 -0300)
This reverts commit 473dc5f95b6b40df65fc2ae5d841fde806063d29.

qcsrc/common/mutators/mutator/powerups/sv_powerups.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh
xonotic-server.cfg

index 63e64c1a37b2a591a0dd9f722168721e9ab96454..7bf005f91248ce9661f22b0fa5eb164b5d03bb12 100644 (file)
@@ -108,19 +108,6 @@ void powerups_DropItem(entity this, StatusEffects effect)
 
        if(autocvar_g_powerups_dropondeath != 2)
                Item_SetExpiring(e, true);
-
-       // Create expiring waypoint
-       entity wp = WaypointSprite_Spawn(WP_Item, time_to_live * -1, 0, e, '0 0 1' * e.maxs.z, NULL, 0, e, waypointsprite_attached, true, RADARICON_Item);
-       wp.wp_extra = item.m_id;
-       wp.wp_reverse = 1;
-       WaypointSprite_UpdateBuildFinished(e.waypointsprite_attached, time + time_to_live);
-}
-
-MUTATOR_HOOKFUNCTION(powerups, ItemTouched)
-{
-       entity e = M_ARGV(0, entity);
-       if(e.waypointsprite_attached)
-               WaypointSprite_Kill(e.waypointsprite_attached);
 }
 
 MUTATOR_HOOKFUNCTION(powerups, PlayerDies)
index 239992a5d27f1b6a9f7aea45c0b2e9390c32000a..97c26f360dd19d037b166ce6ff25181a59b604c1 100644 (file)
@@ -38,7 +38,6 @@ bool WaypointSprite_SendEntity(entity this, entity to, float sendflags)
             dt = bound(0, dt * 32, 16383);
             WriteByte(MSG_ENTITY, (dt & 0xFF00) / 256 + 192);
             WriteByte(MSG_ENTITY, (dt & 0x00FF));
-            WriteByte(MSG_ENTITY, this.wp_reverse);
         }
     }
 
@@ -138,7 +137,6 @@ void Ent_WaypointSprite(entity this, bool isnew)
             else
                 this.build_starthealth = 0;
             this.build_finished = servertime + t / 32;
-            this.build_reverse = ReadByte();
         }
     }
     else
@@ -540,12 +538,7 @@ void Draw_WaypointSprite(entity this)
         a *= (bound(0, (this.maxdistance - dist) / (this.maxdistance - maxnormdistance), 1) ** waypointsprite_distancealphaexponent);
     }
 
-    vector rgb;
-    if(this.build_reverse)
-        rgb = '1 0 0';
-    else
-        rgb = spritelookupcolor(this, spriteimage, this.teamradar_color);
-
+    vector rgb = spritelookupcolor(this, spriteimage, this.teamradar_color);
     if (rgb == '0 0 0')
     {
         this.teamradar_color = '1 0 1';
@@ -728,7 +721,7 @@ void Draw_WaypointSprite(entity this)
         drawhealthbar(
                 o,
                 0,
-                (this.build_reverse ? 1 - GetResource(this, RES_HEALTH) : GetResource(this, RES_HEALTH)),
+                GetResource(this, RES_HEALTH),
                 '0 0 0',
                 '0 0 0',
                 SPRITE_HEALTHBAR_WIDTH * t,
index cd3181707afde387e02017698b0cc96cb8802bb3..2274da336e926e31baeeeb46d471653c793519f1 100644 (file)
@@ -4,7 +4,6 @@
 
 /** Additional networked waypoint state, used for items, weapons, buffs */
 .int wp_extra;
-.int wp_reverse;
 
 const int SPRITERULE_DEFAULT = 0;
 const int SPRITERULE_TEAMPLAY = 1;
@@ -27,7 +26,6 @@ classfield(WaypointSprite) .float health;
 classfield(WaypointSprite) .float build_started;
 classfield(WaypointSprite) .float build_starthealth;
 classfield(WaypointSprite) .float build_finished;
-classfield(WaypointSprite) .int build_reverse;
 
 bool autocvar_cl_hidewaypoints;
 
index a9db6df52f2f48808b1ec8efad792310af1b2241..2500862223de72b9a8c8b928ac857e93a1db7adf 100644 (file)
@@ -199,7 +199,7 @@ set g_weapon_stay 0 "1: ghost weapons can be picked up but give no ammo, thrown
 set g_weapon_throwable 1 "if set to 1, weapons can be dropped"
 set g_powerups -1 "if set to 0 no powerups will spawn, if 1 they will spawn in all game modes, -1 is game mode default"
 set g_powerups_dropondeath 0 "players will drop their powerups on death (1 = timer continues, 2 = timer freezes until picked up)"
-set g_powerups_dropondeath_ttl 20 "seconds before a dropped powerup disappears if g_powerups_dropondeath is set to 2"
+set g_powerups_dropondeath_ttl 20 "seconds before a dropped powerup disappears if dropondeath is set to 2"
 set g_powerups_stack 0 "enables stacking of powerup timers when picking up a powerup you already have; otherwise timer is reset to the time granted by the item, if greater than the time you currently have"
 set g_powerups_strength 1 "allow strength powerups to spawn"
 set g_powerups_shield 1 "allow shield powerups to spawn"