Hotfix: LineTrace now reports the correct number of portal crossings.

This commit is contained in:
Marisa Kirisame 2020-06-07 11:51:59 +02:00 committed by Christoph Oelckers
parent f58027311e
commit e81641dd01

View file

@ -4866,7 +4866,8 @@ int P_LineTrace(AActor *t1, DAngle angle, double distance,
outdata->HitLocation = trace.HitPos; outdata->HitLocation = trace.HitPos;
outdata->HitDir = trace.HitVector; outdata->HitDir = trace.HitVector;
outdata->Distance = trace.Distance; outdata->Distance = trace.Distance;
outdata->NumPortals = TData.NumPortals; // [MK] Subtract two "bogus" portal crossings used internally by trace code
outdata->NumPortals = TData.NumPortals-2;
outdata->HitType = trace.HitType; outdata->HitType = trace.HitType;
} }
return ret; return ret;