c# sugar...

This commit is contained in:
UbitUmarov
2022-10-08 02:25:07 +01:00
parent 8ca82b2282
commit 5c3d86937f
2 changed files with 11 additions and 28 deletions

View File

@@ -164,10 +164,10 @@ namespace OpenSim.Groups
void OnCompleteMovementToRegion(IClientAPI client, bool arg2)
{
object sp = null;
if (client.Scene.TryGetScenePresence(client.AgentId, out sp))
ScenePresence sp = client.SceneAgent as ScenePresence;
if (sp is not null)
{
if (sp is ScenePresence && ((ScenePresence)sp).PresenceType != PresenceType.Npc)
if (sp.PresenceType != PresenceType.Npc)
{
AgentCircuitData aCircuit = ((ScenePresence)sp).Scene.AuthenticateHandler.GetAgentCircuitData(client.AgentId);
if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0 &&