From cc936dacd7e520f54a4db18714b9cd1de931368e Mon Sep 17 00:00:00 2001 From: Juliano Leal Goncalves Date: Mon, 24 May 2021 00:34:32 -0300 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Replace=20'int'=20with=20'?= =?UTF-8?q?Direction'=20parameter=20on=20'PlrDirOK'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/player.cpp b/Source/player.cpp index c4c69e72b..d04248e25 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -1222,7 +1222,7 @@ bool SolidLoc(int x, int y) return nSolidTable[dPiece[x][y]]; } -bool PlrDirOK(int pnum, int dir) +bool PlrDirOK(int pnum, Direction dir) { bool isOk; @@ -1231,7 +1231,7 @@ bool PlrDirOK(int pnum, int dir) } auto &player = plr[pnum]; - Point position = player.position.tile + static_cast(dir); + Point position = player.position.tile + dir; if (position.x < 0 || !dPiece[position.x][position.y] || !PosOkPlayer(pnum, position.x, position.y)) { return false; }