fp: Fix missing collision override on catfish

This commit is contained in:
doyle 2023-10-06 20:51:15 +11:00
parent 57a09d6f9a
commit 1bbae2a191

View File

@ -172,31 +172,23 @@ static void FP_Game_MoveEntity(FP_Game *game, FP_GameEntityHandle entity_handle,
bool entity_collides_with_collider = true; bool entity_collides_with_collider = true;
switch (entity->type) { switch (entity->type) {
case FP_EntityType_Smoochie: { case FP_EntityType_Catfish: /*FALLTHRU*/
if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger || collider->type == FP_EntityType_Catfish) case FP_EntityType_Smoochie: /*FALLTHRU*/
entity_collides_with_collider = false;
} break;
case FP_EntityType_Clinger: { case FP_EntityType_Clinger: {
if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger || collider->type == FP_EntityType_Catfish) if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger || collider->type == FP_EntityType_Catfish)
entity_collides_with_collider = false; entity_collides_with_collider = false;
} break; } break;
case FP_EntityType_Catfish: {
if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger || collider->type == FP_EntityType_Catfish)
entity_collides_with_collider = false;
} break;
case FP_EntityType_Nil: break;
case FP_EntityType_Terry: { case FP_EntityType_Terry: {
// NOTE: Don't collide with mobs when dashing (e.g. phase through)
FP_EntityTerryState state = *DQN_CAST(FP_EntityTerryState *)&entity->action.state; FP_EntityTerryState state = *DQN_CAST(FP_EntityTerryState *)&entity->action.state;
if (state == FP_EntityTerryState_Dash) { if (state == FP_EntityTerryState_Dash) {
if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger) if (collider->type == FP_EntityType_Smoochie || collider->type == FP_EntityType_Clinger || collider->type == FP_EntityType_Catfish)
entity_collides_with_collider = false; entity_collides_with_collider = false;
} }
} break; } break;
case FP_EntityType_Nil: break;
case FP_EntityType_MerchantTerry: break; case FP_EntityType_MerchantTerry: break;
case FP_EntityType_Count: break; case FP_EntityType_Count: break;
case FP_EntityType_ClubTerry: break; case FP_EntityType_ClubTerry: break;