From 4aa83cec36aaad30f7ff17bb570d41d3be75330e Mon Sep 17 00:00:00 2001 From: Chaosvolt Date: Sat, 20 Jan 2024 02:31:05 -0600 Subject: [PATCH] fix: mountable terrain usable for firing heavy weapons agian (#4130) --- src/ranged.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ranged.cpp b/src/ranged.cpp index af1ea219a0b4..a4503e7ff643 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -776,8 +776,10 @@ namespace auto is_mountable( const map &m, const tripoint &pos ) -> bool { // usage of any attached bipod is dependent upon terrain - // sandbag barricades are impassable but climbable - if( m.climb_difficulty( pos ) <= 5 && m.has_flag_ter_or_furn( "MOUNTABLE", pos ) ) { + // only allow mounting passable OR climable terrain + // example: sandbag barricades are impassable but climbable + if( ( m.climb_difficulty( pos ) <= 5 || m.passable( pos ) ) && + m.has_flag_ter_or_furn( "MOUNTABLE", pos ) ) { return true; }