From 88682af45b3fe2d646b4b7600bc6e0a6a0d89d93 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Wed, 3 Dec 2008 13:04:45 +0000 Subject: [PATCH] Erwan - hopefully solved problem of AI's manaburn effect on linux --- projects/mtg/include/AIPlayer.h | 2 +- projects/mtg/src/AIPlayer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/mtg/include/AIPlayer.h b/projects/mtg/include/AIPlayer.h index c89a7cfc9..74de86d91 100644 --- a/projects/mtg/include/AIPlayer.h +++ b/projects/mtg/include/AIPlayer.h @@ -46,7 +46,7 @@ class AIPlayer: public Player{ class AIPlayerBaka: public AIPlayer{ protected: int oldGamePhase; - int timer; + float timer; MTGCardInstance * FindCardToPlay(ManaCost * potentialMana, const char * type); public: AIPlayerBaka(MTGPlayerCards * _deck, char * deckFile, char * avatarFile); diff --git a/projects/mtg/src/AIPlayer.cpp b/projects/mtg/src/AIPlayer.cpp index 01a699513..f50f1ad24 100644 --- a/projects/mtg/src/AIPlayer.cpp +++ b/projects/mtg/src/AIPlayer.cpp @@ -456,7 +456,7 @@ AIPlayerBaka::AIPlayerBaka(MTGPlayerCards * _deck, char * file, char * avatarFil } void AIPlayerBaka::initTimer(){ - timer = 20; + timer = 0.3; } int AIPlayerBaka::Act(float dt){ @@ -475,7 +475,7 @@ int AIPlayerBaka::Act(float dt){ if (checkInterrupt()) return 0; - timer--; + timer-= dt; if (timer>0){ return 0; }