Skip to content

Commit

Permalink
Change limit x collision
Browse files Browse the repository at this point in the history
  • Loading branch information
joao18araujo authored and jpbusche committed Jun 2, 2017
1 parent 8437289 commit 15eb5fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ void Fighter::change_state(FighterState cstate){

void Fighter::test_limits(){
//TODO Matar personagem ao cair do cenario
if(box.x < 0) box.x = 0;
if(box.x > 1280) box.x = 1280;
if(box.x < box.width / 2) box.x = box.width / 2;
if(box.x > 1280 - box.width / 2) box.x = 1280 - box.width / 2;
if(box.y < 0 or box.y > 720){
box.y = 0;
pass_through = false;
Expand Down

0 comments on commit 15eb5fe

Please sign in to comment.