Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix omp compatibility #21

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Fix omp compatibility #21

merged 2 commits into from
Apr 25, 2024

Conversation

NexiusTailer
Copy link
Contributor

@NexiusTailer NexiusTailer commented Apr 25, 2024

This mainly fixes the way it consider open.mp presence: previous checks were about compile-time detection so that it only could work properly if you use omp-stdlib with open.mp server. But since omp-stdlib makes various problems and illogical stuff (for example, like this or whatever else), many prefer running omp server with samp libraries. So, the changes are about that now it won't directly check for omp libraries, but still will be running correctly on both samp and omp server.

  1. GetPlayerPoolSize / GetVehiclePoolSize / GetActorPoolSize were completely removed. Yes, they are much better than using just MAX_PLAYERS, but the loops which contain it are used at init only, so it shouldn't be a big problem exactly in our case.
  2. Bool tagged parameter addsiren in CreateVehicle and AddStaticVehicleEx now is converted into a bool much more elegantly (by logical !! operation when it passed into the next hook, so it still will be valid for canonical samp libs and keep working correctly without a warning under omp libs where bool tag was added).

@ziggi
Copy link
Member

ziggi commented Apr 25, 2024

Yeah, looks good.

for example, like openmultiplayer/omp-stdlib#26 or whatever else

Looks weird. By my opinion, SetVehicleParamsEx should be separated to SetVehicleEngine, SetVehicleLights, etc. and then something like like undefined wouldn't be needed.

@ziggi ziggi merged commit 2ee5013 into Open-GTO:master Apr 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants