- floatified portals.cpp and most of p_maputl.cpp.

This commit is contained in:
Christoph Oelckers 2016-03-31 16:52:25 +02:00
commit 9412ce45d6
25 changed files with 427 additions and 848 deletions

View file

@ -359,7 +359,7 @@ bool FTraceInfo::LineCheck(intercept_t *in)
int lineside;
sector_t *entersector;
double dist = MaxDist * in->Frac;
double dist = MaxDist * in->frac;
DVector3 hit = Start + Vec * dist;
double ff, fc, bf = 0, bc = 0;
@ -468,7 +468,7 @@ bool FTraceInfo::LineCheck(intercept_t *in)
{
if (entersector == NULL || (hit.Z >= bf && hit.Z <= bc))
{
int res = EnterLinePortal(in->d.line, in->Frac);
int res = EnterLinePortal(in->d.line, in->frac);
if (res != -1)
{
aimdir = INT_MAX; // flag for ending the traverse
@ -610,7 +610,7 @@ cont:
Results->HitPos = hit;
SetSourcePosition();
Results->Distance = dist;
Results->Fraction = in->Frac;
Results->Fraction = in->frac;
Results->Line = in->d.line;
Results->Side = lineside;
}
@ -648,7 +648,7 @@ cont:
bool FTraceInfo::ThingCheck(intercept_t *in)
{
double dist = MaxDist * in->Frac;
double dist = MaxDist * in->frac;
DVector3 hit = Start + Vec * dist;
if (hit.Z > in->d.thing->Top())
@ -660,7 +660,7 @@ bool FTraceInfo::ThingCheck(intercept_t *in)
dist = (in->d.thing->Top() - Start.Z) / Vec.Z;
if (dist > MaxDist) return true;
in->Frac = dist / MaxDist;
in->frac = dist / MaxDist;
hit = Start + Vec * dist;
@ -675,7 +675,7 @@ bool FTraceInfo::ThingCheck(intercept_t *in)
// Does it hit the bottom of the actor?
dist = (in->d.thing->Z() - Start.Z) / Vec.Z;
if (dist > MaxDist) return true;
in->Frac = dist / MaxDist;
in->frac = dist / MaxDist;
hit = Start + Vec * dist;
@ -731,7 +731,7 @@ cont1:
Results->HitPos = hit;
SetSourcePosition();
Results->Distance = dist;
Results->Fraction = in->Frac;
Results->Fraction = in->frac;
Results->Actor = in->d.thing;
if (TraceCallback != NULL)
@ -785,7 +785,7 @@ bool FTraceInfo::TraceTraverse (int ptflags)
}
// We have something closer in the storage for portal subtraces.
if (TempResults->HitType != TRACE_HitNone && in->Frac > TempResults->Fraction)
if (TempResults->HitType != TRACE_HitNone && in->frac > TempResults->Fraction)
{
break;
}