diff --git a/feely_pona.cpp b/feely_pona.cpp index 74f5b48..806ad23 100644 --- a/feely_pona.cpp +++ b/feely_pona.cpp @@ -159,6 +159,31 @@ static void FP_Game_MoveEntity(FP_Game *game, FP_GameEntityHandle entity_handle, if ((collider->flags & FP_GameEntityFlag_NonTraversable) == 0) continue; + bool entity_collides_with_collider = true; + switch (entity->type) { + case FP_EntityType_Nil: { + } break; + + case FP_EntityType_Terry: { + } break; + + case FP_EntityType_Smoochie: { + if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger) + entity_collides_with_collider = false; + } break; + + case FP_EntityType_Clinger: { + if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger) + entity_collides_with_collider = false; + } break; + + case FP_EntityType_Merchant: { + } break; + } + + if (!entity_collides_with_collider) + continue; + // NOTE: Sweep collider with half the radius of the source entity Dqn_Rect collider_world_hit_box = FP_Game_CalcEntityWorldHitBox(game, collider->handle); Dqn_Rect swept_collider_world_hit_box = collider_world_hit_box; @@ -1197,7 +1222,7 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input else attack_dir_vector.x = -1.f; - Dqn_V2 attack_acceleration_meters_per_s = attack_dir_vector * 20.f; + Dqn_V2 attack_acceleration_meters_per_s = attack_dir_vector * 60.f; FP_Game_MoveEntity(game, defender->handle, attack_acceleration_meters_per_s); } } diff --git a/feely_pona_entity.h b/feely_pona_entity.h index db62281..ccb86be 100644 --- a/feely_pona_entity.h +++ b/feely_pona_entity.h @@ -10,6 +10,7 @@ enum FP_EntityType FP_EntityType_Smoochie, FP_EntityType_Merchant, FP_EntityType_Clinger, + FP_EntityType_Count, }; enum FP_EntityTerryState