From 8e842d6d2fa3c8c90ff49bf1c9c1542fa5698667 Mon Sep 17 00:00:00 2001 From: Michieru Date: Sun, 19 Oct 2014 20:10:51 +0200 Subject: 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) --- src/map/unit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/map') 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 -- cgit v1.2.3-70-g09d2