From cb3b3855b844c14c0e943c1a7614fc29820cf666 Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 28 Jun 2021 13:31:35 +0200 Subject: rename clamp macro to Clamp to fix compilation with g++11 --- src/weapons/Weapon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/weapons') diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index b4d04a4b..5704c111 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -203,7 +203,7 @@ CWeapon::Fire(CEntity *shooter, CVector *fireSource) else if ( shooter->IsPed() && ((CPed*)shooter)->m_pSeekTarget != nil ) { float distToTarget = (shooter->GetPosition() - ((CPed*)shooter)->m_pSeekTarget->GetPosition()).Magnitude(); - float power = clamp((distToTarget-10.0f)*0.02f, 0.2f, 1.0f); + float power = Clamp((distToTarget-10.0f)*0.02f, 0.2f, 1.0f); fired = FireProjectile(shooter, source, power); } -- cgit v1.2.3