Merge branch 'dev-next' into dev-syntax-code

This commit is contained in:
Ima Mechanique 2012-12-28 02:51:15 +00:00
commit e9b5a4f825
8 changed files with 94 additions and 48 deletions

View file

@ -480,7 +480,7 @@ namespace LSLEditor
{
DialogResult dialogResult = MessageBox.Show(this, @"Save """ + this.ScriptName + @"""?", "File has changed", MessageBoxButtons.YesNoCancel);
if (dialogResult == DialogResult.Yes)
e.Cancel = this.parent.SaveFile(this,false);
e.Cancel = !this.parent.SaveFile(this,false);
else
e.Cancel = (dialogResult == DialogResult.Cancel);
}

View file

@ -438,6 +438,9 @@ namespace LSLEditor
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.ShortcutKeyDisplayString = "";
this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.exitToolStripMenuItem.ShowShortcutKeys = false;
this.exitToolStripMenuItem.Size = new System.Drawing.Size(187, 22);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
@ -872,7 +875,7 @@ namespace LSLEditor
this.aboutToolStripMenuItem.Text = "About...";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
// openFileDialog1
// openScriptFilesDialog
//
this.openScriptFilesDialog.FileName = "openFileDialog1";
//
@ -905,7 +908,7 @@ namespace LSLEditor
this.closeTabToolStripMenuItem.Text = "Close";
this.closeTabToolStripMenuItem.Click += new System.EventHandler(this.closeTabToolStripMenuItem_Click);
//
// openFileDialog2
// openSolutionFilesDialog
//
this.openSolutionFilesDialog.FileName = "openFileDialog2";
//

View file

@ -618,6 +618,9 @@ namespace LSLEditor
browser.ShowWebBrowser("Import Examples", Properties.Settings.Default.Examples);
}
/***
* Return value indicate whether file was saved or not.
*/
public bool SaveFile(EditForm editForm, bool blnSaveAs)
{
DialogResult dialogresult = DialogResult.OK;

View file

@ -118,34 +118,34 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>293, 17</value>
<value>865, 17</value>
</metadata>
<metadata name="openFileDialog0.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="openNoteFilesDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>699, 17</value>
</metadata>
<metadata name="saveNoteFilesDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>371, 17</value>
</metadata>
<metadata name="openScriptFilesDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="saveFileDialog0.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>157, 17</value>
</metadata>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>563, 17</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>703, 17</value>
<metadata name="saveScriptFilesDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>533, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
<value>324, 56</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>408, 17</value>
<value>17, 56</value>
</metadata>
<metadata name="pageSetupDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>839, 17</value>
<value>172, 56</value>
</metadata>
<metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>133, 56</value>
<metadata name="openSolutionFilesDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>187, 17</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>273, 56</value>
<value>440, 56</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>53</value>

View file

@ -70,7 +70,7 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.47.1.9")]
[assembly: AssemblyVersion("2.48.0.1")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
@ -100,4 +100,4 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyName("")]
[assembly: ComVisibleAttribute(false)]
[assembly: AssemblyFileVersionAttribute("2.47.1.9")]
[assembly: AssemblyFileVersionAttribute("2.48.0.1")]

View file

@ -312,15 +312,15 @@
Clears (deletes) the media and all parameters from the given prim face.
Returns an integer that is a STATUS_* flag which details the success/failure of the operation.
<Argument name="Link">Link number</Argument>
<Argument name="Face">Face number</Argument>
</Word>
<Word name="llClearPrimMedia">
integer llClearPrimMedia(integer Link, integer Face );
integer llClearPrimMedia(integer Face );
Clears (deletes) the media and all params from the given Face.
Returns an integer that is a STATUS_* flag which details the success/failure of the operation.
<Argument name="Link">Link number</Argument>
<Argument name="Face">Face number</Argument>
</Word>
@ -4831,9 +4831,14 @@
If id is group owned, a NULL_KEY is returned.
</Word>
<Word name="OBJECT_PATHFINDING_TYPE" type="integer" value="20">Returns the pathfinding setting of any object in the region. It returns an integer matching one of the OPT_* constants.</Word>
<Word name="OBJECT_PHANTOM" type="integer" value="22">Returns boolean, detailing if phantom is enabled or disabled on the object.
If id is an avatar or attachment, 0 is returned.</Word>
<Word name="OBJECT_PHYSICS" type="integer" value="21">Returns boolean, detailing if physics is enabled or disabled on the object.
If id is an avatar or attachment, 0 is returned.</Word>
<Word name="OBJECT_POS" value="">Gets the object's position in region coordinates.</Word>
<Word name="OBJECT_ROOT" type="integer" value="18">Gets the id of the root prim of the object requested.</Word>
<Word name="OBJECT_ROT" value="">Gets the object's rotation.</Word>
<Word name="OBJECT_TEMP_ON_REZ" type="integer" value="23">Returns boolean, detailing if temporary is enabled or disabled on the object.</Word>
<Word name="OBJECT_VELOCITY" value="">Gets the object's velocity.</Word>
<Word name="OBJECT_STREAMING_COST" value="15"></Word>

View file

@ -7,10 +7,33 @@
</head>
<body style="background-color: white; font-family: Verdana, sans-serif;font-size: 13px;line-height: 1.3">
<div>
<div>
<h3><span class="date">2013-01-01</span> - Release 2.48.0</h3>
<div>
* Constants Added (thanks to Lucia Nightfire):
<ul>
<li>OBJECT_PHANTOM</li>
<li>OBJECT_PHYSICS</li>
<li>OBJECT_TEMP_ON_REZ</li>
</ul>
</div>
</div>
<div>
<h3><span class="date">2012-12-25</span> - Release 2.47.2</h3>
<div>
* Fixed:
<ul>
<li>Accidentally added the Link parameter to llClearPrimMedia when correcting llClearLinkMedia.</li>
<li>llWanderWithin - Corrected second argument to be vector instead of float.</li>
<li>Bug 28 - Alt-F4 or File-Exit does not close unsaved documents.</li>
<li>Bug 29 - llAngleBetween returns wrong values. Still not 100% accurate. Uses the improved code from the LSL Portal.</li>
</ul>
</div>
</div>
<div>
<h3><span class="date">2012-11-26</span> - Release 2.47.1</h3>
<div>
* Funtions Added:
* Functions Added:
<ul>
<li>llAttachToAvatarTemp</li>
<li>llGetSimStats</li>

View file

@ -447,6 +447,9 @@ namespace LSLEditor
public static readonly integer OBJECT_PATHFINDING_TYPE = 20;
public static readonly integer OBJECT_GROUP = 7;
public static readonly integer OBJECT_CREATOR = 8;
public static readonly integer OBJECT_PHYSICS = 21;
public static readonly integer OBJECT_PHANTOM = 22;
public static readonly integer OBJECT_TEMP_ON_REZ = 23;
public static readonly integer OBJECT_STREAMING_COST = 15;
public static readonly integer OBJECT_PHYSICS_COST = 16;
@ -1203,11 +1206,20 @@ namespace LSLEditor
public Float llAngleBetween(rotation a, rotation b)
{
double Angle = 2 * Math.Acos((a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s)
/ Math.Sqrt((a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s) *
(b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s)));
Verbose("AngleBetween(" + a + "," + b + ")=" + Angle);
return Angle;
rotation r = b / a; // calculate the rotation between the two arguments as quaternion
double s2 = r.s * r.s; // square of the s-element
double v2 = r.x * r.x + r.y * r.y + r.z * r.z; // sum of the squares of the v-elements
if (s2 < v2) // compare the s-component to the v-component
{
return 2.0 * Math.Acos(Math.Sqrt(s2 / (s2 + v2))); // use arccos if the v-component is dominant
}
else if (v2 != 0) // make sure the v-component is non-zero
{
return 2.0 * Math.Asin(Math.Sqrt(v2 / (s2 + v2))); // use arcsin if the s-component is dominant
}
return 0.0; // one or both arguments are scaled too small to be meaningful, or the values are the same, so return zero
// implementation taken from LSL Portal. http://wiki.secondlife.com/w/index.php?title=LlAngleBetween
}
public void llApplyImpulse(vector force, integer local)