From f87f14b432ea4b10f7359269bf697975a905c6f2 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Wed, 25 Aug 2021 13:41:41 +0300 Subject: Refactor cPedComments --- src/core/config.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core') diff --git a/src/core/config.h b/src/core/config.h index 2590a0ee..8943223b 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, -- cgit v1.2.3 From 915888d2752cd78a6a64735d3856ac0c4d7153d2 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 26 Aug 2021 21:14:26 +0300 Subject: fixed debug teleport --- src/core/Radar.cpp | 2 +- src/core/re3.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 7e3a75b3..4e15559d 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -1504,7 +1504,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, 0.0f/*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/re3.cpp b/src/core/re3.cpp index d3b1f266..672cca98 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -775,12 +775,14 @@ FixCar(void) static void TeleportToWaypoint(void) { + CStreaming::LoadScene(CRadar::TargetMarkerPos); + CStreaming::LoadSceneCollision(CRadar::TargetMarkerPos); if (FindPlayerVehicle()) { if (CRadar::TargetMarkerId != -1) - FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FindPlayerVehicle()->GetColModel()->boundingSphere.center.z)); + FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, CWorld::FindGroundZForCoord(CRadar::TargetMarkerPos.x, CRadar::TargetMarkerPos.y) + FindPlayerVehicle()->GetColModel()->boundingSphere.radius)); } else if(CRadar::TargetMarkerId != -1) - FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, FEET_OFFSET)); + FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, CWorld::FindGroundZForCoord(CRadar::TargetMarkerPos.x, CRadar::TargetMarkerPos.y) + FEET_OFFSET)); } #endif -- cgit v1.2.3 From 7a80acf6a16cae5aa3303090097a43406746e04d Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 26 Aug 2021 21:50:19 +0300 Subject: fix debug teleport --- src/core/re3.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/core') diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 672cca98..b9cfc34d 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" @@ -775,14 +776,14 @@ FixCar(void) static void TeleportToWaypoint(void) { - CStreaming::LoadScene(CRadar::TargetMarkerPos); - CStreaming::LoadSceneCollision(CRadar::TargetMarkerPos); - if (FindPlayerVehicle()) { - if (CRadar::TargetMarkerId != -1) - FindPlayerVehicle()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, CWorld::FindGroundZForCoord(CRadar::TargetMarkerPos.x, CRadar::TargetMarkerPos.y) + FindPlayerVehicle()->GetColModel()->boundingSphere.radius)); - } else - if(CRadar::TargetMarkerId != -1) - FindPlayerPed()->Teleport(CRadar::TargetMarkerPos + CVector(0.0f, 0.0f, CWorld::FindGroundZForCoord(CRadar::TargetMarkerPos.x, CRadar::TargetMarkerPos.y) + 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 -- cgit v1.2.3