OSDN Git Service

[Fix] #40852 非騎乗時の過積載による速度減算がリファクタリング中に抜けたので修正. / Fixed the speed subtraction due...
authordeskull <deskull@users.sourceforge.jp>
Thu, 5 Nov 2020 13:42:35 +0000 (22:42 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 5 Nov 2020 13:42:35 +0000 (22:42 +0900)
src/player/player-status.c

index 057ba4d..6b9d588 100644 (file)
@@ -2518,8 +2518,6 @@ static s16b calc_speed(player_type *creature_ptr)
     int count;
 
     if (!creature_ptr->riding) {
-        count = (int)weight_limit(creature_ptr);
-
         const player_race *tmp_rp_ptr;
         if (creature_ptr->mimic_form)
             tmp_rp_ptr = &mimic_info[creature_ptr->mimic_form];
@@ -2637,6 +2635,10 @@ static s16b calc_speed(player_type *creature_ptr)
             }
         }
 
+        count = (int)weight_limit(creature_ptr);
+        if (j > count)
+            pow -= ((j - count) / (count / 5));
+
     } else {
         monster_type *riding_m_ptr = &creature_ptr->current_floor_ptr->m_list[creature_ptr->riding];
         monster_race *riding_r_ptr = &r_info[riding_m_ptr->r_idx];