From 78186aeadef3940011c76312444c1713cea95354 Mon Sep 17 00:00:00 2001 From: z411 Date: Fri, 26 Nov 2021 21:58:23 -0300 Subject: [PATCH] Revert "powerups_dropondeath: Added dropped waypoint" This reverts commit 473dc5f95b6b40df65fc2ae5d841fde806063d29. --- .../common/mutators/mutator/powerups/sv_powerups.qc | 13 ------------- .../mutators/mutator/waypoints/waypointsprites.qc | 11 ++--------- .../mutators/mutator/waypoints/waypointsprites.qh | 2 -- xonotic-server.cfg | 2 +- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/qcsrc/common/mutators/mutator/powerups/sv_powerups.qc b/qcsrc/common/mutators/mutator/powerups/sv_powerups.qc index 63e64c1a3..7bf005f91 100644 --- a/qcsrc/common/mutators/mutator/powerups/sv_powerups.qc +++ b/qcsrc/common/mutators/mutator/powerups/sv_powerups.qc @@ -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) diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 239992a5d..97c26f360 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -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, diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh index cd3181707..2274da336 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh @@ -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; diff --git a/xonotic-server.cfg b/xonotic-server.cfg index a9db6df52..250086222 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -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" -- 2.39.2