some cosmetics, like npcs down eat terrain

This commit is contained in:
UbitUmarov
2022-03-30 01:15:31 +01:00
parent 3f30f17187
commit 667a18161b
5 changed files with 62 additions and 60 deletions

View File

@@ -152,41 +152,19 @@ namespace OpenSim.Region.CoreModules.World.Terrain
protected string parseFloat(String s, out float f)
{
string result;
float d;
if (float.TryParse(s, out d))
{
try
{
f = (float)d;
result = String.Empty;
}
catch(InvalidCastException)
{
result = String.Format("{0} is invalid", s);
f = -1.0f;
}
}
else
{
f = -1.0f;
result = String.Format("{0} is invalid", s);
}
return result;
if (float.TryParse(s, out f))
return string.Empty;
f = -1.0f;
return string.Format("{0} is invalid", s);
}
protected string parseInt(String s, out int i)
{
string result;
if (Int32.TryParse(s, out i))
{
result = String.Empty;
}
else
{
result = String.Format("{0} is invalid", s);
}
return result;
return string.Empty;
return string.Format("{0} is invalid", s);
}
protected void applyModification(ITerrainChannel map, TerrainModifierData data)

View File

@@ -1091,6 +1091,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{
m_scene.ForEachScenePresence(presence =>
{
if(presence.IsNPC)
return;
if (!m_perClientPatchUpdates.TryGetValue(presence.UUID, out PatchUpdates thisClientUpdates))
{
// There is a ScenePresence without a send patch map. Create one. should not happen