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

JsonConverter for Vector and QAngle broken with dotnet 8 #390

Closed
B3none opened this issue Mar 25, 2024 · 1 comment
Closed

JsonConverter for Vector and QAngle broken with dotnet 8 #390

B3none opened this issue Mar 25, 2024 · 1 comment
Labels
untriaged New issue has not been triaged

Comments

@B3none
Copy link
Collaborator

B3none commented Mar 25, 2024

When people are running v201 there's an issue with dotnet 8 which is caused by the way the Vector and QAngle classes are implemented.

Here's a link to my JsonConverter: https://github.com/B3none/cs2-retakes/blob/master/RetakesPlugin/Modules/Configs/JsonConverters/VectorJsonConverter.cs

Errors posted by community member:
https://pastes.io/uwpu4xdcya

It seems to be related to these lines:

public unsafe ref float X => ref Unsafe.Add(ref *(float*)Handle, 0);
public unsafe ref float Y => ref Unsafe.Add(ref *(float*)Handle, 1);
public unsafe ref float Z => ref Unsafe.Add(ref *(float*)Handle, 2);

@github-actions github-actions bot added the untriaged New issue has not been triaged label Mar 25, 2024
@B3none
Copy link
Collaborator Author

B3none commented Mar 26, 2024

@ipsvn sent this: dotnet/runtime#95893

He also made the PR to fix it in my plugin too 👍

It seems to be an issue with the JsonConverter attributes not being loaded in dotnet8 for some reason, but I can confirm this is not an error with CounterStrikeSharp. Although the Vector and Qangle classes do need some refinement 👀

Here's his PR for context:
https://github.com/B3none/cs2-retakes/pull/94/files

For now I'll close this ticket as it's not a CounterStrikeSharp issue.

@B3none B3none closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

1 participant