Linetrace properly reports 3D line hits as "middle" part (#1228)

* Linetrace properly reports 3D line hits as "middle" part, as was intended.

* Typo fix
This commit is contained in:
Marisa Kirisame 2020-10-26 09:24:04 +01:00 committed by GitHub
parent 11954ef1ad
commit c933d02034
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4888,6 +4888,7 @@ int P_LineTrace(AActor *t1, DAngle angle, double distance,
outdata->HitTexture = trace.Line->sidedef[trace.Side]->textures[2].texture;
break;
case TIER_FFloor:
outdata->LinePart = 1; // act as if middle was hit
txpart = (trace.ffloor->flags & FF_UPPERTEXTURE) ? 0 : (trace.ffloor->flags & FF_LOWERTEXTURE) ? 2 : 1;
outdata->HitTexture = trace.ffloor->master->sidedef[0]->textures[txpart].texture;
break;