-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Implement CVariant functions #569
base: main
Are you sure you want to change the base?
Conversation
I've also added a function to get a string from a |
you can just use fieldtype_t to replace VariantFieldTypes, fieldtype_t is generated from the schema |
LGTM!
Maybe modify it through a native call? |
4270e46
to
0eb0676
Compare
Finally had the time to work on this again. Added a Set() function with corresponding native functions. Currently untested (and I can't test at the moment - so I would be grateful if someone could!) @Yarukon - I've also used the generated field as you suggested. Thanks for the suggestion! |
I've left probably my last reviews on this, good job! |
@KillStr3aK Your cleanup suggestions have been made! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
-Fixed some IO crash. Workaround, need -> roflmuffin/CounterStrikeSharp#569
-Fixed some IO crash. Workaround, need -> roflmuffin/CounterStrikeSharp#569
will this be added to the main branch? |
I hope so. I've been using a local version of CounterStrikeSharp with this feature for a while, and I've not encountered any massive issues. cc: @roflmuffin for review? |
I did actually run into a crash or two, so I might investigate this code a bit further. |
… null on fail for GetVariantString
Hey @zonical, the changes look good to me, do you anticipate that your latest commit adds more safety to prevent the crashes? Do you need some more time to test |
I will need more time. Some of the crashes I've been having on my testing server seem to be resolved after my latest commit, but I want to ensure that everything is fully safe before merging. |
Very work in progress - working on it in small bits at a timeThis PR aims to implement functions to
CVariant
which accesses data fromvariant_t
on the C++ side. Useful for functions that hook into the Entity IO system.Unsure if a Set function is needed - but it can probably be done.