SurfaceData: Non NSSurfacePropEntity class ents will just use the generic world check for impact effect lookup.

This commit is contained in:
Marco Cawthorne 2021-10-27 03:06:29 +02:00
parent 98d9f8f618
commit 98c234da48
Signed by: eukara
GPG Key ID: C196CD8BA993248A
1 changed files with 2 additions and 2 deletions

View File

@ -415,7 +415,7 @@ SurfData_Finish(void)
void
SurfData_Impact(entity e, int fl, vector org, vector ang)
{
if (e == world) { /* the static world */
if (e == world || e.health == 0) { /* the static world */
switch (serverkeyfloat("*bspversion")) {
case BSPVER_HL:
float surf;
@ -432,7 +432,7 @@ SurfData_Impact(entity e, int fl, vector org, vector ang)
default:
FX_Impact(IMPACT_DEFAULT, org, ang);
}
} else { /* props, entities */
} else { /* props */
NSSurfacePropEntity foo = (NSSurfacePropEntity)e;
FX_Impact(foo.GetSurfaceData(SURFDATA_FX_IMPACT), org, ang);
}