Skip to content
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

refactor(es_extended/client/functions.lua) e (es_extended/client/modules/streaming.lua) #674

Merged
merged 2 commits into from
Mar 24, 2024

Conversation

bitpredator
Copy link
Owner

Big refactor to client functions with no breaking changes (allegedly). Except for ESX.Game.SpawnObject that returns the object synchronous if no callback provided. (Just a new behaviour, keeps working as used to)

Added new functions:
· ESX.DrawMissionText
· ESX.Game.GetShapeTestResultSync **
· ESX.Game.RaycastScreen **
** Last two are used to improve the performance of ESX.Game.GetVehicleInDirection It already uses a Synchronous Shape Test Result less performant than solution provided.

In streaming functions, ff no callback provided, functions will return the first argument synchronously. if not, first argument will be passed to the callback.

Cache addon resource states instead of checking it every time a function is called

Fixes #[issue_no]

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you lint your code locally prior to submission?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Discord username (if different from GitHub):

…les/streaming.lua)

Big refactor to client functions with no breaking changes (allegedly).
Except for ESX.Game.SpawnObject that returns the object synchronous if no callback provided.
(Just a new behaviour, keeps working as used to)

Added new functions:
· ESX.DrawMissionText
· ESX.Game.GetShapeTestResultSync **
· ESX.Game.RaycastScreen **
** Last two are used to improve the performance of ESX.Game.GetVehicleInDirection
It already uses a Synchronous Shape Test Result less performant than solution provided.

In streaming functions, ff no callback provided, functions will return the first argument synchronously.
if not, first argument will be passed to the callback.

Cache addon resource states instead of checking it every time a function is called
@bitpredator bitpredator merged commit ddb4afe into main Mar 24, 2024
2 of 4 checks passed
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.

1 participant