From 090164ff7a8edab3cad12728b67c35d9f50ddaab Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 28 Jan 2012 03:12:56 +0100 Subject: Completely disable NPC being sensed as agents, the abuse potential is too great --- OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 7 ++++++- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 754cf72..786b955 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs @@ -173,6 +173,11 @@ namespace OpenSim.Data.MySQL int v = Convert.ToInt32(reader[name]); m_Fields[name].SetValue(row, v); } + else if (m_Fields[name].FieldType == typeof(uint)) + { + uint v = Convert.ToUInt32(reader[name]); + m_Fields[name].SetValue(row, v); + } else { m_Fields[name].SetValue(row, reader[name]); @@ -294,4 +299,4 @@ namespace OpenSim.Data.MySQL } } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 1cb052d..29d658f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2242,7 +2242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); m_host.AddScriptLPS(1); - return NpcCreate(firstname, lastname, position, notecard, false, true); + return NpcCreate(firstname, lastname, position, notecard, false, false); } public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) @@ -2252,8 +2252,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return NpcCreate( firstname, lastname, position, notecard, - (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0, - (options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) == 0); + (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0); +// (options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) == 0); } private LSL_Key NpcCreate( @@ -2945,4 +2945,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); } } -} \ No newline at end of file +} -- cgit v1.1