MantisBT - opensim |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0007940 | opensim | [REGION] Script Functions | public | 2016-06-24 21:58 | 2016-06-28 09:02 |
|
Reporter | Mandarinka Tasty | |
Assigned To | | |
Priority | normal | Severity | tweak | Reproducibility | always |
Status | patch included | Resolution | open | |
Platform | | Operating System | | Operating System Version | |
Product Version | master (dev code) | |
Target Version | | Fixed in Version | | |
Git Revision or version number | |
Run Mode | Standalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim) |
Physics Engine | BasicPhysics |
Script Engine | |
Environment | Mono / Linux32, Mono / Linux64, Mono / Windows, Mono / OSX, .NET / Windows32, .NET / Windows64 |
Mono Version | Other |
Viewer | |
|
Summary | 0007940: Inappropriate definition of flag OS_NPC_NOT_OWNED |
Description | I have noticed, that flag OS_NPC_NOT_OWNED has been inappropriately defined
in the code and it is different than defintion of this flag,
that exists in OpenSimulator Wiki.
I remind that, accordingly to Wiki, default setting is: NPC is owned by its
owner = creator of the object, that generates NPC.
In actual code, NPC is owned by everyone = not owned by owner only.
And then there appears question, for what to use this flag:
OS_NPC_NOT_OWNED, if someone has set it always true ?
I also remind that , because we have condition in the code:
if(config.GetBoolean("AllowNotOwned", true))
m_NPCOptionFlags |= NPCOptionsFlags.AllowNotOwned;
that tells us, that default AllowNotOwned = true,
but that means only,that we give ( enable ) resident possibility
to use flag OS_NPC_NOT_OWNED in the script,
and that does not mean, that each sricpt, that creates NPC sets this possibility
automatically.
i hope i am understood correctly.
Patch has been offered. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | 0001-Fix-for-definition-of-OS_NPC_NOT_OWNED.-Without-it-t.patch (3,555) 2016-06-24 21:58 http://opensimulator.org/mantis/file_download.php?file_id=4557&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2016-06-24 21:58 | Mandarinka Tasty | New Issue | |
2016-06-24 21:58 | Mandarinka Tasty | File Added: 0001-Fix-for-definition-of-OS_NPC_NOT_OWNED.-Without-it-t.patch | |
2016-06-24 21:59 | Mandarinka Tasty | Status | new => patch included |
2016-06-25 05:58 | UbitUmarov | Note Added: 0030758 | |
2016-06-25 06:17 | UbitUmarov | Note Added: 0030759 | |
2016-06-25 10:20 | Mandarinka Tasty | Note Added: 0030764 | |
2016-06-25 11:11 | UbitUmarov | Note Added: 0030768 | |
2016-06-26 00:25 | Mandarinka Tasty | Note Deleted: 0030764 | |
2016-06-26 01:08 | Mandarinka Tasty | Note Added: 0030780 | |
2016-06-26 01:22 | Mandarinka Tasty | Note Edited: 0030780 | bug_revision_view_page.php?bugnote_id=30780#r5617 |
2016-06-26 01:31 | Mandarinka Tasty | Note Added: 0030783 | |
2016-06-26 02:44 | UbitUmarov | Note Added: 0030785 | |
2016-06-26 05:05 | Mandarinka Tasty | Note Added: 0030786 | |
2016-06-28 09:02 | Mandarinka Tasty | Note Added: 0030818 | |
2016-06-28 09:14 | Mandarinka Tasty | Note Edited: 0030818 | bug_revision_view_page.php?bugnote_id=30818#r5626 |
Notes |
|
|
seems problem is wiki.
in jan 13 2012 default was in fact changed to Owned NPCs
but a few days later default was changed back to not owned, and its like that in last 0.8
Possible this was a mistake, but became the real standard
So 0.9 code has to change that default, if not owned is not allowed
Considering this, think current code is ok (?) |
|
|
|
seems that since 2012, the two forms of create npcs have different defaults.
so its a bug, but i can't change it now without breaking some scripts (again) |
|
|
|
what grid? this applies to all grids and standalones.
isn't current code reverting to 0.8 (not wiki) behavior when configuration option AllowNotOwned is set to true? |
|
|
|
Hello Ubit :)
The current code works, but actual problem is:
flag OS_NPC_NOT_OWNED seems to be useless now.
Let me show You, my solution:
AllowNotOwned = true, that is going to be still the same, means:
if(config.GetBoolean("AllowNotOwned", true))
m_NPCOptionFlags |= NPCOptionsFlags.AllowNotOwned;
But in the code, I set default notowned = false,
to allow user to decide about it in OSSL, via flag:
OS_NPC_NOT_OWNED in command osNpcCreate(...)
And it would work in same way as:
OS_NPC_SENSE_AS_AGENT or other.
What do you think about it ?
in this way my solution would satisfy each user: that one who wants to use
the default: notowned = false, and that one who wants to use
OS_NPC_NOT_OWNED ( notowned = true )
I do not insist on my solution, i only offer an idea.
So if you could test my attached patch and share your further opinions
and considerations that would make me happy )
Regards
|
|
|
|
And one additional information,that I consider as very important.
AllowNotOwned = true <-- that should just give possibility for the user
to set flag OS_NPC_NOT_OWNED in the script in-world.
that does not mean, that notowned = true for always.
do you agree ? |
|
|
|
AllowNotOwned = true is for compatibility with 0.8 version
maybe we can discuss this via irc or osgrid, posting here only the conclusion? |
|
|
|
To make resume and probably to make other users participate in this discussion,
I describe:
- actual state of things = current code in 0.8 and in 0.9
and
- my offered idea of how things should work:
Actual state = current code behaviour in 0.8 and in 0.9 :
1. AllowNotOwned - true
2. osNpcCreate("John","Smith",llGetPos()+<0,0,2>, cloneNotecard) creates
Npc not owned
and osNpcCreate("John","Smith",llGetPos()+<0,0,2>, cloneNotecard,OS_NPC_NOT_OWNED) also creates Npc not owned
My Solution = My patch:
1. AllowNotOwned = true
2. osNpcCreate("John","Smith",llGetPos()+<0,0,2>, cloneNotecard) creates Npc
owned only by its owner=creator
3. osNpcCreate("John","Smith",llGetPos()+<0,0,2>,cloneNotecard,OS_NPC_NOT_OWNED)
creates Npc not owned
And maybe people could decide what state is correct for them.
Regards |
|
|
|
Again i remind, that there is problem in actual code with command:
osNpcCreate("John","Smith",llGetPos()+<0,0,2>, cloneNotecard)
and this
osNpcCreate("John","Smith",llGetPos()+<0,0,2>, cloneNotecard,OS_NPC_NOT_OWNED)
In both cases, NPC is created as not owned.
So i repeat my question if you have give up to use NPC owned only by its
creator, please tell everyone this and stop mislead.
And if you are really interested in what other persons want to offer
please find some time and try my patch, that has been attached to this mantis.
I have created possibility,that:
osNpcCreate("John","Smith",llGetPos()+<0,0,2>, cloneNotecard) creates Npc owned
only by its owner = creator.
and
osNpcCreate("John","Smith",llGetPos()+<0,0,2>,cloneNotecard,OS_NPC_NOT_OWNED)
creates Npc not owned.
|
|