- Changed CheckActorFloor/CeilingTexture to only check 3D floors that exist and are solid.

SVN r3459 (trunk)
This commit is contained in:
Randy Heit 2012-03-20 03:00:33 +00:00
parent 7045bfd19f
commit ab60c1afcc

View file

@ -3200,7 +3200,8 @@ bool DLevelScript::DoCheckActorTexture(int tid, AActor *activator, int string, b
{ {
F3DFloor *ff = sec->e->XFloor.ffloors[i]; F3DFloor *ff = sec->e->XFloor.ffloors[i];
if (actor->z >= ff->top.plane->ZatPoint(actor->x, actor->y)) if ((ff->flags & (FF_EXISTS | FF_SOLID)) == (FF_EXISTS | FF_SOLID) &&
actor->z >= ff->top.plane->ZatPoint(actor->x, actor->y))
{ // This floor is beneath our feet. { // This floor is beneath our feet.
secpic = *ff->top.texture; secpic = *ff->top.texture;
break; break;
@ -3219,7 +3220,8 @@ bool DLevelScript::DoCheckActorTexture(int tid, AActor *activator, int string, b
{ {
F3DFloor *ff = sec->e->XFloor.ffloors[i]; F3DFloor *ff = sec->e->XFloor.ffloors[i];
if (z <= ff->bottom.plane->ZatPoint(actor->x, actor->y)) if ((ff->flags & (FF_EXISTS | FF_SOLID)) == (FF_EXISTS | FF_SOLID) &&
z <= ff->bottom.plane->ZatPoint(actor->x, actor->y))
{ // This floor is above our eyes. { // This floor is above our eyes.
secpic = *ff->bottom.texture; secpic = *ff->bottom.texture;
break; break;