Fix rooms and doors (#601)
* Fix rooms and doors * Update object_helpers.c * Update object_list_processor.h * Update object_list_processor.c * Fix formatting * Revert a formatting * Clean up geo_switch_area * Clean up geo_switch_area (more) * Move TransitionRoomData struct * Revert star door collision check optimization * Move load_object_collision_model and bhv_door_rendering_loop back out of star_door.inc.c * Combine metal door model IDs * Revert metal door sound fixes
This commit is contained in:
1 parent
f7bdca7533
commit
171f377412
9 files changed
+97
-84
No files matched your search
@@ -650,7 +650,8 @@ f32 find_floor(f32 xPos, f32 yPos, f32 zPos, struct Surface **pfloor) {
|
||||
}
|
||||
|
||||
f32 find_room_floor(f32 x, f32 y, f32 z, struct Surface **pfloor) {
|
||||
gCollisionFlags |= (COLLISION_FLAG_RETURN_FIRST | COLLISION_FLAG_EXCLUDE_DYNAMIC | COLLISION_FLAG_INCLUDE_INTANGIBLE);
|
||||
gCollisionFlags |= (COLLISION_FLAG_EXCLUDE_DYNAMIC | COLLISION_FLAG_INCLUDE_INTANGIBLE);
|
||||
|
||||
return find_floor(x, y, z, pfloor);
|
||||
}
|
||||
|
||||
@@ -660,11 +661,14 @@ f32 find_room_floor(f32 x, f32 y, f32 z, struct Surface **pfloor) {
|
||||
s32 get_room_at_pos(f32 x, f32 y, f32 z) {
|
||||
if (gCurrentArea->surfaceRooms != NULL) {
|
||||
struct Surface *floor;
|
||||
|
||||
find_room_floor(x, y, z, &floor);
|
||||
if (floor) {
|
||||
|
||||
if (floor != NULL) {
|
||||
return floor->room;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user