From ba8d82efafa55279022f6788aff183eb1e51c4db Mon Sep 17 00:00:00 2001 From: Manuel K Date: Sun, 22 May 2016 01:16:38 +0200 Subject: [PATCH] fix compilation errors with gcc 6.1.1 on Arch Linux --- Sources/Entities/Bullet.es | 4 ++-- Sources/Entities/Player.es | 2 +- Sources/EntitiesMP/Common/Common.cpp | 2 +- Sources/EntitiesMP/Player.es | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/Entities/Bullet.es b/Sources/Entities/Bullet.es index a9347ed..2c7c990 100644 --- a/Sources/Entities/Bullet.es +++ b/Sources/Entities/Bullet.es @@ -344,7 +344,7 @@ functions: GetNormalComponent( vDistance/fDistance, vHitNormal, ese.vDirection); FLOAT fLength = ese.vDirection.Length(); fLength = Clamp( fLength*3, 1.0f, 3.0f); - fDistance = Clamp( log10(fDistance), 0.5, 2.0); + fDistance = Clamp( log10(fDistance), 0.5f, 2.0f); ese.vStretch = FLOAT3D( fDistance, fLength*fDistance, 1.0f); SpawnEffect(vHitPoint, ese); } @@ -417,4 +417,4 @@ procedures: m_iBullet = 0; return; }; -}; \ No newline at end of file +}; diff --git a/Sources/Entities/Player.es b/Sources/Entities/Player.es index d02be99..09c808a 100644 --- a/Sources/Entities/Player.es +++ b/Sources/Entities/Player.es @@ -4587,7 +4587,7 @@ void TeleportPlayer(enum WorldLinkType EwltType) TIME tmLevelTime = _pTimer->CurrentTick()-m_tmLevelStarted; m_psLevelStats.ps_tmTime = tmLevelTime; m_psGameStats.ps_tmTime += tmLevelTime; - FLOAT fTimeDelta = ClampDn(floor(m_tmEstTime)-floor(tmLevelTime), 0.0); + FLOAT fTimeDelta = ClampDn(floor(m_tmEstTime)-floor(tmLevelTime), 0.0f); m_iTimeScore = floor(fTimeDelta*100.0f); m_psLevelStats.ps_iScore+=m_iTimeScore; m_psGameStats.ps_iScore+=m_iTimeScore; diff --git a/Sources/EntitiesMP/Common/Common.cpp b/Sources/EntitiesMP/Common/Common.cpp index af04321..75dd98e 100755 --- a/Sources/EntitiesMP/Common/Common.cpp +++ b/Sources/EntitiesMP/Common/Common.cpp @@ -386,7 +386,7 @@ void SpawnHitTypeEffect(CEntity *pen, enum BulletHitType bhtType, BOOL bSound, F GetNormalComponent( vDistance/fDistance, vHitNormal, ese.vDirection); FLOAT fLength = ese.vDirection.Length(); fLength = Clamp( fLength*3, 1.0f, 3.0f); - fDistance = Clamp( log10(fDistance), 0.5, 2.0); + fDistance = Clamp( log10(fDistance), 0.5f, 2.0f); ese.vStretch = FLOAT3D( fDistance, fLength*fDistance, 1.0f); try { diff --git a/Sources/EntitiesMP/Player.es b/Sources/EntitiesMP/Player.es index a249fe5..b0bc183 100755 --- a/Sources/EntitiesMP/Player.es +++ b/Sources/EntitiesMP/Player.es @@ -5380,7 +5380,7 @@ functions: TIME tmLevelTime = _pTimer->CurrentTick()-m_tmLevelStarted; m_psLevelStats.ps_tmTime = tmLevelTime; m_psGameStats.ps_tmTime += tmLevelTime; - FLOAT fTimeDelta = ClampDn(floor(m_tmEstTime)-floor(tmLevelTime), 0.0); + FLOAT fTimeDelta = ClampDn(floor(m_tmEstTime)-floor(tmLevelTime), 0.0f); m_iTimeScore = (INDEX) floor(fTimeDelta*100.0f); m_psLevelStats.ps_iScore+=m_iTimeScore; m_psGameStats.ps_iScore+=m_iTimeScore;