sanity check in case mario is not spawned

This can't be tested very easily since the chances of this happening is really low.
This commit is contained in:
Isaac0-dev 2024-11-28 17:00:57 +10:00
parent 92fbe54ebd
commit 27bc5c0e09

View file

@ -40,7 +40,7 @@ void network_player_update_model(u8 localIndex) {
if (index >= CT_MAX) { index = 0; }
m->character = &gCharacters[index];
if (m->marioObj == NULL) { return; }
if (m->marioObj == NULL || m->marioObj->behavior != smlua_override_behavior(bhvMario)) { return; }
obj_set_model(m->marioObj, m->character->modelId);
}