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

GTA.UI.WorldToScreen does not exists on 2.10.12 #903

Open
justalemon opened this issue Dec 24, 2019 · 3 comments
Open

GTA.UI.WorldToScreen does not exists on 2.10.12 #903

justalemon opened this issue Dec 24, 2019 · 3 comments
Labels

Comments

@justalemon
Copy link
Contributor

justalemon commented Dec 24, 2019

Version
2.10.12

Description
I had this problem recently where a user tried to use GGOV 2.3 (compiled with SHVDN 2.10.7) and crashed because GTA.UI.WorldToScreen(GTA.Math.Vector3) does not exists on 2.10.12.

Is present on the source file but is commented for some reason.

@justalemon justalemon added the bug label Dec 24, 2019
@crosire
Copy link
Owner

crosire commented Dec 26, 2019

Yes. It was impossible to implement that after porting the codebase to C#. So it is the one and only function that had to go. Fortunately there are very little scripts that make use of it.

@Jitnaught
Copy link
Contributor

Jitnaught commented Jan 3, 2020

May I ask why it is impossible?

@crosire
Copy link
Owner

crosire commented Jan 3, 2020

See #869 (comment).

Workaround was to only compile UI.cpp in C++/CLI and all the other source files in C#. This means however that UI.cpp cannot reference types defined in the C# codebase, which includes GTA.Math.Vector3. So it is not possible to define a function signature containing GTA.Math.Vector3 in there. But it's also not possible to just compile that in C#, since it is part of the GTA.UI class defined in C++/CLI and there cannot be multiple definitions of the same class. So I had to decide between leaving all functions in (inculding GTA.UI.WorldToScreen), but breaking all scripts that make use of GTA.UI.WIDTH and GTA.UI.HEIGHT, or making GTA.UI.WIDTH and GTA.UI.HEIGHT work, but removing GTA.UI.WorldToScreen in the process and breaking scripts that use that. A lot more scripts make use of GTA.UI.WIDTH and GTA.UI.HEIGHT, so I chose the latter.

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

No branches or pull requests

3 participants