mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 15:11:46 +00:00
Fix incorrect HitTexture reassignment in LineTrace.
This commit is contained in:
parent
5d223bb8c3
commit
bc4a8190bf
1 changed files with 2 additions and 12 deletions
|
@ -4902,17 +4902,8 @@ bool P_LineTrace(AActor *t1, DAngle angle, double distance,
|
|||
outdata->HitLine = trace.Line;
|
||||
outdata->HitSector = trace.Sector;
|
||||
outdata->Hit3DFloor = trace.ffloor;
|
||||
switch ( trace.HitType )
|
||||
if ( trace.HitType == TRACE_HitWall )
|
||||
{
|
||||
case TRACE_HitFloor:
|
||||
outdata->SectorPlane = 0;
|
||||
outdata->HitTexture = trace.Sector->planes[0].Texture;
|
||||
break;
|
||||
case TRACE_HitCeiling:
|
||||
outdata->SectorPlane = 1;
|
||||
outdata->HitTexture = trace.Sector->planes[1].Texture;
|
||||
break;
|
||||
case TRACE_HitWall:
|
||||
outdata->LineSide = trace.Side;
|
||||
int txpart;
|
||||
switch ( trace.Tier )
|
||||
|
@ -4934,9 +4925,8 @@ bool P_LineTrace(AActor *t1, DAngle angle, double distance,
|
|||
outdata->HitTexture = trace.ffloor->master->sidedef[0]->textures[txpart].texture;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else outdata->HitTexture = trace.HitTexture;
|
||||
outdata->HitLocation = trace.HitPos;
|
||||
outdata->Distance = trace.Distance;
|
||||
outdata->NumPortals = TData.NumPortals;
|
||||
|
|
Loading…
Reference in a new issue