Skip to content

Tp to waypoint #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: enhanced
Choose a base branch
from
Open

Tp to waypoint #291

wants to merge 3 commits into from

Conversation

KONN0R-DEV
Copy link

@KONN0R-DEV KONN0R-DEV commented May 8, 2025

This code attempts to improve the tracking of the different heights of the game map, thus avoiding ending up underneath it

@rayty24
Copy link

rayty24 commented May 8, 2025

I'm kinda confused about this cause is this improved tp to waypoint or its just normal ?? Cause we already have one from the yimmenuv2 tho

@SourceModzZ
Copy link

Ground-Z investigation has been adjusted

  • ground_z = vec.z;
  • ground_z = vec.z + 25.f; // start slightly higher

Instead of working directly with vec.z, 25 units are now being started higher. This improves the success rate of teleporting in complex terrain.

Collision request corrected

  • STREAMING::REQUEST_COLLISION_AT_COORD (vec.x, vec.y, vec.z);
  • STREAMING::REQUEST_COLLISION_AT_COORD (vec.x, vec.y, ground_z);

Use ground_z instead of vec.z now - useful because ground_z was raised before.

Water height + safety limit

  • vec.z = water_height;
  • vec.z = std:max (water_height, min_safe_z);

Protection against too deep teleportation in the water (e.g. under the map). min_safe_z is, for example, 1.0f.

GET_GROUND_Z_FOR_3D_COORD improved

  • GET_GROUND_Z_FOR_3D_COORD (vec.x, vec.y, max_ground_check, ...)
  • GET_GROUND_Z_FOR_3D_COORD (vec.x, vec.y, ground_z, ...)

The height ground_z is used instead of a maximum fixed number - better for accuracy.

Fallback improved

  • vec.z = GET_APPROX_HEIGHT_FOR_POINT (...)
  • vec.z = std:max (GET_APPROX_HEIGHT_FOR_POINT (...), min_safe_z);
    Here, too, it is ensured that the height does not fall below a safe value.

@xZueS19
Copy link

xZueS19 commented May 10, 2025

yea it will be nice to have this since the existing one sometimes tp under the ground and the car gets destroyed and some missions fail.
it would be nice also to have tp to objective

KONN0R-DEV

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants