Skip to content

Commit 4dd04f6

Browse files
committed
1 parent 86694c7 commit 4dd04f6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/game/shared/tf/tf_weapon_flamethrower.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,11 @@ void CTFFlameThrower::PrimaryAttack()
724724
// Make sure the weapon can't fire in this condition by tracing a line between the eye point and the end of the muzzle.
725725
trace_t trace;
726726
Vector vecEye = pOwner->EyePosition();
727+
#ifdef BDSBASE
728+
Vector vecMuzzlePos = GetFlameOriginPos();
729+
#else
727730
Vector vecMuzzlePos = GetVisualMuzzlePos();
731+
#endif
728732
CTraceFilterIgnoreObjects traceFilter( this, COLLISION_GROUP_NONE );
729733
UTIL_TraceLine( vecEye, vecMuzzlePos, MASK_SOLID, &traceFilter, &trace );
730734
if ( trace.fraction < 1.0 && ( !trace.m_pEnt || trace.m_pEnt->m_takedamage == DAMAGE_NO ) )
@@ -2121,6 +2125,15 @@ Vector CTFFlameThrower::GetMuzzlePosHelper( bool bVisualPos )
21212125
UTIL_StringToVector( vecOffset.Base(), tf_flamethrower_new_flame_offset.GetString() );
21222126

21232127
vecOffset *= pOwner->GetModelScale();
2128+
2129+
#ifdef BDSBASE
2130+
// Inverts the horizontal offset for flipped view models.
2131+
if (IsViewModelFlipped())
2132+
{
2133+
vecOffset.y *= -1;
2134+
}
2135+
#endif
2136+
21242137
vecMuzzlePos = pOwner->EyePosition() + vecOffset.x * vecForward + vecOffset.y * vecRight + vecOffset.z * vecUp;
21252138
}
21262139
}

0 commit comments

Comments
 (0)