Skip to content

Commit 3fcd557

Browse files
committed
Fix clang math offense
1 parent 4cf9808 commit 3fcd557

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/bots/follow/follow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ void CFollowBot::Tick()
2323
return;
2424

2525
int WalkDir = 0;
26-
if(pChr->GetPos().x < GetPos().x - 2 * 32)
26+
if(pChr->GetPos().x < GetPos().x - (2 * 32))
2727
WalkDir = -1;
28-
if(pChr->GetPos().x > GetPos().x + 2 * 32)
28+
if(pChr->GetPos().x > GetPos().x + (2 * 32))
2929
WalkDir = 1;
3030

31-
int Tile = Collision()->GetTile((int)(GetPos().x + 32 * WalkDir), (int)(GetPos().y));
31+
int Tile = Collision()->GetTile((int)(GetPos().x + (32 * WalkDir)), (int)(GetPos().y));
3232
if(Tile == 1)
3333
Jump(1, "jump over obstacle");
3434
SetDirection(WalkDir, "walk towards closest player");

0 commit comments

Comments
 (0)