diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-10-19 20:10:51 +0200 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-10-19 20:10:51 +0200 |
commit | 8e842d6d2fa3c8c90ff49bf1c9c1542fa5698667 (patch) | |
tree | 30ed77b0f7a4a13bdf93f089b6f4a7b7f726ccd6 | |
parent | e552575e01f7d9f519d8708222e8191d56776ddd (diff) | |
download | hercules-8e842d6d2fa3c8c90ff49bf1c9c1542fa5698667.tar.gz hercules-8e842d6d2fa3c8c90ff49bf1c9c1542fa5698667.tar.bz2 hercules-8e842d6d2fa3c8c90ff49bf1c9c1542fa5698667.tar.xz hercules-8e842d6d2fa3c8c90ff49bf1c9c1542fa5698667.zip |
Small Icewall implementation improvement
- Now monsters will walk into an icewall from the south and west if they already started moving to that cell
* This will make it slightly easier to trap a monster in an icewall (this is official as can be seen in the videos I linked in the main commit)
* This only applies if the icewall_walk_block configuration setting was not set to 0 (disabled)
Special thanks to Playtester (rathena 753f4c5b314910)
-rw-r--r-- | src/map/unit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 2d8fd530d..769d0ccd0 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -247,7 +247,9 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) { dx = dirx[(int)dir]; dy = diry[(int)dir]; - if(map->getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS)) + //Monsters will walk into an icewall from the west and south if they already started walking + if(map->getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS) + && (battle_config.icewall_walk_block == 0 || !map->getcell(bl->m,x+dx,y+dy,CELL_CHKICEWALL) || dx < 0 || dy < 0)) return unit->walktoxy_sub(bl); //Monsters can only leave icewalls to the west and south |