From 2afa19f37c9977e00f4b0b745ea1bc72ef3e5d5a Mon Sep 17 00:00:00 2001 From: skotlex Date: Sat, 16 Sep 2006 23:50:00 +0000 Subject: - Moved some speed adjustments in status_calc_pc to where they belong. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8781 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/status.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/map/status.c') diff --git a/src/map/status.c b/src/map/status.c index 7045e1f8b..56fb7b1eb 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2059,14 +2059,6 @@ int status_calc_pc(struct map_session_data* sd,int first) if(sd->flee2_rate != 100) status->flee2 = status->flee2 * sd->flee2_rate/100; - if(sd->speed_rate < 0) - sd->speed_rate = 0; - if(sd->speed_rate != 100) - status->speed = status->speed*sd->speed_rate/100; - - if(status->speed < battle_config.max_walk_speed) - status->speed = battle_config.max_walk_speed; - // ----- HIT CALCULATION ----- // Absolute modifiers from passive skills @@ -2129,6 +2121,11 @@ int status_calc_pc(struct map_session_data* sd,int first) // ----- WALKING SPEED CALCULATION ----- + if(sd->speed_rate < 0) + sd->speed_rate = 0; + if(sd->speed_rate != 100) + status->speed = status->speed*sd->speed_rate/100; + // Relative modifiers from passive skills if((sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN && (skill=pc_checkskill(sd,TF_MISS))>0) status->speed -= status->speed * skill/100; @@ -2137,6 +2134,9 @@ int status_calc_pc(struct map_session_data* sd,int first) if(pc_iscarton(sd) && (skill=pc_checkskill(sd,MC_PUSHCART))>0) status->speed += status->speed * (100-10*skill)/100; + if(status->speed < battle_config.max_walk_speed) + status->speed = battle_config.max_walk_speed; + // ----- ASPD CALCULATION ----- // Unlike other stats, ASPD rate modifiers from skills/SCs/items/etc are first all added together, then the final modifier is applied -- cgit v1.2.3-70-g09d2