diff --git a/src/components/headers/components.def b/src/components/headers/components.def index 10d88d8..ccea099 100644 --- a/src/components/headers/components.def +++ b/src/components/headers/components.def @@ -9,7 +9,7 @@ COMPONENT(INTERACT_COMPONENT, interact_component, DRAW) #else COMPONENT(TRANSFORM_COMPONENT, transform_component, NO_DRAW) COMPONENT(HITBOX_COMPONENT, hitbox_component, NO_DRAW) -COMPONENT(INTERACT_COMPONENT, interct_component, NO_DRAW) +COMPONENT(INTERACT_COMPONENT, interact_component, NO_DRAW) #endif // DEBUG >= 2 COMPONENT(PHYSICS_SYSTEM, physics_system, NO_DRAW) diff --git a/src/components/physics_system.c b/src/components/physics_system.c index 19f30c5..348f4c9 100644 --- a/src/components/physics_system.c +++ b/src/components/physics_system.c @@ -43,7 +43,6 @@ inline int physics_system_init(component_t *component) return EXIT_SUCCESS; } -// Only for this file // Args : physics_system_data_t *system_data, size_t entity_id static inline int action_detect_solve_entities_collision(elem_t *elem, va_list args) { @@ -116,7 +115,7 @@ int physics_system_update(component_t *component) system_data->velocity.y = lerp(system_data->velocity.y, system_data->target_velocity.y, system_data->smoothing_factor); if(hitbox_component_data->activated) - linked_list_for_each(&game.entity_manager.entities, action_detect_solve_entities_collision, system_data, component->entity->id); + if(linked_list_for_each(&game.entity_manager.entities, action_detect_solve_entities_collision, system_data, component->entity->id)) return EXIT_FAILURE; transform_component_data->bounds.x += system_data->velocity.x * system_data->speed * (float)game.delta_time_ms / 1000.0f; transform_component_data->bounds.y += system_data->velocity.y * system_data->speed * (float)game.delta_time_ms / 1000.0f; diff --git a/src/game.c b/src/game.c index 428fab8..f3f0b92 100644 --- a/src/game.c +++ b/src/game.c @@ -94,12 +94,12 @@ int game_init(void) ((interact_component_data_t *)component->data)->position = (fvector2d_t) { .x = 0.5f, - .y = 4.0f / 3.0f + .y = 2.0f }; ((interact_component_data_t *)component->data)->scale = (fvector2d_t) { .x = 2.0f / 3.0f, - .y = 0.7f + .y = 5.0f / 6.0f }; /* ======== Door ======== */