silly bug on llSetText exec

This commit is contained in:
UbitUmarov
2020-10-11 04:00:35 +01:00
parent c2879f9f83
commit c6b27cc02a
2 changed files with 8 additions and 11 deletions

View File

@@ -4106,15 +4106,15 @@ namespace OpenSim.Region.Framework.Scenes
{
Color oldcolor = Color;
Color = Color.FromArgb((int) (alpha*0xff),
(int) (color.X*0xff),
(int) (color.Y*0xff),
(int) (color.Z*0xff));
Color = Color.FromArgb((int) (alpha * 0xff),
(int) (color.X * 0xff),
(int) (color.Y * 0xff),
(int) (color.Z * 0xff));
osUTF8 old = osUTF8Text;
if(string.IsNullOrEmpty(text))
{
osUTF8Text = new osUTF8(text, 254);
if (ParentGroup != null && (oldcolor != Color || !osUTF8Text.Equals(old)))
osUTF8Text = null;
if (ParentGroup != null && (oldcolor != Color || old != null))
{
ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate();
@@ -4122,8 +4122,8 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
osUTF8Text = null;
if (ParentGroup != null && (oldcolor != Color || old != null))
osUTF8Text = new osUTF8(text, 254);
if (ParentGroup != null && (oldcolor != Color || !osUTF8Text.Equals(old)))
{
ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate();

View File

@@ -4933,9 +4933,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.AddScriptLPS(1);
Vector3 av3 = Util.Clip(color, 0.0f, 1.0f);
byte[] data;
data = Util.StringToBytesNoTerm(text,256);
text = Util.UTF8.GetString(data);
m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
}