ソースを参照

Added config 'path_blown_halt' for official pushback behavior. (bugreport:8322)
Hitting a wall will now always cause units to halt, rather than to continue sliding against the wall.
http://rathena.org/board/tracker/issue-8322-backslide-skill-issue/

Signed-off-by: Euphy <euphy.raliel@rathena.org>

Euphy 11 年 前
コミット
61f3caa106
4 ファイル変更24 行追加12 行削除
  1. 6 1
      conf/battle/skill.conf
  2. 1 0
      src/map/battle.c
  3. 1 0
      src/map/battle.h
  4. 16 11
      src/map/path.c

+ 6 - 1
conf/battle/skill.conf

@@ -271,7 +271,7 @@ eq_single_target_reflectable: yes
 invincible.nodamage: no
 
 // Dancing Weapon Switch
-// On official server, a fix is in place that prevents the switching of weapons to cancel songs.
+// On official servers, a fix is in place that prevents the switching of weapons to cancel songs.
 // Default: yes
 dancing_weaponswitch_fix: yes
 
@@ -286,3 +286,8 @@ skill_trap_type: 0
 // 2-20: Area around caster (2 = 5x5, 3 = 7x7, 4 = 9x9, ..., 20 = 41x41)
 // Note: If you knock the target out of the area it will only be hit once and won't do splash damage
 bowling_bash_area: 0
+
+// Pushback behavior (Note 1)
+// On official servers, hitting a wall will always cause the unit to stop moving.
+// If "no", the unit will continue moving when approaching walls diagonally (old Athena behavior).
+path_blown_halt: yes

+ 1 - 0
src/map/battle.c

@@ -7348,6 +7348,7 @@ static const struct _battle_data {
 	{ "disp_serverbank_msg",				&battle_config.disp_serverbank_msg,				0,		0,		1,				},
 	{ "warg_can_falcon",                    &battle_config.warg_can_falcon,                 0,      0,      1,              },
 	{ "atcommand_enable_npc",				&battle_config.atcommand_enable_npc,			0,		0,		100,			},
+	{ "path_blown_halt",                    &battle_config.path_blown_halt,                 1,      0,      1,              },
 };
 #ifndef STATS_OPT_OUT
 /**

+ 1 - 0
src/map/battle.h

@@ -530,6 +530,7 @@ extern struct Battle_Config
 	int disp_serverbank_msg;
 	int warg_can_falcon;
 	int atcommand_enable_npc;
+	int path_blown_halt;
 } battle_config;
 
 void do_init_battle(void);

+ 16 - 11
src/map/path.c

@@ -170,20 +170,25 @@ int path_blownpos(int16 m,int16 x0,int16 y0,int16 dx,int16 dy,int count)
 	while( count > 0 && (dx != 0 || dy != 0) )
 	{
 		if( !map_getcellp(md,x0+dx,y0+dy,CELL_CHKPASS) )
-		{// attempt partial movement
-			int fx = ( dx != 0 && map_getcellp(md,x0+dx,y0,CELL_CHKPASS) );
-			int fy = ( dy != 0 && map_getcellp(md,x0,y0+dy,CELL_CHKPASS) );
-			if( fx && fy )
-			{
-				if(rnd()&1)
+		{
+			if (battle_config.path_blown_halt)
+				break;
+			else
+			{// attempt partial movement
+				int fx = ( dx != 0 && map_getcellp(md,x0+dx,y0,CELL_CHKPASS) );
+				int fy = ( dy != 0 && map_getcellp(md,x0,y0+dy,CELL_CHKPASS) );
+				if( fx && fy )
+				{
+					if(rnd()&1)
+						dx=0;
+					else
+						dy=0;
+				}
+				if( !fx )
 					dx=0;
-				else
+				if( !fy )
 					dy=0;
 			}
-			if( !fx )
-				dx=0;
-			if( !fy )
-				dy=0;
 		}
 
 		x0 += dx;