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

Update vox_lua_bridge.cpp #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update vox_lua_bridge.cpp #56

wants to merge 1 commit into from

Conversation

11Lee1
Copy link

@11Lee1 11Lee1 commented Jun 2, 2019

here

@SwadicalRag
Copy link
Member

just reading over the code, i think it'll work, but why use c++ eldritch pointer arithmetic instead of just casting it to a GarrysMod::Lua::UserData and modifying the struct fields?

@11Lee1
Copy link
Author

11Lee1 commented Jun 4, 2019

yeah definitely better to just use that, would help with readability.

https://pastebin.com/0AGB4U0H

@SwadicalRag
Copy link
Member

SwadicalRag commented Jun 4, 2019

what's going on in this line?

*(unsigned int*)udata->data = (unsigned int)udata->data + 8;

it seems like a no-op since udata->data is later overwritten before a read.

@11Lee1
Copy link
Author

11Lee1 commented Jun 29, 2019

no idea to be completely honest, it's just what I interpreted the disassembly as. if you'd like you could always just call the PushVector function that's on the LuaInterfaces's vmt like so https://pastebin.com/MVzBkVnh or update the class

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

Successfully merging this pull request may close these issues.

2 participants