diff --git a/Code/Game/GameServer/Implementation/GameSession_General.cpp b/Code/Game/GameServer/Implementation/GameSession_General.cpp index fb4c9246..a67f5924 100644 --- a/Code/Game/GameServer/Implementation/GameSession_General.cpp +++ b/Code/Game/GameServer/Implementation/GameSession_General.cpp @@ -36,8 +36,8 @@ GameSession::GameSession() this->isCreated = false; this->isRunning = false; this->gameSession = this; - this->logicFrameTime = DELTA_TIME_20; - this->networkFrameTime = DELTA_TIME_20; + this->logicFrameTime = DELTA_TIME_120; + this->networkFrameTime = DELTA_TIME_120; this->networkTimer.reset(); this->logicTimer.reset(); diff --git a/Code/Physics/GamePhysics/Implementation/PhysicsAPI_Impl.cpp b/Code/Physics/GamePhysics/Implementation/PhysicsAPI_Impl.cpp index 91886313..b86f3821 100644 --- a/Code/Physics/GamePhysics/Implementation/PhysicsAPI_Impl.cpp +++ b/Code/Physics/GamePhysics/Implementation/PhysicsAPI_Impl.cpp @@ -291,7 +291,7 @@ void API_Impl::UpdateWorld() simpleBody->SetPreviousVelocity(simpleBody->GetLinearVelocity()); } - this->dynamicsWorld->stepSimulation(this->timeStep, 1, this->timeStep); + this->dynamicsWorld->stepSimulation(this->timeStep, 10, this->timeStep); ICustomBody::State state; @@ -314,8 +314,33 @@ void API_Impl::UpdateWorld() ICustomBody* bodyA = (ICustomBody*)obA->getUserPointer(); ICustomBody* bodyB = (ICustomBody*)obB->getUserPointer(); - bodyA->CallSubscription_AfterCollisionResponse(bodyA, bodyB, 0.0f); - bodyB->CallSubscription_AfterCollisionResponse(bodyB, bodyA, 0.0f); + + + int numContacts = contactManifold->getNumContacts(); + for (int j=0;jgetContactPoint(j); + if (pt.getDistance()<0.f) + { + if(bodyA->GetState().mass == 40 && bodyB->GetState().centerPos == Float3::null) + { + const char* breakPoint = "STOP"; + } + if(bodyB->GetState().mass == 40 && bodyA->GetState().centerPos == Float3::null) + { + const char* breakPoint = "STOP"; + } + + const btVector3& ptA = pt.getPositionWorldOnA(); + const btVector3& ptB = pt.getPositionWorldOnB(); + const btVector3& normalOnB = pt.m_normalWorldOnB; + + bodyA->CallSubscription_AfterCollisionResponse(bodyA, bodyB, 0.0f); + bodyB->CallSubscription_AfterCollisionResponse(bodyB, bodyA, 0.0f); + } + } + + } }