Editor partially started.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user