diff --git a/src/game/first_person_cam.c b/src/game/first_person_cam.c index 6d45f800a..4f222bb2c 100644 --- a/src/game/first_person_cam.c +++ b/src/game/first_person_cam.c @@ -35,6 +35,9 @@ bool first_person_check_cancels(void) { if (m->action == ACT_FIRST_PERSON || m->action == ACT_IN_CANNON || m->action == ACT_READING_NPC_DIALOG || m->action == ACT_DISAPPEARED) { return true; } + + if (gLuaLoadingMod != NULL) { return false; } + struct Object *bowser = find_object_with_behavior(bhvBowser); if (bowser != NULL && (bowser->oAction == 5 || bowser->oAction == 6)) { return true; diff --git a/src/pc/lua/utils/smlua_obj_utils.c b/src/pc/lua/utils/smlua_obj_utils.c index 1bda952d1..c0ed5c4eb 100644 --- a/src/pc/lua/utils/smlua_obj_utils.c +++ b/src/pc/lua/utils/smlua_obj_utils.c @@ -11,6 +11,9 @@ #include "pc/debuglog.h" static struct Object* spawn_object_internal(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction, bool doSync) { + // prevent spawning objects on mod init, this can cause issues if --server is specificed + if (gLuaLoadingMod != NULL) { return NULL; } + if (doSync) { // prevent spawning objects before area is synchronized if (gNetworkPlayerLocal == NULL || !gNetworkPlayerLocal->currAreaSyncValid) { return NULL; }