Drunk patrons cannot attend the club again
This commit is contained in:
parent
1ea15d00e0
commit
a69cf1584a
@ -1059,6 +1059,7 @@ void FP_EntityActionStateMachine(FP_Game *game, TELY_Audio *audio, TELY_Platform
|
|||||||
FP_GameEntity *patron = FP_Game_GetEntity(game, entity->building_patron);
|
FP_GameEntity *patron = FP_Game_GetEntity(game, entity->building_patron);
|
||||||
patron->flags &= ~FP_GameEntityFlag_OccupiedInBuilding;
|
patron->flags &= ~FP_GameEntityFlag_OccupiedInBuilding;
|
||||||
patron->base_acceleration_per_s.meters *= .5f;
|
patron->base_acceleration_per_s.meters *= .5f;
|
||||||
|
patron->is_drunk = true;
|
||||||
}
|
}
|
||||||
entity->building_patron = {};
|
entity->building_patron = {};
|
||||||
FP_Game_EntityTransitionState(game, entity, FP_EntityClubTerryState_Idle);
|
FP_Game_EntityTransitionState(game, entity, FP_EntityClubTerryState_Idle);
|
||||||
@ -1601,6 +1602,10 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput *input
|
|||||||
if (entity->converted_faction && it_entity->type == FP_EntityType_ChurchTerry)
|
if (entity->converted_faction && it_entity->type == FP_EntityType_ChurchTerry)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// NOTE: Already drunk, we are not allowed to enter the nightclub again
|
||||||
|
if (entity->is_drunk && it_entity->type == FP_EntityType_ClubTerry)
|
||||||
|
continue;
|
||||||
|
|
||||||
// NOTE: The queue to enter the building is completely full skip
|
// NOTE: The queue to enter the building is completely full skip
|
||||||
if (it_entity->building_queue.size == Dqn_FArray_Max(&it_entity->building_queue))
|
if (it_entity->building_queue.size == Dqn_FArray_Max(&it_entity->building_queue))
|
||||||
continue;
|
continue;
|
||||||
|
@ -229,10 +229,10 @@ static FP_GameEntity *FP_Game_MakeEntityPointerFV(FP_Game *game, DQN_FMT_STRING_
|
|||||||
result->hp_cap = DQN_CAST(uint32_t)(FP_DEFAULT_DAMAGE * .8f);
|
result->hp_cap = DQN_CAST(uint32_t)(FP_DEFAULT_DAMAGE * .8f);
|
||||||
result->hp = result->hp_cap;
|
result->hp = result->hp_cap;
|
||||||
|
|
||||||
result->inventory.airports_base_price = 50;
|
result->inventory.airports_base_price = 100;
|
||||||
result->inventory.churchs_base_price = 50;
|
result->inventory.churchs_base_price = 100;
|
||||||
result->inventory.kennels_base_price = 50;
|
result->inventory.kennels_base_price = 100;
|
||||||
result->inventory.clubs_base_price = 50;
|
result->inventory.clubs_base_price = 40;
|
||||||
result->base_attack = FP_DEFAULT_DAMAGE;
|
result->base_attack = FP_DEFAULT_DAMAGE;
|
||||||
result->hp_recover_every_n_ticks = 12;
|
result->hp_recover_every_n_ticks = 12;
|
||||||
|
|
||||||
|
@ -227,6 +227,7 @@ struct FP_GameEntity
|
|||||||
uint32_t hp_recover_every_n_ticks;
|
uint32_t hp_recover_every_n_ticks;
|
||||||
uint32_t base_attack;
|
uint32_t base_attack;
|
||||||
|
|
||||||
|
bool is_drunk;
|
||||||
bool converted_faction;
|
bool converted_faction;
|
||||||
FP_GameEntityFaction faction;
|
FP_GameEntityFaction faction;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user