Allow walking through doors
This commit is contained in:
parent
d748874c08
commit
6696389ca4
1 changed files with 7 additions and 1 deletions
|
@ -774,6 +774,12 @@ Unit floorHeightAt(int16_t x, int16_t y)
|
|||
return UNITS_PER_SQUARE * 2;
|
||||
}
|
||||
|
||||
Unit collisionAt(int16_t x, int16_t y)
|
||||
{
|
||||
Unit square = level[(LEVEL_Y_RES - y -1) * LEVEL_X_RES + x];
|
||||
return square == 0 || square == 6 ? 0 : UNITS_PER_SQUARE;
|
||||
}
|
||||
|
||||
Unit textureAt(int16_t x, int16_t y)
|
||||
{
|
||||
Unit t = 0;
|
||||
|
@ -963,7 +969,7 @@ int main()
|
|||
}
|
||||
|
||||
player.update(moveDirection,strafe,rotationDirection,false,0,
|
||||
floorHeightAt,0,false,dt);
|
||||
collisionAt,0,false,dt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue