summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2004-09-28 09:19:56 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2004-09-28 09:19:56 +0000
commitf616a0e4736cc6f7b9b593b5579328469c3cc159 (patch)
tree99b578737778ae3b19f00dbe26964a10fb02724d /src/game.cpp
parent4e3e8d31962780b5a7fd6e7ba30d59ae34c75700 (diff)
downloadmana-client-f616a0e4736cc6f7b9b593b5579328469c3cc159.tar.gz
mana-client-f616a0e4736cc6f7b9b593b5579328469c3cc159.tar.bz2
mana-client-f616a0e4736cc6f7b9b593b5579328469c3cc159.tar.xz
mana-client-f616a0e4736cc6f7b9b593b5579328469c3cc159.zip
*** empty log message ***
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 90aac57b..b6d21c5a 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -200,7 +200,7 @@ void do_input() {
if(player_node->action==STAND)
if(key[KEY_LCONTROL]) {
player_node->action = ATTACK;
- attack(x, y, get_direction(player_node->coordinates));
+ attack(get_x(player_node->coordinates), get_y(player_node->coordinates), get_direction(player_node->coordinates));
player_node->tick_time = tick_time;
}
@@ -230,22 +230,6 @@ void do_input() {
}
}
- //rect(screen, (mouse_x/32)*32,(mouse_y/32)*32, ((mouse_x/32)+1)*32, ((mouse_y/32)+1)*32, makecol(255,255,255));
-
- if(mouse_b&2) {
- if(!show_npc_dialog) {
- int npc_x = mouse_x/32+map_x/32;
- int npc_y = mouse_y/32+map_y/32;
- int id = find_npc(npc_x, npc_y);
- if(id!=0) {
- WFIFOW(0) = net_w_value(0x0090);
- WFIFOL(2) = net_l_value(id);
- WFIFOB(6) = 0;
- WFIFOSET(7);
- }
- }
- }
-
// Emotions, Skill dialog
if(key_shifts & KB_ALT_FLAG && action_time == true) {
if(player_node->emotion==0) {
@@ -283,6 +267,20 @@ void do_input() {
action_time = false;
}
}
+
+ if(mouse_b&2) {
+ if(!show_npc_dialog) {
+ int npc_x = mouse_x/32+camera_x;
+ int npc_y = mouse_y/32+camera_y;
+ int id = find_npc(npc_x, npc_y);
+ if(id!=0) {
+ WFIFOW(0) = net_w_value(0x0090);
+ WFIFOL(2) = net_l_value(id);
+ WFIFOB(6) = 0;
+ WFIFOSET(7);
+ }
+ }
+ }
if(key[KEY_ESC])state = EXIT;