From 756932537afe8d97b4116828fecb9f2f29721c58 Mon Sep 17 00:00:00 2001 From: Xylemon Date: Wed, 18 Jan 2023 19:45:26 -0800 Subject: [PATCH] Bring us up to spec with the API --- src/server/ammo_hd.qc | 7 +++---- src/server/item_battery.qc | 7 +++---- src/server/item_healthkit.qc | 7 +++---- src/server/item_rune_haste.qc | 7 +++---- src/server/item_rune_stalker.qc | 7 +++---- src/server/items.qc | 4 ++-- 6 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/server/ammo_hd.qc b/src/server/ammo_hd.qc index 87fa36c..2a89f13 100644 --- a/src/server/ammo_hd.qc +++ b/src/server/ammo_hd.qc @@ -35,11 +35,10 @@ item_ammo::touch(void) Logging_Pickup(other, this, __NULL__); if (cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 20.0f; + Disappear(); + ScheduleThink(Respawn,20.0f); } } diff --git a/src/server/item_battery.qc b/src/server/item_battery.qc index 3027e35..b7734e5 100644 --- a/src/server/item_battery.qc +++ b/src/server/item_battery.qc @@ -56,11 +56,10 @@ item_battery::Touch(entity eToucher) Sound_Play(other, CHAN_ITEM, "item.battery"); if (cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 20.0f; + Disappear(); + ScheduleThink(Respawn,20.0f); } } diff --git a/src/server/item_healthkit.qc b/src/server/item_healthkit.qc index 605fd2e..dc240d3 100644 --- a/src/server/item_healthkit.qc +++ b/src/server/item_healthkit.qc @@ -44,11 +44,10 @@ item_healthkit::Touch(entity eToucher) Logging_Pickup(other, this, __NULL__); if (cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 20.0f; + Disappear(); + ScheduleThink(Respawn,20.0f); } } diff --git a/src/server/item_rune_haste.qc b/src/server/item_rune_haste.qc index 79c46e4..eea68a0 100644 --- a/src/server/item_rune_haste.qc +++ b/src/server/item_rune_haste.qc @@ -59,11 +59,10 @@ item_rune_haste::Touch(entity eToucher) super::UseTargets(this, TRIG_TOGGLE, 0.0f); if (cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 30.0f; + Disappear(); + ScheduleThink(Respawn,30.0f); } } diff --git a/src/server/item_rune_stalker.qc b/src/server/item_rune_stalker.qc index f3b84ce..f493a7f 100644 --- a/src/server/item_rune_stalker.qc +++ b/src/server/item_rune_stalker.qc @@ -61,11 +61,10 @@ item_rune_stalker::Touch(entity eToucher) super::UseTargets(this, TRIG_TOGGLE, 0.0f); if (cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 30.0f; + Disappear(); + ScheduleThink(Respawn,30.0f); } } diff --git a/src/server/items.qc b/src/server/items.qc index 74aaa73..d29b734 100644 --- a/src/server/items.qc +++ b/src/server/items.qc @@ -37,9 +37,9 @@ item_pickup::Touch(entity eToucher) super::UseTargets(this, TRIG_TOGGLE, 0.0f); if (real_owner || m_iWasDropped == 1 || cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); + Disappear(); think = Respawn; nextthink = time + 30.0f; }