Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
SNMetamorph committed Nov 1, 2023
1 parent e1fb99b commit 026c22d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions server/physic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ bool CPhysicsPushedEntities::SpeculativelyCheckPush( PhysicsPushedInfo_t &info,
if( bIsUnblockable )
{
pBlocker->SetAbsOrigin( pushDestPosition );
//if (bIsDynamic) {
// WorldPhysic->SetOrigin( pBlocker, pushDestPosition );
//}
}
else
{
Expand All @@ -614,7 +617,10 @@ bool CPhysicsPushedEntities::SpeculativelyCheckPush( PhysicsPushedInfo_t &info,
if( !info.m_trace.fAllSolid )
{
pBlocker->SetAbsOrigin( info.m_trace.vecEndPos );
}
//if (bIsDynamic) {
// WorldPhysic->SetOrigin( pBlocker, pushDestPosition );
}
//}
else if( pBlocker->m_iActorType == ACTOR_DYNAMIC && !info.m_bPusherIsGround && !bRotationalPush )
{
return false;
Expand Down Expand Up @@ -2516,7 +2522,9 @@ void SV_Physics_Pusher( CBaseEntity *pEntity )

// if the pusher has a "blocked" function, call it
// otherwise, just stay in place until the obstacle is gone
if( pBlocker ) DispatchBlocked( pEntity->edict(), pBlocker->edict() );
if (pBlocker) {
DispatchBlocked(pEntity->edict(), pBlocker->edict());
}

// NOTE: all the entities with MOVETYPE_PUSH now has two seperated thinks:
// normal regular thinking and local think (movedone)
Expand Down
4 changes: 2 additions & 2 deletions server/physx/physx_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ void CPhysicPhysX :: Update( float flTimeDelta )
}
}

HandleEvents();

m_flAccumulator += flTimeDelta;
while (m_flAccumulator > k_SimulationStepSize)
{
m_flAccumulator -= k_SimulationStepSize;
m_pScene->simulate(k_SimulationStepSize);
m_pScene->fetchResults(true);
}

HandleEvents();
}

void CPhysicPhysX :: EndFrame( void )
Expand Down

0 comments on commit 026c22d

Please sign in to comment.