summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 18:12:06 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-17 18:12:06 +0000
commit14eabce08792bbf83b2f8001d3b341a6fe9dfb67 (patch)
treede7a2efa437dfef53aedbec80d158d1c14b29a74 /src/map/pc.c
parent613ddf2665f265e5ad07dcdfff4b6a4c04e4596b (diff)
downloadhercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.tar.gz
hercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.tar.bz2
hercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.tar.xz
hercules-14eabce08792bbf83b2f8001d3b341a6fe9dfb67.zip
- Added state.running to unit_data to make it easier to check for running characters (saves having to get the sc data and check for the corresponding timer all the time)
- removed pc_run, pc_walktodir, replaced with unit_run. - moved the code that makes you walk that extra cell to unit_stop_walking, which is now invoked before resetting the walk-target. - Flag &2 in unit_stop_walking is now to make the character force-move that extra tile if the walkpath pos is 0 at hit time. - Added variable walk_count to unit_data to be use as a counter for cells walked for walk-triggered skills (walk path_pos is not good enough since it keeps resetting each time the walk path is updated) - Increased WALK_SKILL_INTERVAL to 5 (it is the closest value that makes the average mob trigger a chase skill every second) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6137 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 2dcb11a63..c8195eec5 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -52,9 +52,6 @@ struct skill_tree_entry skill_tree[MAX_PC_CLASS][MAX_SKILL_TREE];
int day_timer_tid;
int night_timer_tid;
-static int dirx[8]={0,-1,-1,-1,0,1,1,1};
-static int diry[8]={1,1,0,-1,-1,-1,0,1};
-
struct fame_list smith_fame_list[MAX_FAME_LIST];
struct fame_list chemist_fame_list[MAX_FAME_LIST];
struct fame_list taekwon_fame_list[MAX_FAME_LIST];
@@ -3177,73 +3174,6 @@ int pc_memo(struct map_session_data *sd, int i) {
return 1;
}
-/*==========================================
- * pc駆け足要求
- *------------------------------------------
- */
-int pc_run(struct map_session_data *sd, int skilllv, int dir)
-{
- int i,to_x,to_y,dir_x,dir_y;
-
- nullpo_retr(0, sd);
-
- if (!unit_can_move(&sd->bl)) {
- if(sd->sc.data[SC_RUN].timer!=-1)
- status_change_end(&sd->bl,SC_RUN,-1);
- return 0;
- }
-
- to_x = sd->bl.x;
- to_y = sd->bl.y;
- dir_x = dirx[dir];
- dir_y = diry[dir];
-
- for(i=0;i<AREA_SIZE;i++)
- {
- if(!map_getcell(sd->bl.m,to_x+dir_x,to_y+dir_y,CELL_CHKPASS))
- break;
-
- to_x += dir_x;
- to_y += dir_y;
- }
-
- //進めない場合 駆け足終了 障害物で止まった場合スパート状態解除
- if(to_x == sd->bl.x && to_y == sd->bl.y){
- if(sd->sc.data[SC_RUN].timer!=-1)
- status_change_end(&sd->bl,SC_RUN,-1);
- return 0;
- }
- unit_walktoxy(&sd->bl, to_x, to_y, 1);
- return 1;
-}
-/*==========================================
- * PCの向居ているほうにstep分歩く
- *------------------------------------------
- */
-int pc_walktodir(struct map_session_data *sd,int step)
-{
- int i,to_x,to_y,dir_x,dir_y;
-
- nullpo_retr(0, sd);
-
- to_x = sd->bl.x;
- to_y = sd->bl.y;
- dir_x = dirx[(int)sd->ud.dir];
- dir_y = diry[(int)sd->ud.dir];
-
- for(i=0;i<step;i++)
- {
- if(map_getcell(sd->bl.m,to_x+dir_x,to_y+dir_y,CELL_CHKNOPASS))
- break;
-
- to_x += dir_x;
- to_y += dir_y;
- }
- unit_walktoxy(&sd->bl, to_x, to_y, 1);
-
- return 1;
-}
-
//
// 武器??
//