aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-02-07 19:52:18 +0000
committerUbitUmarov2018-02-07 19:52:18 +0000
commit01ceb4d17e80b794432062ff3bf3b85f884c9548 (patch)
treeb74cb4ddb1dea21276991ae379e084708aa3fce2 /OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs
parentadd a warning about XMR only suoprting one region per instance at this point,... (diff)
downloadopensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.zip
opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.gz
opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.bz2
opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.xz
try to fix xmr on multiregions per instance. Ugly spargetti ...; remove fixes for 2 llparcel functions that should not be needed; remove xmr own API, it has no business having one.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs50
1 files changed, 18 insertions, 32 deletions
diff --git a/OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs b/OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs
index 82759ee..1ea05b6 100644
--- a/OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs
+++ b/OpenSim/Region/ScriptEngine/XMREngine/XMRInstAbstract.cs
@@ -491,11 +491,9 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
491 { 491 {
492 if (this.newStateCode < 0) 492 if (this.newStateCode < 0)
493 { 493 {
494 // Process event given by 'stateCode' and 'eventCode'.
495 // The event handler should call CheckRun() as often as convenient.
494 496
495 /*
496 * Process event given by 'stateCode' and 'eventCode'.
497 * The event handler should call CheckRun() as often as convenient.
498 */
499 int newState = this.stateCode; 497 int newState = this.stateCode;
500 seh = this.m_ObjCode.scriptEventHandlerTable[newState,(int)this.eventCode]; 498 seh = this.m_ObjCode.scriptEventHandlerTable[newState,(int)this.eventCode];
501 if (seh != null) 499 if (seh != null)
@@ -512,25 +510,19 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
512 this.ehArgs = null; // we are done with them and no args for 510 this.ehArgs = null; // we are done with them and no args for
513 // exit_state()/enter_state() anyway 511 // exit_state()/enter_state() anyway
514 512
515 /* 513 // The usual case is no state change.
516 * The usual case is no state change. 514 // Even a 'state <samestate>;' statement has no effect except to exit out.
517 * Even a 'state <samestate>;' statement has no effect except to exit out. 515 // It does not execute the state_exit() or state_entry() handlers.
518 * It does not execute the state_exit() or state_entry() handlers. 516 // See http://wiki.secondlife.com/wiki/State
519 * See http://wiki.secondlife.com/wiki/State
520 */
521 if (newState == this.stateCode) 517 if (newState == this.stateCode)
522 break; 518 break;
523 519
524 /* 520 // Save new state in a more permanent location in case we
525 * Save new state in a more permanent location in case we 521 // get serialized out while in the state_exit() handler.
526 * get serialized out while in the state_exit() handler.
527 */
528 this.newStateCode = newState; 522 this.newStateCode = newState;
529 } 523 }
530 524
531 /* 525 // Call old state's state_exit() handler.
532 * Call old state's state_exit() handler.
533 */
534 this.eventCode = ScriptEventCode.state_exit; 526 this.eventCode = ScriptEventCode.state_exit;
535 seh = this.m_ObjCode.scriptEventHandlerTable[this.stateCode,(int)ScriptEventCode.state_exit]; 527 seh = this.m_ObjCode.scriptEventHandlerTable[this.stateCode,(int)ScriptEventCode.state_exit];
536 if (seh != null) 528 if (seh != null)
@@ -545,27 +537,19 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
545 } 537 }
546 } 538 }
547 539
548 /* 540 // Switch over to the new state's state_entry() handler.
549 * Switch over to the new state's state_entry() handler.
550 */
551 this.stateCode = this.newStateCode; 541 this.stateCode = this.newStateCode;
552 this.eventCode = ScriptEventCode.state_entry; 542 this.eventCode = ScriptEventCode.state_entry;
553 this.newStateCode = -1; 543 this.newStateCode = -1;
554 544
555 /* 545 // Now that the old state can't possibly start any more activity,
556 * Now that the old state can't possibly start any more activity, 546 // cancel any listening handlers, etc, of the old state.
557 * cancel any listening handlers, etc, of the old state.
558 */
559 this.StateChange (); 547 this.StateChange ();
560 548
561 /* 549 // Loop back to execute new state's state_entry() handler.
562 * Loop back to execute new state's state_entry() handler.
563 */
564 } 550 }
565 551
566 /* 552 // Event no longer being processed.
567 * Event no longer being processed.
568 */
569 this.eventCode = ScriptEventCode.None; 553 this.eventCode = ScriptEventCode.None;
570 } 554 }
571 555
@@ -642,6 +626,7 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
642 * @brief Convert all LSL_Integers in a list to System.Int32s, 626 * @brief Convert all LSL_Integers in a list to System.Int32s,
643 * as required by llParcelMediaQuery(). 627 * as required by llParcelMediaQuery().
644 */ 628 */
629/*
645 public static LSL_List FixLLParcelMediaQuery (LSL_List oldlist) 630 public static LSL_List FixLLParcelMediaQuery (LSL_List oldlist)
646 { 631 {
647 object[] oldarray = oldlist.Data; 632 object[] oldarray = oldlist.Data;
@@ -655,11 +640,12 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
655 } 640 }
656 return new LSL_List (newarray); 641 return new LSL_List (newarray);
657 } 642 }
658 643*/
659 /** 644 /**
660 * @brief Convert *SOME* LSL_Integers in a list to System.Int32s, 645 * @brief Convert *SOME* LSL_Integers in a list to System.Int32s,
661 * as required by llParcelMediaCommandList(). 646 * as required by llParcelMediaCommandList().
662 */ 647 */
648/*
663 public static LSL_List FixLLParcelMediaCommandList (LSL_List oldlist) 649 public static LSL_List FixLLParcelMediaCommandList (LSL_List oldlist)
664 { 650 {
665 object[] oldarray = oldlist.Data; 651 object[] oldarray = oldlist.Data;
@@ -696,7 +682,7 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
696 } 682 }
697 return new LSL_List (newarray); 683 return new LSL_List (newarray);
698 } 684 }
699 685*/
700 public static int xmrHashCode (int i) 686 public static int xmrHashCode (int i)
701 { 687 {
702 return i.GetHashCode (); 688 return i.GetHashCode ();