summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Locke <kisuka@kisuka.com>2014-08-12 21:43:49 -0700
committerTaylor Locke <kisuka@kisuka.com>2014-08-12 21:43:49 -0700
commit2b8d5013ea8ba9904d157c773f12495bbca8ca80 (patch)
tree3923ed2b0b14e15aff4b8535eb740ccdf2dc5349 /src
parentcc69b228908d2f74f97cf9b5763f6b3141fdf0d0 (diff)
downloadhercules-2b8d5013ea8ba9904d157c773f12495bbca8ca80.tar.gz
hercules-2b8d5013ea8ba9904d157c773f12495bbca8ca80.tar.bz2
hercules-2b8d5013ea8ba9904d157c773f12495bbca8ca80.tar.xz
hercules-2b8d5013ea8ba9904d157c773f12495bbca8ca80.zip
Battle config option for knockback style when on same tile.
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/map.c7
3 files changed, 6 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index d960b7316..fc159c921 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6714,6 +6714,7 @@ static const struct battle_data {
{ "invincible.nodamage", &battle_config.invincible_nodamage, 0, 0, 1, },
{ "mob_slave_keep_target", &battle_config.mob_slave_keep_target, 0, 0, 1, },
{ "autospell_check_range", &battle_config.autospell_check_range, 0, 0, 1, },
+ { "knockback_left", &battle_config.knockback_left, 1, 0, 1, },
{ "client_reshuffle_dice", &battle_config.client_reshuffle_dice, 0, 0, 1, },
{ "client_sort_storage", &battle_config.client_sort_storage, 0, 0, 1, },
{ "feature.buying_store", &battle_config.feature_buying_store, 1, 0, 1, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 71633372e..dfa156796 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -416,6 +416,7 @@ struct Battle_Config {
int invincible_nodamage;
int mob_slave_keep_target;
int autospell_check_range; //Enable range check for autospell bonus. [L0ne_W0lf]
+ int knockback_left;
int client_reshuffle_dice; // Reshuffle /dice
int client_sort_storage;
int feature_buying_store;
diff --git a/src/map/map.c b/src/map/map.c
index b26d50fc9..0c8c2d949 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -2413,9 +2413,10 @@ uint8 map_calc_dir(struct block_list* src, int16 x, int16 y)
dx = x-src->x;
dy = y-src->y;
if( dx == 0 && dy == 0 )
- { // both are standing on the same spot
- dir = 6; // aegis-style, makes knockback default to the left
- //dir = unit->getdir(src); // athena-style, makes knockback default to behind 'src'
+ { // both are standing on the same spot.
+ // aegis-style, makes knockback default to the left.
+ // athena-style, makes knockback default to behind 'src'.
+ dir = (battle_config.knockback_left ? 6 : unit->getdir(src));
}
else if( dx >= 0 && dy >=0 )
{ // upper-right