diff options
-rw-r--r-- | src/entities.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index f2d7270..08af0a9 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -313,6 +313,10 @@ void NPC::interact(){ //have the npc's interact back to the player if(aiFunc.size()){ func=aiFunc.front(); canMove=false; + + left = (player->loc.x < loc.x); + right = !left; + if(!func(this)){ if(aiFunc.size())aiFunc.erase(aiFunc.begin()); } |