From 5dcdba0b81e1ba11d43bff4622d13202540a16f9 Mon Sep 17 00:00:00 2001 From: Baklojan <77415005+Baklojan@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:28:03 +0300 Subject: [PATCH] Fixes from main Repo https://github.com/ValveSoftware/source-sdk-2013/pull/502 https://github.com/ValveSoftware/source-sdk-2013/pull/552 https://github.com/ValveSoftware/source-sdk-2013/pull/416 --- mp/src/game/server/ai_behavior_assault.cpp | 2 +- mp/src/game/shared/ragdoll_shared.cpp | 21 +++++++++++++++------ mp/src/public/collisionutils.cpp | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/mp/src/game/server/ai_behavior_assault.cpp b/mp/src/game/server/ai_behavior_assault.cpp index e02627cc60..d57ec618f2 100644 --- a/mp/src/game/server/ai_behavior_assault.cpp +++ b/mp/src/game/server/ai_behavior_assault.cpp @@ -1257,7 +1257,7 @@ int CAI_AssaultBehavior::TranslateSchedule( int scheduleType ) break; case SCHED_HOLD_RALLY_POINT: - if( HasCondition(COND_NO_PRIMARY_AMMO) | HasCondition(COND_LOW_PRIMARY_AMMO) ) + if( HasCondition(COND_NO_PRIMARY_AMMO) || HasCondition(COND_LOW_PRIMARY_AMMO) ) { return SCHED_RELOAD; } diff --git a/mp/src/game/shared/ragdoll_shared.cpp b/mp/src/game/shared/ragdoll_shared.cpp index 6188b1cc51..724fb4d700 100644 --- a/mp/src/game/shared/ragdoll_shared.cpp +++ b/mp/src/game/shared/ragdoll_shared.cpp @@ -1,4 +1,4 @@ -//========= Copyright Valve Corporation, All rights reserved. ============// + //========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: // @@ -881,15 +881,16 @@ void CRagdollLRURetirement::Update( float frametime ) // EPISODIC VERSION for ( i = m_LRU.Head(); i < m_LRU.InvalidIndex(); i = next ) { - CBaseAnimating *pRagdoll = m_LRU[i].Get(); - next = m_LRU.Next(i); - IPhysicsObject *pObject = pRagdoll->VPhysicsGetObject(); - if ( pRagdoll && (pRagdoll->GetEffectEntity() || ( pObject && !pObject->IsAsleep()) ) ) - continue; + + CBaseAnimating* pRagdoll = m_LRU[i].Get(); if ( pRagdoll ) { + IPhysicsObject* pObject = pRagdoll->VPhysicsGetObject(); + if (pRagdoll->GetEffectEntity() || (pObject && !pObject->IsAsleep())) + continue; + // float distToPlayer = (pPlayer->GetAbsOrigin() - pRagdoll->GetAbsOrigin()).LengthSqr(); float distToPlayer = (PlayerOrigin - pRagdoll->GetAbsOrigin()).LengthSqr(); @@ -924,6 +925,14 @@ void CRagdollLRURetirement::Update( float frametime ) // EPISODIC VERSION CBaseAnimating *pRagdoll = m_LRU[i].Get(); + if (pRagdoll) + { + //Just ignore it until we're done burning/dissolving. + IPhysicsObject* pObject = pRagdoll->VPhysicsGetObject(); + if (pRagdoll->GetEffectEntity() || (pObject && !pObject->IsAsleep())) + continue; + } + //Just ignore it until we're done burning/dissolving. IPhysicsObject *pObject = pRagdoll->VPhysicsGetObject(); if ( pRagdoll && (pRagdoll->GetEffectEntity() || ( pObject && !pObject->IsAsleep()) ) ) diff --git a/mp/src/public/collisionutils.cpp b/mp/src/public/collisionutils.cpp index 2549a569fb..6456e5b9bb 100644 --- a/mp/src/public/collisionutils.cpp +++ b/mp/src/public/collisionutils.cpp @@ -1666,7 +1666,7 @@ bool IntersectRayWithOBB( const Ray_t &ray, const matrix3x4_t &matOBBToWorld, } temp.type = 3; - MatrixITransformPlane( matOBBToWorld, temp, pTrace->plane ); + MatrixTransformPlane( matOBBToWorld, temp, pTrace->plane ); return true; }