diff --git a/TODO b/TODO index 6f1fb42..adaf29e 100644 --- a/TODO +++ b/TODO @@ -30,7 +30,7 @@ + Get the default world to load on the real console. -- Fix the collision resolve jitter. ++ Fix the collision resolve jitter. (I must confess that I've seen in it in a professional 3d DS game once though) - Test the new edge-evasion code diff --git a/clown3d-DS.nds b/clown3d-DS.nds index 30329d7..55795b4 100644 Binary files a/clown3d-DS.nds and b/clown3d-DS.nds differ diff --git a/collisions.c b/collisions.c index 2718268..173fdb5 100644 --- a/collisions.c +++ b/collisions.c @@ -276,7 +276,7 @@ void resolveCollisions(game_obj* objs, void (*handler)(void*, void*)) earlier collision calculations) is added for edge evasion. */ if(node->type == PLAYER && which == 3) { node->box.min.x += move.x; - node->box.max.x += move.x; + node->box.max.x += move.x; } if(node->type == PLAYER && which == 1) { node->box.min.z += move.z; diff --git a/player.c b/player.c index 3f86032..0450717 100644 --- a/player.c +++ b/player.c @@ -184,10 +184,12 @@ void playerCollide(game_obj* a, game_obj* b) it results from movement on the Y axis */ - a->data[PLAYER_X] = a->box.min.x + 10; + if(a->box.move.y == 0) + a->data[PLAYER_X] = a->box.min.x + 10; if(a->box.move.y != 0) a->data[PLAYER_Y] = a->box.min.y + 10; - a->data[PLAYER_Z] = a->box.min.z + 10; + if(a->box.move.y == 0) + a->data[PLAYER_Z] = a->box.min.z + 10; } else if(b->type == KEY && b->data[KEY_EXISTS]) { /* Pick up a key */