mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 10:46:00 +08:00
Modify order of code so SOP doesn't set the physics actor flying
property multiple times every time Update is called. This eliminates zillions of settings which is better for BulletSim. The should be no functionality change.
This commit is contained in:
@@ -1385,17 +1385,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
bool DCFlagKeyPressed = false;
|
||||
Vector3 agent_control_v3 = Vector3.Zero;
|
||||
|
||||
bool oldflying = Flying;
|
||||
bool newFlying = actor.Flying;
|
||||
|
||||
if (ForceFly)
|
||||
actor.Flying = true;
|
||||
newFlying = true;
|
||||
else if (FlyDisabled)
|
||||
actor.Flying = false;
|
||||
newFlying = false;
|
||||
else
|
||||
actor.Flying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
||||
|
||||
if (actor.Flying != oldflying)
|
||||
update_movementflag = true;
|
||||
newFlying = ((flags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
||||
|
||||
if (actor.Flying != newFlying)
|
||||
{
|
||||
// Note: ScenePresence.Flying is actually fetched from the physical actor
|
||||
// so setting PhysActor.Flying here also sets the ScenePresence's value.
|
||||
actor.Flying = newFlying;
|
||||
update_movementflag = true;
|
||||
}
|
||||
|
||||
if (ParentID == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user