mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- don't place the chasecam right at the hit position of the trace. This will be the intersection with a wall or sector plane and may cause clipping issues. Instead place it very slightly in front of the actual hit position.
This commit is contained in:
parent
9ab620814d
commit
d4b258f15b
1 changed files with 6 additions and 2 deletions
|
@ -2535,7 +2535,11 @@ bool P_CheckMove(AActor *thing, const DVector2 &pos, int flags)
|
|||
}
|
||||
else if ((flags & PCM_DROPOFF) && !(thing->flags & (MF_FLOAT|MF_DROPOFF)))
|
||||
{
|
||||
if (newz - tm.dropoffz > thing->MaxDropOffHeight)
|
||||
const DVector3 oldpos = thing->Pos();
|
||||
thing->SetOrigin(pos.X, pos.Y, newz, true);
|
||||
bool hcheck = (newz - thing->dropoffz > thing->MaxDropOffHeight);
|
||||
thing->SetOrigin(oldpos, true);
|
||||
if (hcheck)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -4840,7 +4844,7 @@ void P_AimCamera(AActor *t1, DVector3 &campos, DAngle &camangle, sector_t *&Came
|
|||
}
|
||||
else
|
||||
{
|
||||
campos = trace.HitPos;
|
||||
campos = trace.HitPos - trace.HitVector * 1/256.;
|
||||
}
|
||||
CameraSector = trace.Sector;
|
||||
unlinked = trace.unlinked;
|
||||
|
|
Loading…
Reference in a new issue