Core/Movement: require a minimum wander_distance value of 0.1 and check the path length of generated random movement
this serves as a means to reduce the console spam caused by failed spline validation Port From (https://github.com/TrinityCore/TrinityCore/commit/fb3e6737da7795be651d36ce7493c07c7ecbdfeb)
This commit is contained in:
@@ -3545,6 +3545,11 @@ namespace Game
|
||||
Log.outError(LogFilter.Sql, "Table `creature` have creature (GUID: {0} Entry: {1}) with `wander_distance`< 0, set to 0.", guid, data.Id);
|
||||
data.WanderDistance = 0.0f;
|
||||
}
|
||||
else if (data.WanderDistance > 0.0f && data.WanderDistance < 0.1f)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"Table `creature` has creature (GUID: {guid} Entry: {data.Id}) with `wander_distance` below the allowed minimum distance of 0.1, set to 0.");
|
||||
data.WanderDistance = 0.0f;
|
||||
}
|
||||
else if (data.movementType == (byte)MovementGeneratorType.Random)
|
||||
{
|
||||
if (MathFunctions.fuzzyEq(data.WanderDistance, 0.0f))
|
||||
|
||||
Reference in New Issue
Block a user