aboutsummaryrefslogtreecommitdiffstats
path: root/src/entities.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-03-15 08:43:44 -0400
committerClyne Sullivan <tullivan99@gmail.com>2016-03-15 08:43:44 -0400
commit93d6035dad1eb60fb01648232809e55059dd1cfa (patch)
tree2384f3991593ce6b4a37e7e289cfdd634aeec380 /src/entities.cpp
parentc8c09860cb732006e161d26f25ff46e508770218 (diff)
hills
Diffstat (limited to 'src/entities.cpp')
-rw-r--r--src/entities.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/entities.cpp b/src/entities.cpp
index 8a10428..7d906ea 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -562,17 +562,19 @@ void Mob::wander(int timeRun){
if(aggressive && !YAYA &&
player->loc.x + (width / 2) > loc.x && player->loc.x + (width / 2) < loc.x + width &&
player->loc.y + (height / 3) > loc.y && player->loc.y + (height / 3) < loc.y + height ){
- Arena *a = new Arena(currentWorld,player,this);
- a->setStyle("");
- a->setBackground( WorldBGType::Forest );
- a->setBGM("assets/music/embark.wav");
+ if ( !ui::dialogBoxExists ) {
+ Arena *a = new Arena(currentWorld,player,this);
+ a->setStyle("");
+ a->setBackground( WorldBGType::Forest );
+ a->setBGM("assets/music/embark.wav");
- ui::toggleWhiteFast();
- YAYA = true;
- ui::waitForCover();
- YAYA = false;
- currentWorld = a;
- ui::toggleWhiteFast();
+ ui::toggleWhiteFast();
+ YAYA = true;
+ ui::waitForCover();
+ YAYA = false;
+ currentWorld = a;
+ ui::toggleWhiteFast();
+ }
}
switch(subtype){