decore_cactus: now does dmg on StartTouch like it should

This commit is contained in:
Marco Cawthorne 2022-07-22 16:59:11 -07:00
parent af64d7f598
commit 1bb4a00076
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -26,9 +26,35 @@ model="models/cactus.mdl"
class decore_cactus:RWDecore
{
float m_flDmgTest;
void(void) decore_cactus;
virtual void(void) Respawn;
virtual void(entity) StartTouch;
};
void
decore_cactus::StartTouch(entity eToucher)
{
if (m_flDmgTest > time)
return;
if (eToucher.takedamage == DAMAGE_NO)
return;
NSSurfacePropEntity t = (NSSurfacePropEntity)eToucher;
Damage_Apply(eToucher, this, 1, WEAPON_NONE, 0);
m_flDmgTest = time + 1.0f;
}
void
decore_cactus::Respawn(void)
{
super::Respawn();
SetSolid(SOLID_BBOX);
}
void
decore_cactus::decore_cactus(void)
{