vexyl / MCHawk2

A rewrite of the Minecraft classic software that I wrote, MCHawk
MIT License
5 stars 1 forks source link

Plugins not working properly on Linux #10

Closed vexyl closed 1 year ago

vexyl commented 2 years ago

For some reason there's some weird issues with sol2/Lua plugins on Linux (at least on my Debian system). Certain things randomly don't work, but do on Windows. I have a plugin where there's a PlayerData table (and metatable to make it like a class) with functions associated to it, and calling them randomly doesn't execute some of the code inside, but will if inside the main init.lua class. Bizarre. Probably something I'm doing wrong with sol2.

vexyl commented 2 years ago

I found the problem was that Utils::Vector uses floats and plugins pass those floats to packet making functions which require int16_t for position variables. It worked on Windows but failed silently on Linux, causing weird issues.