Fixed: scripted controls didn't work if the avatar was sitting down
This fixes a bug introduced in 6473674bbf
			
			
				0.7.4.1
			
			
		
							parent
							
								
									4ad45934c6
								
							
						
					
					
						commit
						fe8e835bfc
					
				|  | @ -1336,6 +1336,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
|             PhysicsActor actor = PhysicsActor; | ||||
|             if (actor == null) | ||||
|             { | ||||
|                 SafeSendControlsToScripts(flagsForScripts); | ||||
|                 return; | ||||
|             } | ||||
| 
 | ||||
|  | @ -1512,20 +1513,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
|                 if (update_movementflag && ParentID == 0) | ||||
|                     Animator.UpdateMovementAnimations(); | ||||
| 
 | ||||
|                 lock (scriptedcontrols) | ||||
|                 { | ||||
|                     if (scriptedcontrols.Count > 0) | ||||
|                     { | ||||
|                         // Notify the scripts only after calling UpdateMovementAnimations(), so that if a script | ||||
|                         // (e.g., a walking script) checks which animation is active it will be the correct animation. | ||||
|                         SendControlToScripts(flagsForScripts); | ||||
|                     } | ||||
|                 } | ||||
|                 SafeSendControlsToScripts(flagsForScripts); | ||||
|             } | ||||
| 
 | ||||
|             m_scene.EventManager.TriggerOnClientMovement(this); | ||||
|         } | ||||
| 
 | ||||
|         private void SafeSendControlsToScripts(uint flagsForScripts) | ||||
|         { | ||||
|             lock (scriptedcontrols) | ||||
|             { | ||||
|                 if (scriptedcontrols.Count > 0) | ||||
|                 { | ||||
|                     // Notify the scripts only after calling UpdateMovementAnimations(), so that if a script | ||||
|                     // (e.g., a walking script) checks which animation is active it will be the correct animation. | ||||
|                     SendControlToScripts(flagsForScripts); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Calculate an update to move the presence to the set target. | ||||
|         /// </summary> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Oren Hurvitz
						Oren Hurvitz