YimMenu / HorseMenu

HorseMenu, a beta-stage mod menu for Red Dead Redemption 2 and Red Dead Online, inspired by YimMenu, that protects against crashes and enhances your experience.
62 stars 29 forks source link

[Improvement]: Teleporting to waypoint #159

Closed Deadlineem closed 2 months ago

Deadlineem commented 2 months ago

Which feature

This feature does not like teleporting long distances, I've been tweaking some things and got it working faster/teleporting over long range BUT sometimes you fall through the map. I am not experienced enough to polish this further but I know we can get this to work perfectly from here.

As you can see from the video, from the 5 times I teleported, 2 of them put me under the map but the other 3 worked great.

@maybegreat48 @Rxann @tyackman

Reason

Current state does not allow teleporting to long distances, it just repeatedly fails to load the ground.

Additional context

comment out coords.z = 1000.f; in teleport.hpp

add: if (loadGround) { LoadGroundAtCoords(coords); Entity(ent).SetPosition(coords); Notifications::Show("Teleport", "Teleported entity to coords", NotificationType::Success); } else { LoadGroundAtCoords(coords); Entity(ent).SetPosition(coords); Notifications::Show("Teleport", "Teleported entity to coords", NotificationType::Success); }

then go to Entity.cpp and change

void Entity::SetPosition(rage::fvector3 position) { ENTITY::SET_ENTITY_COORDS(GetHandle(), position.x, position.y, position.z, false, true, true, true); }

to

void Entity::SetPosition(rage::fvector3 position) { ENTITY::SET_ENTITY_COORDS_NO_OFFSET(GetHandle(), position.x, position.y, position.z, true, true, true); }

Produces these results:

https://streamable.com/6yt041