[9381] Fixed some compile warnings.

This commit is contained in:
AlexDereka 2010-02-14 18:04:20 +03:00
parent 2bdcb1161c
commit ccfd42bf3e
55 changed files with 219 additions and 203 deletions

View file

@ -39,8 +39,8 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
//bool is_water_ok = creature.canSwim(); // not used?
bool is_air_ok = creature.canFly();
const float angle = rand_norm()*(M_PI*2);
const float range = rand_norm()*wander_distance;
const float angle = rand_norm_f()*(M_PI_F*2.0f);
const float range = rand_norm_f()*wander_distance;
const float distanceX = range * cos(angle);
const float distanceY = range * sin(angle);
@ -55,7 +55,8 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
if (is_air_ok) // 3D system above ground and above water (flying mode)
{
const float distanceZ = rand_norm() * sqrtf(dist)/2;// Limit height change
// Limit height change
const float distanceZ = rand_norm_f() * sqrtf(dist)/2.0f;
nz = Z + distanceZ;
float tz = map->GetHeight(nx, ny, nz-2.0f, false); // Map check only, vmap needed here but need to alter vmaps checks for height.
float wz = map->GetWaterLevel(nx, ny);