fp: Disable collision on mobs when they have experienced the building
This commit is contained in:
+8
-1
@@ -175,8 +175,15 @@ static void FP_Game_MoveEntity(FP_Game *game, FP_GameEntityHandle entity_handle,
|
||||
case FP_EntityType_Catfish: /*FALLTHRU*/
|
||||
case FP_EntityType_Smoochie: /*FALLTHRU*/
|
||||
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;
|
||||
} else if (FP_Entity_IsBuildingForMobs(collider)) {
|
||||
// NOTE: We disable collision on buildings we have visited to avoid some
|
||||
// problems ...
|
||||
if (FP_SentinelList_Find(&entity->buildings_visited, collider->handle)) {
|
||||
entity_collides_with_collider = false;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
||||
case FP_EntityType_Terry: {
|
||||
|
||||
Reference in New Issue
Block a user