mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 21:45:12 +00:00
Allow network_init_object() to use fields that don't start with o
This commit is contained in:
parent
fb00d355f8
commit
594202dde9
1 changed files with 3 additions and 2 deletions
|
@ -111,7 +111,7 @@ int smlua_func_network_init_object(lua_State* L) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const char* fieldIdentifier = smlua_to_string(L, -1);
|
const char* fieldIdentifier = smlua_to_string(L, -1);
|
||||||
if (!gSmLuaConvertSuccess || fieldIdentifier[0] != 'o') {
|
if (!gSmLuaConvertSuccess) {
|
||||||
LOG_LUA("Invalid field passed to network_init_object()");
|
LOG_LUA("Invalid field passed to network_init_object()");
|
||||||
lua_pop(L, 1); // pop value
|
lua_pop(L, 1); // pop value
|
||||||
continue;
|
continue;
|
||||||
|
@ -121,7 +121,8 @@ int smlua_func_network_init_object(lua_State* L) {
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
data = smlua_get_custom_field(L, LOT_OBJECT, lua_gettop(L));
|
data = smlua_get_custom_field(L, LOT_OBJECT, lua_gettop(L));
|
||||||
}
|
}
|
||||||
if (data == NULL) {
|
bool validLvt = (data->valueType == LVT_U32) || (data->valueType == LVT_S32) || (data->valueType == LVT_F32);
|
||||||
|
if (data == NULL || !validLvt) {
|
||||||
LOG_LUA("Invalid field passed to network_init_object(): %s", fieldIdentifier);
|
LOG_LUA("Invalid field passed to network_init_object(): %s", fieldIdentifier);
|
||||||
lua_pop(L, 1); // pop value
|
lua_pop(L, 1); // pop value
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue