diff --git a/src/server/ammo.qc b/src/server/ammo.qc index c88dc71..3dd0976 100644 --- a/src/server/ammo.qc +++ b/src/server/ammo.qc @@ -38,9 +38,8 @@ item_ammo::Touch(entity eToucher) if (real_owner || cvar("sv_playerslots") == 1) { Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 20.0f; + Disappear(); + ScheduleThink(Respawn, 30.0f); } } @@ -53,8 +52,7 @@ item_ammo::Respawn(void) SetModel(GetSpawnModel()); SetSize([-16,-16,0],[16,16,16]); - think = __NULL__; - nextthink = -1; + ReleaseThink(); if (real_owner && time > 30.0f) Sound_Play(this, CHAN_ITEM, "ammo.respawn"); diff --git a/src/server/item_battery.qc b/src/server/item_battery.qc index 4b48b84..114ae8a 100644 --- a/src/server/item_battery.qc +++ b/src/server/item_battery.qc @@ -67,9 +67,8 @@ void item_battery::Touch(entity eToucher) if (real_owner || cvar("sv_playerslots") == 1) { Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 20.0f; + Disappear(); + ScheduleThink(Respawn, 30.0f); } } @@ -82,8 +81,7 @@ void item_battery::Respawn(void) SetSize([-16,-16,0],[16,16,16]); botinfo = BOTINFO_ARMOR; - think = __NULL__; - nextthink = -1; + ReleaseThink(); if (!real_owner && time > 30.0f) Sound_Play(this, CHAN_ITEM, "item.respawn"); diff --git a/src/server/item_healthkit.qc b/src/server/item_healthkit.qc index c6f5408..52b9801 100644 --- a/src/server/item_healthkit.qc +++ b/src/server/item_healthkit.qc @@ -50,9 +50,8 @@ void item_healthkit::Touch(entity eToucher) if (real_owner || cvar("sv_playerslots") == 1) { Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 20.0f; + Disappear(); + ScheduleThink(Respawn, 30.0f); } } @@ -65,8 +64,7 @@ void item_healthkit::Respawn(void) SetSize([-16,-16,0],[16,16,16]); botinfo = BOTINFO_HEALTH; - think = __NULL__; - nextthink = -1; + ReleaseThink(); if (!real_owner && time > 30.0f) Sound_Play(this, CHAN_ITEM, "item.respawn"); diff --git a/src/server/item_longjump.qc b/src/server/item_longjump.qc index 9c12261..9f8f0b6 100644 --- a/src/server/item_longjump.qc +++ b/src/server/item_longjump.qc @@ -59,11 +59,10 @@ item_longjump::Touch(entity eToucher) } if (real_owner || cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 30.0f; + Disappear(); + ScheduleThink(Respawn, 30.0f); } } @@ -76,8 +75,7 @@ item_longjump::Respawn(void) SetModel(GetSpawnModel()); SetSize([-16,-16,0],[16,16,16]); - think = __NULL__; - nextthink = -1; + ReleaseThink(); if (!real_owner && time > 30.0f) Sound_Play(this, CHAN_ITEM, "item.respawn"); diff --git a/src/server/item_suit.qc b/src/server/item_suit.qc index d28f5cd..5e6a6b9 100644 --- a/src/server/item_suit.qc +++ b/src/server/item_suit.qc @@ -62,11 +62,10 @@ item_suit::Touch(entity eToucher) } if (real_owner || cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 30.0f; + Disappear(); + ScheduleThink(Respawn, 30.0f); } } @@ -80,8 +79,7 @@ item_suit::Respawn(void) SetSize(VEC_HULL_MIN + [0,0,36], VEC_HULL_MAX + [0,0,36]); m_iValue = FALSE; - think = __NULL__; - nextthink = -1; + ReleaseThink(); if (!real_owner && time > 30.0f) Sound_Play(this, CHAN_ITEM, "item.respawn"); diff --git a/src/server/items.qc b/src/server/items.qc index a7f80fb..2c27bc4 100644 --- a/src/server/items.qc +++ b/src/server/items.qc @@ -31,11 +31,10 @@ void item_pickup::Touch(entity eToucher) UseTargets(eToucher, TRIG_TOGGLE, m_flDelay); if (real_owner || m_iWasDropped == 1 || cvar("sv_playerslots") == 1) { - remove(self); + Destroy(); } else { - Hide(); - think = Respawn; - nextthink = time + 30.0f; + Disappear(); + ScheduleThink(Respawn, 30.0f); } } @@ -64,9 +63,7 @@ void item_pickup::Respawn(void) } SetSize([-16,-16,0], [16,16,16]); - - think = __NULL__; - nextthink = -1; + ReleaseThink(); if (!m_iWasDropped && cvar("sv_playerslots") > 1) { if (!real_owner && time > 30.0f) @@ -76,7 +73,7 @@ void item_pickup::Respawn(void) } if (!m_bFloating) { - droptofloor(); + DropToFloor(); SetMovetype(MOVETYPE_TOSS); } } diff --git a/src/server/monster_hevsuit_dead.qc b/src/server/monster_hevsuit_dead.qc index 246bcfd..2339891 100644 --- a/src/server/monster_hevsuit_dead.qc +++ b/src/server/monster_hevsuit_dead.qc @@ -27,7 +27,6 @@ class monster_hevsuit_dead:NSMonster int m_iPose; void(void) monster_hevsuit_dead; - virtual void(void) Hide; virtual void(void) Respawn; virtual void(void) Gib; virtual void(string, string) SpawnKey; @@ -38,15 +37,7 @@ monster_hevsuit_dead::Gib(void) { takedamage = DAMAGE_NO; FX_GibHuman(origin, vectoangles(origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f); - Hide(); -} - -void -monster_hevsuit_dead::Hide(void) -{ - SetModel(""); - solid = SOLID_NOT; - movetype = MOVETYPE_NONE; + Disappear(); } void diff --git a/src/server/monster_hgrunt_dead.qc b/src/server/monster_hgrunt_dead.qc index cfe7322..c69da02 100644 --- a/src/server/monster_hgrunt_dead.qc +++ b/src/server/monster_hgrunt_dead.qc @@ -27,7 +27,6 @@ class monster_hgrunt_dead:NSMonster int m_iPose; void(void) monster_hgrunt_dead; - virtual void(void) Hide; virtual void(void) Respawn; virtual void(void) Gib; virtual void(string, string) SpawnKey; @@ -38,15 +37,7 @@ monster_hgrunt_dead::Gib(void) { takedamage = DAMAGE_NO; FX_GibHuman(origin, vectoangles(origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f); - Hide(); -} - -void -monster_hgrunt_dead::Hide(void) -{ - SetModel(""); - solid = SOLID_NOT; - movetype = MOVETYPE_NONE; + Disappear(); } void diff --git a/src/server/monster_scientist_dead.qc b/src/server/monster_scientist_dead.qc index a545827..62956c6 100644 --- a/src/server/monster_scientist_dead.qc +++ b/src/server/monster_scientist_dead.qc @@ -38,7 +38,6 @@ class monster_scientist_dead:NSMonster int m_iPose; void(void) monster_scientist_dead; - virtual void(void) Hide; virtual void(void) Respawn; virtual void(void) Gib; virtual void(string, string) SpawnKey; @@ -49,15 +48,7 @@ monster_scientist_dead::Gib(void) { takedamage = DAMAGE_NO; FX_GibHuman(origin, vectoangles(origin - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f); - Hide(); -} - -void -monster_scientist_dead::Hide(void) -{ - SetModel(""); - solid = SOLID_NOT; - movetype = MOVETYPE_NONE; + Disappear(); } void diff --git a/src/server/monster_sitting_scientist.qc b/src/server/monster_sitting_scientist.qc index 2c21ee3..f605794 100644 --- a/src/server/monster_sitting_scientist.qc +++ b/src/server/monster_sitting_scientist.qc @@ -49,7 +49,7 @@ monster_sitting_scientist::Gib(void) { SetTakedamage(DAMAGE_NO); FX_GibHuman(GetOrigin(), vectoangles(GetOrigin() - g_dmg_eAttacker.origin), g_dmg_iDamage * 2.0f); - Hide(); + Disappear(); } void