In osSetSpeed(), if no avatar for a uuid is found then don't attempt to set speed.

xassetservice
Justin Clark-Casey (justincc) 2012-02-24 04:08:59 +00:00
parent 0b9f4d7e74
commit fe229f10e6
1 changed files with 3 additions and 1 deletions

View File

@ -2740,6 +2740,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
if (avatar != null)
avatar.SpeedModifier = (float)SpeedModifier; avatar.SpeedModifier = (float)SpeedModifier;
} }