Portal fix
This commit is contained in:
parent
4b4e83ac7e
commit
84afd0829c
1 changed files with 8 additions and 8 deletions
|
|
@ -45,17 +45,17 @@ void Pacman::tick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bound check
|
// Bound check
|
||||||
if (this->position.x < 0){
|
if (this->position.x < 16){
|
||||||
this->position.x += 320;
|
this->position.x += 288;
|
||||||
}
|
}
|
||||||
if (this->position.y < 0){
|
if (this->position.y < 16){
|
||||||
this->position.y += 320;
|
this->position.y += 288;
|
||||||
}
|
}
|
||||||
if (this->position.x >= 320){
|
if (this->position.x >= 304){
|
||||||
this->position.x -= 320;
|
this->position.x -= 288;
|
||||||
}
|
}
|
||||||
if (this->position.y >= 320){
|
if (this->position.y >= 304){
|
||||||
this->position.y -= 320;
|
this->position.y -= 288;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue