Skip to content

Commit

Permalink
Gracefully handle rare glitch
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0ckeduser committed May 30, 2012
1 parent e09bed1 commit ab85b85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Binary file modified clown3d-DS.nds
Binary file not shown.
11 changes: 11 additions & 0 deletions collisions.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ void resolveCollisions(game_obj* objs, void (*handler)(void*, void*))
}
collision_found2:


/* Simple edge-evasion, based on PypeBros' suggestion.
When a collision occurs, a request is made to add the
the projection of the player's move vector on the "wall direction"
Expand All @@ -293,10 +294,20 @@ void resolveCollisions(game_obj* objs, void (*handler)(void*, void*))
*/

if(which == 3) {
if(react.x == 0) {
/* rare glitch. setup the EE bits
as if there was a conflict */
node->ee_bits = 6;
}
edge_evade(node, node2, 0);
ee = 1;
}
if(which == 1) {
if(react.z == 0) {
/* rare glitch. setup the EE bits
as if there was a conflict */
node->ee_bits = 6;
}
edge_evade(node, node2, 1);
ee = 1;
}
Expand Down

0 comments on commit ab85b85

Please sign in to comment.