fix an oversight

This commit is contained in:
Isaac0-dev 2024-11-21 15:10:21 +10:00
parent 382b03d97f
commit 4deff6f3f4
4 changed files with 5 additions and 2 deletions

View file

@ -1063,6 +1063,7 @@
--- @field public customBehaviorIndex integer
--- @field public description string
--- @field public enabled boolean
--- @field public fileCapacity integer
--- @field public fileCount integer
--- @field public ignoreScriptWarnings boolean
--- @field public incompatible string

View file

@ -1439,6 +1439,7 @@
| customBehaviorIndex | `integer` | read-only |
| description | `string` | read-only |
| enabled | `boolean` | read-only |
| fileCapacity | `integer` | read-only |
| fileCount | `integer` | read-only |
| ignoreScriptWarnings | `boolean` | read-only |
| incompatible | `string` | read-only |

View file

@ -1188,12 +1188,13 @@ static struct LuaObjectField sMarioStateFields[LUA_MARIO_STATE_FIELD_COUNT] = {
{ "waterLevel", LVT_S16, offsetof(struct MarioState, waterLevel), false, LOT_NONE },
};
#define LUA_MOD_FIELD_COUNT 14
#define LUA_MOD_FIELD_COUNT 15
static struct LuaObjectField sModFields[LUA_MOD_FIELD_COUNT] = {
{ "basePath", LVT_STRING, offsetof(struct Mod, basePath), true, LOT_NONE },
{ "customBehaviorIndex", LVT_U8, offsetof(struct Mod, customBehaviorIndex), true, LOT_NONE },
{ "description", LVT_STRING_P, offsetof(struct Mod, description), true, LOT_NONE },
{ "enabled", LVT_BOOL, offsetof(struct Mod, enabled), true, LOT_NONE },
{ "fileCapacity", LVT_U16, offsetof(struct Mod, fileCapacity), true, LOT_NONE },
{ "fileCount", LVT_U16, offsetof(struct Mod, fileCount), true, LOT_NONE },
{ "ignoreScriptWarnings", LVT_BOOL, offsetof(struct Mod, ignoreScriptWarnings), true, LOT_NONE },
{ "incompatible", LVT_STRING_P, offsetof(struct Mod, incompatible), true, LOT_NONE },

View file

@ -110,7 +110,7 @@ void network_receive_network_players(struct Packet *p) {
packet_read(p, &playerName, sizeof(u8) * MAX_CONFIG_STRING);
packet_read(p, &discordId, sizeof(u8) * 64);
if (globalIndex > MAX_PLAYERS) { continue; }
if (globalIndex >= MAX_PLAYERS) { continue; }
u8 localIndex = network_player_connected(npType, globalIndex, modelIndex, &palette, playerName, discordId);
LOG_INFO("received network player [%d == %d] (%d)", globalIndex, npType, localIndex);