Skip to content

Commit

Permalink
restrict fixed flip to Normal and Initiative battle types
Browse files Browse the repository at this point in the history
  • Loading branch information
Primekick authored and Ghabry committed Sep 20, 2023
1 parent d93923f commit ac9cddf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/sprite_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
#include <lcf/reader_util.h>
#include "output.h"
#include "feature.h"
#include "game_battle.h"

Sprite_Actor::Sprite_Actor(Game_Actor* actor)
: Sprite_Battler(actor, actor->GetId())
{
CreateSprite();
if (Feature::HasFixedActorFacingDirection()) {
auto condition = Game_Battle::GetBattleCondition();
if ((condition == lcf::rpg::System::BattleCondition_none || condition == lcf::rpg::System::BattleCondition_initiative) && Feature::HasFixedActorFacingDirection()) {
fixed_facing = static_cast<FixedFacing>(lcf::Data::battlecommands.easyrpg_fixed_actor_facing_direction);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/sprite_enemy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
#include <lcf/reader_util.h>
#include "output.h"
#include "feature.h"
#include "game_battle.h"

Sprite_Enemy::Sprite_Enemy(Game_Enemy* enemy)
: Sprite_Battler(enemy, enemy->GetTroopMemberId())
{
CreateSprite();
if (Feature::HasFixedEnemyFacingDirection()) {
auto condition = Game_Battle::GetBattleCondition();
if ((condition == lcf::rpg::System::BattleCondition_none || condition == lcf::rpg::System::BattleCondition_initiative) && Feature::HasFixedEnemyFacingDirection()) {
fixed_facing = static_cast<FixedFacing>(lcf::Data::battlecommands.easyrpg_fixed_enemy_facing_direction);
}
}
Expand Down

0 comments on commit ac9cddf

Please sign in to comment.