- Fixed: When I changed the scaling of textures to full fixed point precision
I forgot to change the call that draws the automap marker numbers. - Fixed: The chaingun-flash-checking code always checked the first player, not the calling one. - Fixed: Hitscan traces didn't hit actors when entering from above or below SVN r551 (trunk)
This commit is contained in:
parent
333ef105f7
commit
e016a66dc0
5 changed files with 31 additions and 7 deletions
|
|
@ -307,14 +307,33 @@ static bool PTR_TraceIterator (intercept_t *in)
|
|||
hitz = StartZ + FixedMul (Vz, dist);
|
||||
|
||||
if (hitz > in->d.thing->z + in->d.thing->height)
|
||||
{ // hit above actor
|
||||
return true;
|
||||
{ // trace enters above actor
|
||||
if (Vz >= 0) return true; // Going up: can't hit
|
||||
|
||||
// Does it hit the top of the actor?
|
||||
dist = StartZ - (in->d.thing->z + in->d.thing->height);
|
||||
if (dist > MaxDist) return true;
|
||||
in->frac = FixedDiv(dist, MaxDist);
|
||||
|
||||
hitx = trace.x + FixedMul (Vx, dist);
|
||||
hity = trace.y + FixedMul (Vy, dist);
|
||||
hitz = StartZ + FixedMul (Vz, dist);
|
||||
}
|
||||
else if (hitz < in->d.thing->z)
|
||||
{ // hit below actor
|
||||
return true;
|
||||
{ // trace enters below actor
|
||||
if (Vz <= 0) return true; // Going down: can't hit
|
||||
|
||||
// Does it hit the bottom of the actor?
|
||||
dist = in->d.thing->z - StartZ;
|
||||
if (dist > MaxDist) return true;
|
||||
in->frac = FixedDiv(dist, MaxDist);
|
||||
|
||||
hitx = trace.x + FixedMul (Vx, dist);
|
||||
hity = trace.y + FixedMul (Vy, dist);
|
||||
hitz = StartZ + FixedMul (Vz, dist);
|
||||
}
|
||||
|
||||
|
||||
Results->HitType = TRACE_HitActor;
|
||||
Results->X = hitx;
|
||||
Results->Y = hity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue