diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-29 18:40:10 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-29 18:40:10 +0200 |
commit | c5c887cc11ce9ac5cbcd9683ab7673da65bab612 (patch) | |
tree | cc8e4cc133a2aa7d7f15e42adb6f17dfbb05f190 /src/core | |
parent | script revision p1 (diff) | |
parent | Fix bugs in cAudioManager::DirectlyEnqueueSample (diff) | |
download | re3-c5c887cc11ce9ac5cbcd9683ab7673da65bab612.tar re3-c5c887cc11ce9ac5cbcd9683ab7673da65bab612.tar.gz re3-c5c887cc11ce9ac5cbcd9683ab7673da65bab612.tar.bz2 re3-c5c887cc11ce9ac5cbcd9683ab7673da65bab612.tar.lz re3-c5c887cc11ce9ac5cbcd9683ab7673da65bab612.tar.xz re3-c5c887cc11ce9ac5cbcd9683ab7673da65bab612.tar.zst re3-c5c887cc11ce9ac5cbcd9683ab7673da65bab612.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Radar.cpp | 2 | ||||
-rw-r--r-- | src/core/config.h | 1 | ||||
-rw-r--r-- | src/core/re3.cpp | 15 |
3 files changed, 10 insertions, 8 deletions
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 6fb28184..b93b7d02 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -1573,7 +1573,7 @@ CRadar::ToggleTargetMarker(float x, float y) ms_RadarTrace[nextBlip].m_bDim = 0; ms_RadarTrace[nextBlip].m_bInUse = 1; ms_RadarTrace[nextBlip].m_Radius = 1.0f; - CVector pos(x, y, CWorld::FindGroundZForCoord(x,y)); + CVector pos(x, y, 0.0f); TargetMarkerPos = pos; ms_RadarTrace[nextBlip].m_vec2DPos = pos; ms_RadarTrace[nextBlip].m_vecPos = pos; diff --git a/src/core/config.h b/src/core/config.h index b20f85ae..0d29ff58 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -129,7 +129,6 @@ enum Config { NUMINVISIBLEENTITIES = 150, NUM_AUDIOENTITY_EVENTS = 4, - NUM_PED_COMMENTS_BANKS = 2, NUM_PED_COMMENTS_SLOTS = 20, NUM_SOUND_QUEUES = 2, diff --git a/src/core/re3.cpp b/src/core/re3.cpp index ca1915b0..4c2b9388 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -47,6 +47,7 @@ #include "CarCtrl.h" #include "Population.h" #include "IniFile.h" +#include "Zones.h" #include "crossplatform.h" @@ -771,12 +772,14 @@ FixCar(void) static void TeleportToWaypoint(void) { - if (FindPlayerVehicle()) { - if (CRadar::TargetMarkerId != -1) - FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FindPlayerVehicle()->GetColModel()->boundingSphere.center.z)); - } else - if(CRadar::TargetMarkerId != -1) - FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FEET_OFFSET)); + if (CRadar::TargetMarkerId == -1) + return; + CEntity* pEntityToTeleport = FindPlayerEntity(); + CVector vNewPos = CRadar::TargetMarkerPos; + CStreaming::LoadScene(vNewPos); + CStreaming::LoadSceneCollision(vNewPos); + vNewPos.z = CWorld::FindGroundZForCoord(vNewPos.x, vNewPos.y) + pEntityToTeleport->GetDistanceFromCentreOfMassToBaseOfModel(); + pEntityToTeleport->Teleport(vNewPos); } #endif |