collision/more physics updates
All checks were successful
Build Project / build (ubuntu-latest) (push) Successful in 17m55s

This commit is contained in:
swim67667
2026-06-27 00:54:11 -04:00
parent 40747ec508
commit fded40cbd9
5 changed files with 35 additions and 21 deletions

View File

@@ -1,5 +1,6 @@
#include <stddef.h>
#include "world.h"
#include "collision.h"
// the beeg one. hooooooooooooooooh boy
@@ -39,12 +40,12 @@ bool IsGrounded(Entity *e)
{
if (!e)
return false;
return (
e->position.y +
e->size * 0.5f >=
ground_y - 2.0f
);
if(e->position.y +e->size * 0.5f >=ground_y - 2.0f || e->headgrounded){
return true;
}
else{
return false;
}
}
Entity *SpawnEntity(
@@ -76,6 +77,7 @@ Entity *SpawnEntity(
e->force = (Vector2){0, 0};
e->color = color;
e->headgrounded = false;
return e;
}