mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- added support for angle changing portals to P_AimCamera.
This commit is contained in:
parent
e7c0fd26ba
commit
7ac0cfbbb9
3 changed files with 6 additions and 3 deletions
|
@ -335,7 +335,7 @@ bool P_CheckMissileSpawn(AActor *missile, double maxdist);
|
|||
void P_PlaySpawnSound(AActor *missile, AActor *spawner);
|
||||
|
||||
// [RH] Position the chasecam
|
||||
void P_AimCamera (AActor *t1, DVector3 &, sector_t *&sec, bool &unlinked);
|
||||
void P_AimCamera (AActor *t1, DVector3 &, DAngle &, sector_t *&sec, bool &unlinked);
|
||||
|
||||
// [RH] Means of death
|
||||
enum
|
||||
|
|
|
@ -4714,7 +4714,7 @@ void P_RailAttack(FRailParams *p)
|
|||
CVAR(Float, chase_height, -8.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, chase_dist, 90.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
void P_AimCamera(AActor *t1, DVector3 &campos, sector_t *&CameraSector, bool &unlinked)
|
||||
void P_AimCamera(AActor *t1, DVector3 &campos, DAngle &camangle, sector_t *&CameraSector, bool &unlinked)
|
||||
{
|
||||
double distance = clamp<double>(chase_dist, 0, 30000);
|
||||
DAngle angle = t1->Angles.Yaw - 180;
|
||||
|
@ -4740,6 +4740,7 @@ void P_AimCamera(AActor *t1, DVector3 &campos, sector_t *&CameraSector, bool &un
|
|||
}
|
||||
CameraSector = trace.Sector;
|
||||
unlinked = trace.unlinked;
|
||||
camangle = trace.SrcAngleFromTarget - 180.;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -937,8 +937,10 @@ void R_SetupFrame (AActor *actor)
|
|||
sector_t *oldsector = R_PointInSubsector(iview->Old.Pos)->sector;
|
||||
// [RH] Use chasecam view
|
||||
DVector3 campos;
|
||||
P_AimCamera (camera, campos, viewsector, unlinked); // fixme: This needs to translate the angle, too.
|
||||
DAngle camangle;
|
||||
P_AimCamera (camera, campos, camangle, viewsector, unlinked); // fixme: This needs to translate the angle, too.
|
||||
iview->New.Pos = campos;
|
||||
iview->New.Angles.Yaw = camangle;
|
||||
r_showviewer = true;
|
||||
// Interpolating this is a very complicated thing because nothing keeps track of the aim camera's movement, so whenever we detect a portal transition
|
||||
// it's probably best to just reset the interpolation for this move.
|
||||
|
|
Loading…
Reference in a new issue