mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
01983cdee1
4 changed files with 7 additions and 3 deletions
|
@ -824,6 +824,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SorcFX2Orbit)
|
|||
else // Clock wise
|
||||
{
|
||||
self->specialf1 -= 10;
|
||||
angle = self->specialf1;
|
||||
pos = parent->Vec3Angle(dist, angle, parent->Floorclip + SORC_DEFENSE_HEIGHT);
|
||||
pos.Z += 20 * angle.Sin();
|
||||
// Spawn trailer
|
||||
|
|
|
@ -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