Editor partially started.
All checks were successful
Build Dusk / build-linux (push) Successful in 44s
Build Dusk / build-psp (push) Successful in 55s

This commit is contained in:
2025-11-19 13:00:35 -06:00
parent 1668c4b0d2
commit 903dab49e3
13 changed files with 115 additions and 88 deletions

View File

@@ -81,30 +81,30 @@ void entityWalk(entity_t *entity, const entitydir_t direction) {
bool_t fall = false;
bool_t raise = false;
// Are we walking up stairs?
// Are we walking up a ramp?
if(
tileIsStairs(tileCurrent) &&
(direction+TILE_STAIRS_SOUTH) == tileCurrent &&
tileIsRamp(tileCurrent) &&
(direction+TILE_SHAPE_RAMP_SOUTH) == tileCurrent &&
newPos.z < (MAP_CHUNK_DEPTH - 1)
) {
tileNew = TILE_NULL;// Force check for stairs above.
tileNew = TILE_SHAPE_NULL;// Force check for ramp above.
worldpos_t abovePos = newPos;
abovePos.z += 1;
tile_t tileAbove = mapGetTile(abovePos);
if(tileAbove != TILE_NULL && tileIsWalkable(tileAbove)) {
// We can go up the stairs.
if(tileAbove != TILE_SHAPE_NULL && tileIsWalkable(tileAbove)) {
// We can go up the ramp.
raise = true;
}
} else if(tileNew == TILE_NULL && newPos.z > 0) {
} else if(tileNew == TILE_SHAPE_NULL && newPos.z > 0) {
// Falling down?
worldpos_t belowPos = newPos;
belowPos.z -= 1;
tile_t tileBelow = mapGetTile(belowPos);
if(
tileBelow != TILE_NULL &&
tileIsStairs(tileBelow) &&
(entityDirGetOpposite(direction)+TILE_STAIRS_SOUTH) == tileBelow
tileBelow != TILE_SHAPE_NULL &&
tileIsRamp(tileBelow) &&
(entityDirGetOpposite(direction)+TILE_SHAPE_RAMP_SOUTH) == tileBelow
) {
// We will fall to this tile.
fall = true;