Skip to content

Commit

Permalink
some misc. tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0ckeduser committed May 29, 2012
1 parent d842cf0 commit b091657
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Binary file modified clown3d-DS.nds
Binary file not shown.
12 changes: 7 additions & 5 deletions collisions.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ float smallestOfThree(float a, float b, float c)
react.y = node->box.move.y * ratio; \
react.z = node->box.move.z * ratio; \
\
if(ratio == 0.0 && node->box.move.y == 0.0){ glitch = 1; goto foundglitch; }\
if(node->type == PLAYER && \
ratio == 0.0 && node->box.move.y == 0.0){ \
glitch = 1; goto foundglitch; } \
\
goto jump; \
} \
Expand Down Expand Up @@ -294,12 +296,12 @@ void resolveCollisions(game_obj* objs, void (*handler)(void*, void*))
move vector on the "wall direction" (obtained here from
earlier collision calculations) is added for edge evasion. */
if(node->type == PLAYER && which == 3 && !glitch && !cc) {
node->box.min.x += move.x * 0.7;
node->box.max.x += move.x * 0.7;
node->box.min.x += move.x * 0.4;
node->box.max.x += move.x * 0.4;
}
if(node->type == PLAYER && which == 1 && !glitch && !cc) {
node->box.min.z += move.z * 0.7;
node->box.max.z += move.z * 0.7;
node->box.min.z += move.z * 0.4;
node->box.max.z += move.z * 0.4;
}

node->box.min.x += react.x;
Expand Down

0 comments on commit b091657

Please sign in to comment.