diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e7d00e18fa..68804a18c1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -13055,8 +13055,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api for (int i = 0; i < commandList.Data.Length; i++) { - int cmd = (LSL_Integer)commandList.Data[i]; // Yengine cast issue + int cmd; + if(commandList.Data[i] is LSL_Integer) + cmd = (LSL_Integer)commandList.Data[i]; + else + cmd = (int)commandList.Data[i]; + ParcelMediaCommandEnum command = (ParcelMediaCommandEnum)cmd; + switch (command) { case ParcelMediaCommandEnum.Agent: