NSSurfacePropEntity: put rendering for when an entity is burning into the new

method RenderFire().
Also some minor non-ODE physics tweak.
This commit is contained in:
Marco Cawthorne 2022-04-10 07:21:25 -07:00
parent e79a2e9c2e
commit 05f6af510a
Signed by: eukara
GPG key ID: C196CD8BA993248A
4 changed files with 15 additions and 4 deletions

View file

@ -48,6 +48,8 @@ player::predraw(void)
effects &= ~EF_NOSHADOW;
base_client cl = (base_client)pSeat->m_ePlayer;
RenderFire();
/* it's either us or us spectating */
if (Client_IsSpectator(cl)) {
spectator spec = (spectator)pSeat->m_ePlayer;

View file

@ -16,6 +16,7 @@
#define ODE_MODE 1
/* all the documented phys vars...*/
.float geomtype;
.float friction;
.float erp;
@ -45,8 +46,8 @@ NSPhysicsEntity::PhysicsDisable(void)
physics_enable(this, FALSE);
SetMovetype(MOVETYPE_NONE);
} else {
SetMovetype(MOVETYPE_BOUNCE);
SetSolid(SOLID_CORPSE);
SetMovetype(MOVETYPE_NONE);
SetSolid(SOLID_BBOX);
}
m_iEnabled = FALSE;
}
@ -164,6 +165,8 @@ NSPhysicsEntity::ApplyTorqueCenter(vector vecTorque)
void
NSPhysicsEntity::TouchThink(void)
{
if (!m_iEnabled)
return;
if (physics_supported() == FALSE) {
/* let players collide */

View file

@ -31,6 +31,7 @@ class NSSurfacePropEntity:NSRenderableEntity
virtual void(void) ParentUpdate;
#else
virtual float(void) predraw;
virtual void(void) RenderFire;
#endif
/* new */

View file

@ -307,8 +307,8 @@ NSSurfacePropEntity::PropDataFinish(void)
m_iPropData = -1;
}
#else
float
NSSurfacePropEntity::predraw(void)
void
NSSurfacePropEntity::RenderFire(void)
{
if (flags & FL_ONFIRE) {
vector someorg;
@ -321,6 +321,11 @@ NSSurfacePropEntity::predraw(void)
m_flBurnNext = time + 0.1f;
}
}
}
float
NSSurfacePropEntity::predraw(void)
{
RenderFire();
return super::predraw();
}
#endif