Skip to content
Snippets Groups Projects
Commit a54f3697 authored by Ian Prins's avatar Ian Prins
Browse files

check for coord newness

parent 831435ec
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ int main(int argv, char** args) {
} else if (key.vk == TCODK_RIGHT) {
newPos += Coord(1, 0);
}
if (level.contains(newPos) and level[newPos].isPassable()) {
if (newPos != player.getCoord() && level.contains(newPos) and level[newPos].isPassable()) {
player.setCoord(newPos);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment