diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-28 14:50:52 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2023-10-28 14:50:52 +0200 |
| commit | 7d87e8e3e9eccbb3ae351f3218276b2dae506665 (patch) | |
| tree | 2a38f9ba83bb66c9e85b67aa7a18c4a4942e8d1f /src/throwables.c | |
| parent | 5de0682c37fc8e9713bb566a637f19a3795abc4a (diff) | |
fix issue with sprites
Diffstat (limited to 'src/throwables.c')
| -rw-r--r-- | src/throwables.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/throwables.c b/src/throwables.c index 1ad761f..275e95b 100644 --- a/src/throwables.c +++ b/src/throwables.c @@ -28,10 +28,7 @@ void throw_throwable(platform_window* window, u32 id, throwable_type type, float } } -bool check_if_throwable_collided_with_object(throwable* b, platform_window* window, vec3f oldpos, vec3f newpos, vec3f* direction) { - map_info info = get_map_info(window); - float size = get_bullet_size_in_tile(window); - +bool check_if_throwable_collided_with_object(throwable* b, vec3f oldpos, vec3f newpos, vec3f* direction) { bool result = false; for (int i = 0; i < MAX_OBJECTS; i++) { @@ -69,7 +66,7 @@ bool check_if_throwable_collided_with_object(throwable* b, platform_window* wind return result; } -void update_throwables_server(platform_window* window) { +void update_throwables_server() { float speed = 7.0f * SERVER_TICK_RATE; float gravity = 0.015f; @@ -101,7 +98,7 @@ void update_throwables_server(platform_window* window) { if (throwables[i].bounces >= 3) throwables[i].direction.z = 0; } - if (check_if_throwable_collided_with_object(&throwables[i], window, oldpos, throwables[i].position, &throwables[i].direction)) { + if (check_if_throwable_collided_with_object(&throwables[i], oldpos, throwables[i].position, &throwables[i].direction)) { add_audio_event_to_queue(EVENT_BOUNCE_THROWABLE, b.player_id, b.position); } } |
