Use ZatPoint(actor)

This commit is contained in:
Eevee (Lexy Munroe) 2016-01-22 16:38:29 -08:00
parent 3e28b195ce
commit 24f6f1297a
1 changed files with 6 additions and 6 deletions

View File

@ -4150,14 +4150,14 @@ bool DLevelScript::DoCheckActorTexture(int tid, AActor *activator, int string, b
if (ff->flags & FF_SOLID && if (ff->flags & FF_SOLID &&
secpic.isNull() && secpic.isNull() &&
z >= ff->top.plane->ZatPoint(actor->X(), actor->Y())) z >= ff->top.plane->ZatPoint(actor))
{ // This is the highest solid floor beneath our feet { // This is the highest solid floor beneath our feet
secpic = *ff->top.texture; secpic = *ff->top.texture;
} }
else if (!(ff->flags & FF_SOLID) && else if (!(ff->flags & FF_SOLID) &&
tex == TexMan[*ff->top.texture] && tex == TexMan[*ff->top.texture] &&
z <= ff->top.plane->ZatPoint(actor->X(), actor->Y()) && z <= ff->top.plane->ZatPoint(actor) &&
z >= ff->bottom.plane->ZatPoint(actor->X(), actor->Y())) z >= ff->bottom.plane->ZatPoint(actor))
{ // Having your feet within a liquid counts as being "on" it { // Having your feet within a liquid counts as being "on" it
return true; return true;
} }
@ -4180,14 +4180,14 @@ bool DLevelScript::DoCheckActorTexture(int tid, AActor *activator, int string, b
if (ff->flags & FF_SOLID && if (ff->flags & FF_SOLID &&
secpic.isNull() && secpic.isNull() &&
z <= ff->bottom.plane->ZatPoint(actor->X(), actor->Y())) z <= ff->bottom.plane->ZatPoint(actor))
{ // This is the lowest solid ceiling above our eyes { // This is the lowest solid ceiling above our eyes
secpic = *ff->top.texture; secpic = *ff->top.texture;
} }
else if (!(ff->flags & FF_SOLID) && else if (!(ff->flags & FF_SOLID) &&
tex == TexMan[*ff->bottom.texture] && tex == TexMan[*ff->bottom.texture] &&
z <= ff->top.plane->ZatPoint(actor->X(), actor->Y()) && z <= ff->top.plane->ZatPoint(actor) &&
z >= ff->bottom.plane->ZatPoint(actor->X(), actor->Y())) z >= ff->bottom.plane->ZatPoint(actor))
{ // Having your eyes within a liquid counts as being "under" it { // Having your eyes within a liquid counts as being "under" it
return true; return true;
} }