- refactoring complete. The source compiles again with the renamed position variable.

This commit is contained in:
Christoph Oelckers 2016-01-20 15:12:51 +01:00
commit 68c0f929dc
7 changed files with 128 additions and 136 deletions

View file

@ -524,12 +524,12 @@ cont:
hity = StartY + FixedMul (Vy, dist);
hitz = StartZ + FixedMul (Vz, dist);
if (hitz > in->d.thing->z + in->d.thing->height)
if (hitz > in->d.thing->Top())
{ // trace enters above actor
if (Vz >= 0) continue; // Going up: can't hit
// Does it hit the top of the actor?
dist = FixedDiv(in->d.thing->z + in->d.thing->height - StartZ, Vz);
dist = FixedDiv(in->d.thing->Top() - StartZ, Vz);
if (dist > MaxDist) continue;
in->frac = FixedDiv(dist, MaxDist);
@ -539,15 +539,15 @@ cont:
hitz = StartZ + FixedMul (Vz, dist);
// calculated coordinate is outside the actor's bounding box
if (abs(hitx - in->d.thing->x) > in->d.thing->radius ||
abs(hity - in->d.thing->y) > in->d.thing->radius) continue;
if (abs(hitx - in->d.thing->X()) > in->d.thing->radius ||
abs(hity - in->d.thing->Y()) > in->d.thing->radius) continue;
}
else if (hitz < in->d.thing->z)
else if (hitz < in->d.thing->Z())
{ // trace enters below actor
if (Vz <= 0) continue; // Going down: can't hit
// Does it hit the bottom of the actor?
dist = FixedDiv(in->d.thing->z - StartZ, Vz);
dist = FixedDiv(in->d.thing->Z() - StartZ, Vz);
if (dist > MaxDist) continue;
in->frac = FixedDiv(dist, MaxDist);
@ -556,8 +556,8 @@ cont:
hitz = StartZ + FixedMul (Vz, dist);
// calculated coordinate is outside the actor's bounding box
if (abs(hitx - in->d.thing->x) > in->d.thing->radius ||
abs(hity - in->d.thing->y) > in->d.thing->radius) continue;
if (abs(hitx - in->d.thing->X()) > in->d.thing->radius ||
abs(hity - in->d.thing->Y()) > in->d.thing->radius) continue;
}
// check for extrafloors first