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; effects &= ~EF_NOSHADOW;
base_client cl = (base_client)pSeat->m_ePlayer; base_client cl = (base_client)pSeat->m_ePlayer;
RenderFire();
/* it's either us or us spectating */ /* it's either us or us spectating */
if (Client_IsSpectator(cl)) { if (Client_IsSpectator(cl)) {
spectator spec = (spectator)pSeat->m_ePlayer; spectator spec = (spectator)pSeat->m_ePlayer;

View file

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

View file

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

View file

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