diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/entities.cpp | 21 | ||||
-rw-r--r-- | src/gameplay.cpp | 3 |
2 files changed, 11 insertions, 13 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index 7dc561b..1e6fad5 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -341,17 +341,18 @@ void NPC::interact(){ //have the npc's interact back to the player extern void waitForDialog(void); void Object::interact(void){ - if(questObject){ - char opt[]=":Yes:No"; - ui::dialogBox("You",opt,pickupDialog); - do{ - if(ui::dialogOptChosen == 1 && this->alive == true){ - player->inv->addItem((ITEM_ID)(identifier), (char)1); - this->alive = false; - } - }while(ui::dialogBoxExists); + if(questObject && alive){ + + ui::dialogBox("You",":Yes:No",pickupDialog); + while(ui::dialogBoxExists); + + if(ui::dialogOptChosen == 1 && alive){ + player->inv->addItem((ITEM_ID)(identifier), (char)1); + alive = false; + return; + } }else{ - this->alive = false; + alive = false; player->inv->addItem((ITEM_ID)(identifier), (char)1); } } diff --git a/src/gameplay.cpp b/src/gameplay.cpp index a4fec88..cc9ae6a 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -76,11 +76,8 @@ void initEverything(void){ playerSpawnHill=new World(); playerSpawnHill->setBackground(BG_FOREST); -<<<<<<< Updated upstream playerSpawnHill->generateFunc(1280,playerSpawnHillFunc); //playerSpawnHill->generate(1920); -======= ->>>>>>> Stashed changes /* * Setup the current world, making the player initially spawn in `test`. |