Fix casting in llParcelMediaCommandList so that it actually, you know, works

avinationmerge
Tom Grimshaw 2010-05-31 08:38:41 -07:00
parent ddd072b3fb
commit 4be13b1a42
1 changed files with 16 additions and 16 deletions

View File

@ -8925,17 +8925,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
int width = 0;
int height = 0;
ParcelMediaCommandEnum? commandToSend = null;
uint commandToSend = 0;
float time = 0.0f; // default is from start
ScenePresence presence = null;
for (int i = 0; i < commandList.Data.Length; i++)
{
ParcelMediaCommandEnum command = (ParcelMediaCommandEnum)commandList.Data[i];
uint command = (uint)(commandList.GetLSLIntegerItem(i));
switch (command)
{
case ParcelMediaCommandEnum.Agent:
case (uint)ParcelMediaCommandEnum.Agent:
// we send only to one agent
if ((i + 1) < commandList.Length)
{
@ -8952,25 +8952,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
break;
case ParcelMediaCommandEnum.Loop:
case (uint)ParcelMediaCommandEnum.Loop:
loop = 1;
commandToSend = command;
update = true; //need to send the media update packet to set looping
break;
case ParcelMediaCommandEnum.Play:
case (uint)ParcelMediaCommandEnum.Play:
loop = 0;
commandToSend = command;
update = true; //need to send the media update packet to make sure it doesn't loop
break;
case ParcelMediaCommandEnum.Pause:
case ParcelMediaCommandEnum.Stop:
case ParcelMediaCommandEnum.Unload:
case (uint)ParcelMediaCommandEnum.Pause:
case (uint)ParcelMediaCommandEnum.Stop:
case (uint)ParcelMediaCommandEnum.Unload:
commandToSend = command;
break;
case ParcelMediaCommandEnum.Url:
case (uint)ParcelMediaCommandEnum.Url:
if ((i + 1) < commandList.Length)
{
if (commandList.Data[i + 1] is LSL_String)
@ -8983,7 +8983,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
break;
case ParcelMediaCommandEnum.Texture:
case (uint)ParcelMediaCommandEnum.Texture:
if ((i + 1) < commandList.Length)
{
if (commandList.Data[i + 1] is LSL_String)
@ -8996,7 +8996,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
break;
case ParcelMediaCommandEnum.Time:
case (uint)ParcelMediaCommandEnum.Time:
if ((i + 1) < commandList.Length)
{
if (commandList.Data[i + 1] is LSL_Float)
@ -9008,7 +9008,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
break;
case ParcelMediaCommandEnum.AutoAlign:
case (uint)ParcelMediaCommandEnum.AutoAlign:
if ((i + 1) < commandList.Length)
{
if (commandList.Data[i + 1] is LSL_Integer)
@ -9022,7 +9022,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
break;
case ParcelMediaCommandEnum.Type:
case (uint)ParcelMediaCommandEnum.Type:
if ((i + 1) < commandList.Length)
{
if (commandList.Data[i + 1] is LSL_String)
@ -9035,7 +9035,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
break;
case ParcelMediaCommandEnum.Desc:
case (uint)ParcelMediaCommandEnum.Desc:
if ((i + 1) < commandList.Length)
{
if (commandList.Data[i + 1] is LSL_String)
@ -9048,7 +9048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
break;
case ParcelMediaCommandEnum.Size:
case (uint)ParcelMediaCommandEnum.Size:
if ((i + 2) < commandList.Length)
{
if (commandList.Data[i + 1] is LSL_Integer)
@ -9116,7 +9116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
if (commandToSend != null)
if (commandToSend != 0)
{
// the commandList contained a start/stop/... command, too
if (presence == null)