From af947fb9a6fa85d403a9c041a8b46079a96072fa Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Fri, 22 Apr 2005 20:54:57 +0000 Subject: now player faces the right direction when attacking with right mouse button --- src/game.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index 1afa5e79..79f9a013 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -358,6 +358,14 @@ void do_input() } else if (target->isMonster()) { if (player_node->action == STAND) { + if (my > player_node->y) + player_node->direction = SOUTH; + else if (my < player_node->y) + player_node->direction = NORTH; + else if (mx > player_node->x) + player_node->direction = EAST; + else if (mx < player_node->x) + player_node->direction = WEST; player_node->action = ATTACK; action(0, target->id); player_node->walk_time = tick_time; -- cgit v1.2.3-70-g09d2