BulletSim: an 'if' to suppress multiple setting of avatar orientation.
Looks like the viewer bombards the server with avatar orientation information (we're talking several hundred a second) when the avatar is being turned or when walking. This change just reduces the number of 'set' calls into unmanaged code.0.7.5-pf-bulletsim
parent
db6c0363f0
commit
0538096fa3
|
@ -558,14 +558,18 @@ public sealed class BSCharacter : BSPhysObject
|
||||||
public override OMV.Quaternion Orientation {
|
public override OMV.Quaternion Orientation {
|
||||||
get { return _orientation; }
|
get { return _orientation; }
|
||||||
set {
|
set {
|
||||||
|
// Orientation is set zillions of times when an avatar is walking. It's like
|
||||||
|
// the viewer doesn't trust us.
|
||||||
|
if (_orientation != value)
|
||||||
|
{
|
||||||
_orientation = value;
|
_orientation = value;
|
||||||
// m_log.DebugFormat("{0}: set orientation to {1}", LogHeader, _orientation);
|
|
||||||
PhysicsScene.TaintedObject("BSCharacter.setOrientation", delegate()
|
PhysicsScene.TaintedObject("BSCharacter.setOrientation", delegate()
|
||||||
{
|
{
|
||||||
ForceOrientation = _orientation;
|
ForceOrientation = _orientation;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Go directly to Bullet to get/set the value.
|
// Go directly to Bullet to get/set the value.
|
||||||
public override OMV.Quaternion ForceOrientation
|
public override OMV.Quaternion ForceOrientation
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue