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

Updated/fixed 3 exclusive driver related natives #625

Closed
wants to merge 9 commits into from

Conversation

chipjpg
Copy link
Contributor

@chipjpg chipjpg commented Feb 6, 2022

No description provided.

@gottfriedleibniz
Copy link
Contributor

May need to double check ABI compatibility on 0xB09D25E77C33EB3F (cs_type int?). Additionally, 0x41062318F23ED854 has an SET_VEHICLE_EXCLUSIVE_DRIVER alias which conflicts with 0xB5C51B5502E85E83.

In addition, this native has been incorrect for so long, that changing it at this point will likely break scripts that have compensated for this mess. Just something to consider.

@chipjpg
Copy link
Contributor Author

chipjpg commented Feb 8, 2022

Additionally, 0x41062318F23ED854 has an SET_VEHICLE_EXCLUSIVE_DRIVER alias which conflicts with 0xB5C51B5502E85E83

Yeah I added that alias for documentation of prior name purposes but I see the issue now. I've removed that alias now.

May need to double check ABI compatibility on 0xB09D25E77C33EB3F

How would I do that? The parameter type was previously set as an integer but after looking at the disassembly, it's clearly an int*.

I've changed the file to include cs_type int now though.

changing it at this point will likely break scripts that have compensated for this mess

I guess we could leave the native names set to their incorrect names, but ensure the hashes are correct? The SET_VEHICLE_EXCLUSIVE_DRIVER_2 naming etc was quite confusing.

Copy link
Contributor

@stannum-cfx stannum-cfx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are quite confusing.

Maybe just changing the descriptions but keeping the original (incorrect) names and hashes is safer, at least for compatibility with existing scripts.


```c
// 0xB09D25E77C33EB3F
BOOL _IS_PED_EXCLUSIVE_DRIVER_OF_VEHICLE(Ped ped, Vehicle vehicle, int outIndex);
// 0xB09D25E77C33EB3F 0xFF62D324
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure adding joaat hashes is supported, this might break existing resources.

Where did you get this hash from?

Copy link
Contributor Author

@chipjpg chipjpg Apr 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The joaat hash was taken from the previous VEHICLE/SetVehicleExclusiveDriver.md.

As you can see, the previous joaat hashes didn't match.

If you hash "IS_PED_EXCLUSIVE_DRIVER_OF_VEHICLE" you will get 0xFF62D324.

---
## SET_VEHICLE_EXCLUSIVE_DRIVER

```c
// 0x41062318F23ED854 0xFF62D324
void SET_VEHICLE_EXCLUSIVE_DRIVER(Vehicle vehicle, cs_type(Ped) BOOL toggle);
// 0xB5C51B5502E85E83 0xAA8BD440
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, not sure if changing hashes is properly supported.
Maybe @blattersturm could verify this?

@stannum-cfx stannum-cfx added the needs validation This looks good, but needs additional confirmation of suggested change. label May 5, 2022
@AvarianKnight
Copy link
Collaborator

Given the fact that theres no nice way to add this without breaking compatibility with existing resources I'm going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs validation This looks good, but needs additional confirmation of suggested change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants