Fix lua packet's index always being 0 (#405)
This commit is contained in:
parent
2a3a666640
commit
490eacf86e
|
@ -26,7 +26,7 @@ void network_send_lua_custom(bool broadcast) {
|
||||||
// get local index
|
// get local index
|
||||||
s32 toLocalIndex = 0;
|
s32 toLocalIndex = 0;
|
||||||
if (!broadcast) {
|
if (!broadcast) {
|
||||||
s32 toLocalIndex = smlua_to_integer(L, paramIndex++);
|
toLocalIndex = smlua_to_integer(L, paramIndex++);
|
||||||
if (toLocalIndex <= 0 || toLocalIndex >= MAX_PLAYERS) {
|
if (toLocalIndex <= 0 || toLocalIndex >= MAX_PLAYERS) {
|
||||||
LOG_LUA_LINE("Tried to send packet to invalid local index: %d", toLocalIndex)
|
LOG_LUA_LINE("Tried to send packet to invalid local index: %d", toLocalIndex)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue