summaryrefslogtreecommitdiffstats
path: root/src/control/Replay.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-21 10:55:39 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-21 10:55:39 +0200
commit7cc3410846796a7bb0946384c7e22652f2bb60e6 (patch)
tree0b3d6d0675c44c21c83541f9f9c71e6244c6cf06 /src/control/Replay.cpp
parentMerge remote-tracking branch 'upstream/master' (diff)
parentlibrw skin pipe (diff)
downloadre3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar
re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.gz
re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.bz2
re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.lz
re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.xz
re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.zst
re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.zip
Diffstat (limited to 'src/control/Replay.cpp')
-rw-r--r--src/control/Replay.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index 466aa25e..d37e98cf 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -681,9 +681,9 @@ void CReplay::StoreCarUpdate(CVehicle *vehicle, int id)
vp->health = vehicle->m_fHealth / 4.0f; /* Not anticipated that health can be > 1000. */
vp->acceleration = vehicle->m_fGasPedal * 100.0f;
vp->panels = vehicle->IsCar() ? ((CAutomobile*)vehicle)->Damage.m_panelStatus : 0;
- vp->velocityX = 8000.0f * max(-4.0f, min(4.0f, vehicle->GetMoveSpeed().x)); /* 8000!? */
- vp->velocityY = 8000.0f * max(-4.0f, min(4.0f, vehicle->GetMoveSpeed().y));
- vp->velocityZ = 8000.0f * max(-4.0f, min(4.0f, vehicle->GetMoveSpeed().z));
+ vp->velocityX = 8000.0f * Max(-4.0f, Min(4.0f, vehicle->GetMoveSpeed().x)); /* 8000!? */
+ vp->velocityY = 8000.0f * Max(-4.0f, Min(4.0f, vehicle->GetMoveSpeed().y));
+ vp->velocityZ = 8000.0f * Max(-4.0f, Min(4.0f, vehicle->GetMoveSpeed().z));
vp->mi = vehicle->GetModelIndex();
vp->primary_color = vehicle->m_currentColour1;
vp->secondary_color = vehicle->m_currentColour2;
@@ -1512,9 +1512,9 @@ void CReplay::ProcessLookAroundCam(void)
--FramesActiveLookAroundCam;
fBetaAngleLookAroundCam += x_moved;
if (CPad::NewMouseControllerState.LMB && CPad::NewMouseControllerState.RMB)
- fDistanceLookAroundCam = max(3.0f, min(15.0f, fDistanceLookAroundCam + 2.0f * y_moved));
+ fDistanceLookAroundCam = Max(3.0f, Min(15.0f, fDistanceLookAroundCam + 2.0f * y_moved));
else
- fAlphaAngleLookAroundCam = max(0.1f, min(1.5f, fAlphaAngleLookAroundCam + y_moved));
+ fAlphaAngleLookAroundCam = Max(0.1f, Min(1.5f, fAlphaAngleLookAroundCam + y_moved));
CVector camera_pt(
fDistanceLookAroundCam * Sin(fBetaAngleLookAroundCam) * Cos(fAlphaAngleLookAroundCam),
fDistanceLookAroundCam * Cos(fBetaAngleLookAroundCam) * Cos(fAlphaAngleLookAroundCam),