You've already forked HackerSM64
mirror of
https://github.com/HackerN64/HackerSM64.git
synced 2026-01-21 10:35:32 -08:00
revert ceil buffer
This commit is contained in:
@@ -329,7 +329,7 @@ f32 find_ceil(f32 posX, f32 posY, f32 posZ, struct Surface **pceil) {
|
||||
OSTime first = osGetTime();
|
||||
#endif
|
||||
s32 x = posX;
|
||||
s32 y = posY + FIND_FLOOR_CEIL_BUFFER;
|
||||
s32 y = posY;
|
||||
s32 z = posZ;
|
||||
*pceil = NULL;
|
||||
|
||||
@@ -401,7 +401,7 @@ static struct Surface *find_floor_from_list(struct SurfaceNode *surfaceNode, s32
|
||||
register struct Surface *surf, *floor = NULL;
|
||||
register SurfaceType type = SURFACE_DEFAULT;
|
||||
register f32 height;
|
||||
register s32 bufferY = (y + FIND_FLOOR_CEIL_BUFFER);
|
||||
register s32 bufferY = y + FIND_FLOOR_BUFFER;
|
||||
|
||||
// Iterate through the list of floors until there are no more floors.
|
||||
while (surfaceNode != NULL) {
|
||||
@@ -468,7 +468,7 @@ struct Surface *find_water_floor_from_list(struct SurfaceNode *surfaceNode, s32
|
||||
f32 curHeight = FLOOR_LOWER_LIMIT;
|
||||
f32 bottomHeight = FLOOR_LOWER_LIMIT;
|
||||
f32 curBottomHeight = FLOOR_LOWER_LIMIT;
|
||||
f32 buffer = FIND_FLOOR_CEIL_BUFFER;
|
||||
f32 buffer = FIND_FLOOR_BUFFER;
|
||||
|
||||
// Iterate through the list of water floors until there are no more water floors.
|
||||
// SURFACE_NEW_WATER_BOTTOM
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
|
||||
#include "config/config_world.h"
|
||||
|
||||
// The y coord is moved upward by this amount when finding floors and ceilings.
|
||||
// The y coord is moved upward by this amount when finding floors.
|
||||
// Vanilla value is 78.
|
||||
#define FIND_FLOOR_CEIL_BUFFER 78
|
||||
#define FIND_FLOOR_BUFFER 78
|
||||
|
||||
#define CELL_HEIGHT_LIMIT 20000
|
||||
#define FLOOR_LOWER_LIMIT -11000
|
||||
|
||||
@@ -157,7 +157,7 @@ void bhv_coin_formation_spawned_coin_loop(void) {
|
||||
o->oPosY += 300.0f;
|
||||
cur_obj_update_floor_height();
|
||||
|
||||
if (o->oPosY + FIND_FLOOR_CEIL_BUFFER < o->oFloorHeight || o->oFloorHeight < FLOOR_LOWER_LIMIT_MISC) {
|
||||
if (o->oPosY + FIND_FLOOR_BUFFER < o->oFloorHeight || o->oFloorHeight < FLOOR_LOWER_LIMIT_MISC) {
|
||||
obj_mark_for_deletion(o);
|
||||
} else {
|
||||
o->oPosY = o->oFloorHeight;
|
||||
|
||||
Reference in New Issue
Block a user