mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
avoid using new c# sintaxe that will fail on older compilers
This commit is contained in:
@@ -651,13 +651,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
if (dm == null)
|
||||
return;
|
||||
|
||||
if (!UUID.TryParse(agentID, out UUID avatarID))
|
||||
UUID avatarID;
|
||||
if (!UUID.TryParse(agentID, out avatarID))
|
||||
return;
|
||||
|
||||
if (!World.TryGetScenePresence(avatarID, out ScenePresence sp))
|
||||
ScenePresence sp = null;
|
||||
if (!World.TryGetScenePresence(avatarID, out sp))
|
||||
return;
|
||||
|
||||
if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC)
|
||||
if (sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC)
|
||||
return;
|
||||
|
||||
dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false);
|
||||
|
||||
Reference in New Issue
Block a user