mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[9381] Fixed some compile warnings.
This commit is contained in:
parent
2bdcb1161c
commit
ccfd42bf3e
55 changed files with 219 additions and 203 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue