allow interact type to be 0 in hook_mario_action (#350)

* allow interact type to be 0 in hook_mario_action
This commit is contained in:
Isaac0-dev 2023-04-20 18:28:23 +10:00 committed by GitHub
parent d7fe908660
commit bc7909c392
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 13 deletions

View file

@ -11529,9 +11529,3 @@ MINOR_VERSION_NUMBER = 0
--- @type integer
PATCH_VERSION_NUMBER = 0
--- @type integer
VERSION_NUMBER = 34
--- @type string
VERSION_TEXT = "beta"

View file

@ -4092,10 +4092,7 @@
## [version.h](#version.h)
- MAX_LOCAL_VERSION_LENGTH
- MAX_VERSION_LENGTH
- MINOR_VERSION_NUMBER
- PATCH_VERSION_NUMBER
- VERSION_NUMBER
- VERSION_TEXT
[:arrow_up_small:](#)

View file

@ -4015,9 +4015,6 @@ char gSmluaConstants[] = ""
"COOP_OBJ_FLAG_LUA = (1 << 1)\n"
"COOP_OBJ_FLAG_NON_SYNC = (1 << 2)\n"
"COOP_OBJ_FLAG_INITIALIZED = (1 << 3)\n"
"VERSION_TEXT = 'beta'\n"
"VERSION_NUMBER = 34\n"
"MINOR_VERSION_NUMBER = 0\n"
"PATCH_VERSION_NUMBER = 0\n"
"MAX_VERSION_LENGTH = 28\n"
"MAX_LOCAL_VERSION_LENGTH = 32\n"

View file

@ -761,7 +761,7 @@ int smlua_hook_mario_action(lua_State* L) {
lua_Integer interactionType = 0;
if (paramCount >= 3) {
interactionType = smlua_to_integer(L, 3);
if (interactionType == 0 || !gSmLuaConvertSuccess) {
if (!gSmLuaConvertSuccess) {
LOG_LUA_LINE("Hook Action: tried to hook invalid interactionType: %lld, %u", interactionType, gSmLuaConvertSuccess);
return 0;
}