mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
BulletSim: add physical object initialized flag so updates and collisions
don't happen until the object is completely initialized. This fixes the problem of doing a teleport while the simulator is running. The destruction of the physical object while the engine is running means that the physics parameter update would overwrite the new position of the newly created avatar.
This commit is contained in:
@@ -72,6 +72,8 @@ public abstract class BSPhysObject : PhysicsActor
|
||||
}
|
||||
protected BSPhysObject(BSScene parentScene, uint localID, string name, string typeName)
|
||||
{
|
||||
IsInitialized = false;
|
||||
|
||||
PhysScene = parentScene;
|
||||
LocalID = localID;
|
||||
PhysObjectName = name;
|
||||
@@ -130,6 +132,8 @@ public abstract class BSPhysObject : PhysicsActor
|
||||
public string PhysObjectName { get; protected set; }
|
||||
public string TypeName { get; protected set; }
|
||||
|
||||
// Set to 'true' when the object is completely initialized
|
||||
public bool IsInitialized { get; protected set; }
|
||||
|
||||
// Return the object mass without calculating it or having side effects
|
||||
public abstract float RawMass { get; }
|
||||
|
||||
Reference in New Issue
Block a user