no need to store the physics env in each KX_GameObject
This commit is contained in:
@@ -103,7 +103,6 @@ KX_GameObject::KX_GameObject(
|
||||
m_bOccluder(false),
|
||||
m_pPhysicsController1(NULL),
|
||||
m_pGraphicController(NULL),
|
||||
m_pPhysicsEnvironment(NULL),
|
||||
m_xray(false),
|
||||
m_pHitObject(NULL),
|
||||
m_isDeformable(false),
|
||||
@@ -2604,8 +2603,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo,
|
||||
toDir.normalize();
|
||||
toPoint = fromPoint + (dist) * toDir;
|
||||
}
|
||||
|
||||
PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
|
||||
PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
|
||||
KX_IPhysicsController *spc = GetPhysicsController();
|
||||
KX_GameObject *parent = GetParent();
|
||||
if (!spc && parent)
|
||||
@@ -2732,7 +2730,7 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast,
|
||||
return none_tuple_3();
|
||||
}
|
||||
|
||||
PHY_IPhysicsEnvironment* pe = GetPhysicsEnvironment();
|
||||
PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment();
|
||||
KX_IPhysicsController *spc = GetPhysicsController();
|
||||
KX_GameObject *parent = GetParent();
|
||||
if (!spc && parent)
|
||||
|
Reference in New Issue
Block a user