summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-10-18 16:17:11 +0200
committerSergeanur <s.anureev@yandex.ua>2020-10-18 16:17:11 +0200
commit8697eebbc237ceb0ed0d395a8c22440b9a1c15b8 (patch)
treeed2b2d923a03196c639e6f897f404b1caec0772d /src/control/Pickups.cpp
parentMerge remote-tracking branch 'origin/miami' into VC/Pickups (diff)
parentMerge branch 'master' into miami (diff)
downloadre3-8697eebbc237ceb0ed0d395a8c22440b9a1c15b8.tar
re3-8697eebbc237ceb0ed0d395a8c22440b9a1c15b8.tar.gz
re3-8697eebbc237ceb0ed0d395a8c22440b9a1c15b8.tar.bz2
re3-8697eebbc237ceb0ed0d395a8c22440b9a1c15b8.tar.lz
re3-8697eebbc237ceb0ed0d395a8c22440b9a1c15b8.tar.xz
re3-8697eebbc237ceb0ed0d395a8c22440b9a1c15b8.tar.zst
re3-8697eebbc237ceb0ed0d395a8c22440b9a1c15b8.zip
Diffstat (limited to 'src/control/Pickups.cpp')
-rw-r--r--src/control/Pickups.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp
index 720b77f6..ddf7cefb 100644
--- a/src/control/Pickups.cpp
+++ b/src/control/Pickups.cpp
@@ -855,7 +855,7 @@ CPickups::Update()
#ifdef CAMERA_PICKUP
if ( bPickUpcamActivated ) // taken from PS2
{
- float dist = (FindPlayerCoors() - StaticCamCoors).Magnitude2D();
+ float dist = Distance2D(StaticCamCoors, FindPlayerCoors());
float mult;
if ( dist < 10.0f )
mult = 1.0f - (dist / 10.0f );
@@ -871,8 +871,7 @@ CPickups::Update()
TheCamera.TakeControl(FindPlayerVehicle(), CCam::MODE_FIXED, JUMP_CUT, CAMCONTROL_SCRIPT);
}
- if ( FindPlayerVehicle() != pPlayerVehicle
- || (FindPlayerCoors() - StaticCamCoors).Magnitude() > 40.0f
+ if ( FindPlayerVehicle() != pPlayerVehicle || Distance(StaticCamCoors, FindPlayerCoors()) > 40.0f
|| ((CTimer::GetTimeInMilliseconds() - StaticCamStartTime) > 60000) )
{
TheCamera.RestoreWithJumpCut();