Skip to content

Commit

Permalink
server: fixed interacting of pushable entities and dynamic actors
Browse files Browse the repository at this point in the history
  • Loading branch information
SNMetamorph committed Nov 13, 2023
1 parent dadf6be commit 532d5e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions server/cbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ class CBaseEntity
{
if( m_iOldSolid == SOLID_NOT && pev->solid != SOLID_NOT )
{
WorldPhysic->EnableCollision( this, FALSE );
m_iOldSolid = pev->solid;
pev->solid = SOLID_NOT;
}
Expand All @@ -642,7 +641,6 @@ class CBaseEntity
{
if( m_iOldSolid != SOLID_NOT && pev->solid == SOLID_NOT )
{
WorldPhysic->EnableCollision( this, TRUE );
pev->solid = m_iOldSolid;
m_iOldSolid = SOLID_NOT;
}
Expand Down
4 changes: 3 additions & 1 deletion server/physic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,9 @@ bool CPhysicsPushedEntities::SpeculativelyCheckPush( PhysicsPushedInfo_t &info,
}

// we're not blocked if the blocker is point-sized or non-solid
if( pBlocker->IsPointSized() || pBlocker->pev->solid == SOLID_NOT )
// dynamic actors also doesn't block way since all pushables are kinematic actors
// and they just can push away other dynamic actors despite of obstacles
if( pBlocker->IsPointSized() || pBlocker->pev->solid == SOLID_NOT || bIsDynamic )
{
return true;
}
Expand Down

0 comments on commit 532d5e5

Please sign in to comment.