From f6b64430c3024f4f8d0177201ce284e10737d0b1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 3 Feb 2016 11:36:34 +0100 Subject: [PATCH] Revert "Merge tag 'a'" This reverts commit 37578f85b3c04cb0c6bb26069a80187698daffde, reversing changes made to 66f053f131262a319211a631ab4837a0b78c6455. After thoroughly checking the submission I had to conclude that it does more things wrong than right so better leave it out. --- src/p_acs.cpp | 36 ++++++++---------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/src/p_acs.cpp b/src/p_acs.cpp index c7d409ff3..9737f8aa9 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4183,26 +4183,16 @@ bool DLevelScript::DoCheckActorTexture(int tid, AActor *activator, int string, b if (floor) { - fixed_t z = actor->Z(); // Looking through planes from top to bottom for (i = 0; i < numff; ++i) { F3DFloor *ff = sec->e->XFloor.ffloors[i]; - if (!(ff->flags & FF_EXISTS)) - continue; - if (ff->flags & FF_SOLID && - secpic.isNull() && - z >= ff->top.plane->ZatPoint(actor)) - { // This is the highest solid floor beneath our feet + if ((ff->flags & (FF_EXISTS | FF_SOLID)) == (FF_EXISTS | FF_SOLID) && + actor->Z() >= ff->top.plane->ZatPoint(actor)) + { // This floor is beneath our feet. secpic = *ff->top.texture; - } - else if (!(ff->flags & FF_SOLID) && - tex == TexMan[*ff->top.texture] && - z <= ff->top.plane->ZatPoint(actor) && - z >= ff->bottom.plane->ZatPoint(actor)) - { // Having your feet within a liquid counts as being "on" it - return true; + break; } } if (i == numff) @@ -4218,21 +4208,11 @@ bool DLevelScript::DoCheckActorTexture(int tid, AActor *activator, int string, b { F3DFloor *ff = sec->e->XFloor.ffloors[i]; - if (!(ff->flags & FF_EXISTS)) - continue; - - if (ff->flags & FF_SOLID && - secpic.isNull() && + if ((ff->flags & (FF_EXISTS | FF_SOLID)) == (FF_EXISTS | FF_SOLID) && z <= ff->bottom.plane->ZatPoint(actor)) - { // This is the lowest solid ceiling above our eyes - secpic = *ff->top.texture; - } - else if (!(ff->flags & FF_SOLID) && - tex == TexMan[*ff->bottom.texture] && - z <= ff->top.plane->ZatPoint(actor) && - z >= ff->bottom.plane->ZatPoint(actor)) - { // Having your eyes within a liquid counts as being "under" it - return true; + { // This floor is above our eyes. + secpic = *ff->bottom.texture; + break; } } if (i < 0)