fp: Add a basic data plan visualisation
This commit is contained in:
+7
-1
@@ -737,12 +737,18 @@ static void FP_Game_EntityTransitionState(FP_Game *game, FP_GameEntity *entity,
|
||||
{
|
||||
switch (entity->type) {
|
||||
case FP_EntityType_Terry: {
|
||||
if (desired_state == FP_EntityTerryState_Attack) {
|
||||
if (desired_state == FP_EntityTerryState_Attack ||
|
||||
desired_state == FP_EntityTerryState_RangeAttack) {
|
||||
if (!FP_Game_CanEntityAttack(entity, game->clock_ms)) {
|
||||
// NOTE: Cooldown not met do not transition
|
||||
return;
|
||||
}
|
||||
entity->last_attack_timestamp = game->clock_ms;
|
||||
|
||||
if (desired_state == FP_EntityTerryState_RangeAttack) {
|
||||
if (entity->terry_mobile_data_plan < FP_TERRY_MOBILE_DATA_PER_RANGE_ATTACK)
|
||||
return;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user