We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cf9808 commit 3fcd557Copy full SHA for 3fcd557
1 file changed
src/bots/follow/follow.cpp
@@ -23,12 +23,12 @@ void CFollowBot::Tick()
23
return;
24
25
int WalkDir = 0;
26
- if(pChr->GetPos().x < GetPos().x - 2 * 32)
+ if(pChr->GetPos().x < GetPos().x - (2 * 32))
27
WalkDir = -1;
28
- if(pChr->GetPos().x > GetPos().x + 2 * 32)
+ if(pChr->GetPos().x > GetPos().x + (2 * 32))
29
WalkDir = 1;
30
31
- int Tile = Collision()->GetTile((int)(GetPos().x + 32 * WalkDir), (int)(GetPos().y));
+ int Tile = Collision()->GetTile((int)(GetPos().x + (32 * WalkDir)), (int)(GetPos().y));
32
if(Tile == 1)
33
Jump(1, "jump over obstacle");
34
SetDirection(WalkDir, "walk towards closest player");
0 commit comments