mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
nullkiller2: Add battleEnded() callback to AIGateway for NK2 AI but leave it deactivated because it crashes NK during computer turns if it fights
This commit is contained in:
@@ -414,6 +414,14 @@ void AIGateway::battleResultsApplied()
|
||||
status.setBattle(NO_BATTLE);
|
||||
}
|
||||
|
||||
void AIGateway::battleEnded()
|
||||
{
|
||||
// TODO: Mircea: Mirroring what was just added for NK1 doesn't work, crashes the game when NK2 fights during computer turns
|
||||
// LOG_TRACE(logAi);
|
||||
// assert(status.getBattle() == ENDING_BATTLE);
|
||||
// status.setBattle(NO_BATTLE);
|
||||
}
|
||||
|
||||
void AIGateway::beforeObjectPropertyChanged(const SetObjectProperty * sop)
|
||||
{
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ public:
|
||||
void heroManaPointsChanged(const CGHeroInstance * hero) override;
|
||||
void heroSecondarySkillChanged(const CGHeroInstance * hero, int which, int val) override;
|
||||
void battleResultsApplied() override;
|
||||
void battleEnded() override;
|
||||
void beforeObjectPropertyChanged(const SetObjectProperty * sop) override;
|
||||
void objectPropertyChanged(const SetObjectProperty * sop) override;
|
||||
void buildChanged(const CGTownInstance * town, BuildingID buildingID, int what) override;
|
||||
|
||||
Reference in New Issue
Block a user