Merge branch 'master' into careminster

This commit is contained in:
Melanie
2012-01-28 01:01:23 +00:00
13 changed files with 93 additions and 27 deletions

View File

@@ -2242,7 +2242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
m_host.AddScriptLPS(1);
return NpcCreate(firstname, lastname, position, notecard, true);
return NpcCreate(firstname, lastname, position, notecard, false, true);
}
public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options)
@@ -2250,10 +2250,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
m_host.AddScriptLPS(1);
return NpcCreate(firstname, lastname, position, notecard, (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0);
return NpcCreate(
firstname, lastname, position, notecard,
(options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0,
(options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) == 0);
}
private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned)
private LSL_Key NpcCreate(
string firstname, string lastname, LSL_Vector position, string notecard, bool owned, bool senseAsAgent)
{
if (!owned)
OSSLError("Unowned NPCs are unsupported");
@@ -2301,7 +2305,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
lastname,
new Vector3((float) position.x, (float) position.y, (float) position.z),
ownerID,
World,appearance);
senseAsAgent,
World,
appearance);
ScenePresence sp;
if (World.TryGetScenePresence(x, out sp))