diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index 097624b4b..c1862864b 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -8368,6 +8368,7 @@ end --- @param obj Object --- @param bits integer +--- Runs an OR operator on the `obj`'s respawn info with `bits` << 8. If `bits` is 0xFF, this prevents the object from respawning after leaving and re-entering the area function set_object_respawn_info_bits(obj, bits) -- ... end diff --git a/docs/lua/functions-5.md b/docs/lua/functions-5.md index 9b7cc8994..51ae191d8 100644 --- a/docs/lua/functions-5.md +++ b/docs/lua/functions-5.md @@ -4571,6 +4571,9 @@ ## [set_object_respawn_info_bits](#set_object_respawn_info_bits) +### Description +Runs an OR operator on the `obj`'s respawn info with `bits` << 8. If `bits` is 0xFF, this prevents the object from respawning after leaving and re-entering the area + ### Lua Example `set_object_respawn_info_bits(obj, bits)` diff --git a/src/game/object_list_processor.h b/src/game/object_list_processor.h index dc9b7a338..24a1acf27 100644 --- a/src/game/object_list_processor.h +++ b/src/game/object_list_processor.h @@ -118,6 +118,7 @@ extern s16 gMarioOnMerryGoRound; void bhv_mario_update(void); +/* |description|Runs an OR operator on the `obj`'s respawn info with `bits` << 8. If `bits` is 0xFF, this prevents the object from respawning after leaving and re-entering the area|descriptionEnd| */ void set_object_respawn_info_bits(struct Object *obj, u8 bits); void unload_objects_from_area(UNUSED s32 unused, s32 areaIndex); void spawn_objects_from_info(UNUSED s32 unused, struct SpawnInfo *spawnInfo);