diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 6e769847..81e8f340 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -675,7 +675,7 @@ struct Object *spawn_object_at_origin(struct Object *parent, UNUSED s32 unusedAr obj->header.gfx.activeAreaIndex = parent->header.gfx.areaIndex; obj->globalPlayerIndex = 0; - if (model >= MAX_LOADED_GRAPH_NODES) { model = MODEL_NONE; } + if (model >= MAX_LOADED_GRAPH_NODES) { model = MODEL_ERROR_MODEL; } geo_obj_init((struct GraphNodeObject *) &obj->header.gfx, gLoadedGraphNodes[model], gVec3fZero, gVec3sZero); smlua_call_event_hooks_object_model_param(HOOK_OBJECT_SET_MODEL, obj, model); @@ -1374,7 +1374,7 @@ void cur_obj_set_model(s32 modelID) { } void obj_set_model(struct Object* obj, s32 modelID) { - if (modelID >= MAX_LOADED_GRAPH_NODES) { modelID = MODEL_NONE; } + if (modelID >= MAX_LOADED_GRAPH_NODES) { modelID = MODEL_ERROR_MODEL; } obj->header.gfx.sharedChild = gLoadedGraphNodes[modelID]; dynos_actor_override((void*)&obj->header.gfx.sharedChild); smlua_call_event_hooks_object_model_param(HOOK_OBJECT_SET_MODEL, obj, modelID);