Replace any Hide() with calls to Disappear(), as that one will actually set the collision to no longer be solid.

This commit is contained in:
Marco Cawthorne 2022-08-30 16:02:56 -07:00
parent 522e45b1ee
commit be16666be8
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
10 changed files with 26 additions and 66 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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);
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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