1
0
forked from 0ad/0ad

Avoid hypotf

This was SVN commit r10421.
This commit is contained in:
Ykkrosh 2011-10-23 12:27:34 +00:00
parent 83955072b6
commit f4ed019c46

View File

@ -196,7 +196,7 @@ void CCmpProjectileManager::LaunchProjectile(entity_id_t source, CFixedVector3D
projectile.targetEnt = targetEnt;
CVector3D offset = projectile.target - projectile.pos;
float horizDistance = hypot(offset.X, offset.Z); // TODO: Fix missing hypotf for VC2008
float horizDistance = sqrtf(offset.X*offset.X + offset.Z*offset.Z);
projectile.speedFactor = 1.f;
projectile.timeLeft = horizDistance / speed.ToFloat();