Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3271,18 +3271,10 @@ int C_BaseAnimating::DrawModel( int flags )
auto pTargetPlayer = C_NEO_Player::GetVisionTargetNEOPlayer();
const bool inMotionVision = pTargetPlayer->IsInVision() && pTargetPlayer->GetClass() == NEO_CLASS_ASSAULT;
auto rootMoveParent = GetRootMoveParent();
Vector vel;
if (IsRagdoll())
Vector vel = rootMoveParent->GetAbsVelocity();
if (vel == vec3_origin)
{
vel = m_pRagdoll->m_vecLastVelocity;
}
else
{
vel = rootMoveParent->GetAbsVelocity();
if (vel == vec3_origin)
{
rootMoveParent->EstimateAbsVelocity(vel);
}
rootMoveParent->EstimateAbsVelocity(vel);
}
bool isMoving = false;
bool isHot = false;
Expand Down
17 changes: 9 additions & 8 deletions src/game/client/hl2mp/c_hl2mp_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,11 @@ void C_HL2MPRagdoll::CreateHL2MPRagdoll( void )
// then we can make ourselves start out exactly where the player is.
C_HL2MP_Player *pPlayer = dynamic_cast< C_HL2MP_Player* >( m_hPlayer.Get() );

#ifdef NEO
if ( pPlayer )
#else
if ( pPlayer && !pPlayer->IsDormant() )
#endif // NEO
{
// move my current model instance to the ragdoll's so decals are preserved.
pPlayer->SnatchModelInstance( this );
Expand All @@ -1330,8 +1334,10 @@ void C_HL2MPRagdoll::CreateHL2MPRagdoll( void )

// Copy all the interpolated vars from the player entity.
// The entity uses the interpolated history to get bone velocity.
#ifndef NEO
bool bRemotePlayer = (pPlayer != C_BasePlayer::GetLocalPlayer());
if ( bRemotePlayer )
#endif // NEO
{
Interp_Copy( pPlayer );

Expand All @@ -1342,6 +1348,7 @@ void C_HL2MPRagdoll::CreateHL2MPRagdoll( void )
SetSequence( pPlayer->GetSequence() );
m_flPlaybackRate = pPlayer->GetPlaybackRate();
}
#ifndef NEO
else
{
// This is the local player, so set them in a default
Expand All @@ -1363,7 +1370,8 @@ void C_HL2MPRagdoll::CreateHL2MPRagdoll( void )
SetCycle( 0.0 );

Interp_Reset( varMap );
}
}
#endif // NEO
}
else
{
Expand Down Expand Up @@ -1406,13 +1414,6 @@ void C_HL2MPRagdoll::CreateHL2MPRagdoll( void )
}

InitAsClientRagdoll( boneDelta0, boneDelta1, currentBones, boneDt );
#ifdef NEO
if (m_pRagdoll)
{
m_pRagdoll->SetInitialVelocity(GetInitialRagdollVelocity());
m_pRagdoll->SetLastOrigin(GetInitialRagdollOrigin());
}
#endif // NEO
}


Expand Down
1 change: 1 addition & 0 deletions src/game/client/hl2mp/c_hl2mp_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ class C_HL2MPRagdoll : public C_BaseAnimatingOverlay
EHANDLE m_hPlayer;
CNetworkVector( m_vecRagdollVelocity );
CNetworkVector( m_vecRagdollOrigin );
public:
};

#endif //HL2MP_PLAYER_H
6 changes: 1 addition & 5 deletions src/game/client/neo/c_neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1962,11 +1962,7 @@ void C_NEO_Player::PreDataUpdate(DataUpdateType_t updateType)
{
if (updateType == DATA_UPDATE_DATATABLE_CHANGED)
{
if (gpGlobals->tickcount - m_nVisionLastTick < TIME_TO_TICKS(0.1f))
{
return;
}
else
if (gpGlobals->tickcount - m_nVisionLastTick >= TIME_TO_TICKS(0.1f))
{
m_bIsAllowedToToggleVision = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/neo/ui/neo_hud_friendly_marker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "neo_gamerules.h"
#include "c_neo_player.h"

#include "c_playerresource.h"
#include "c_team.h"

// memdbgon must be the last include file in a .cpp file!!!
Expand Down Expand Up @@ -179,7 +179,7 @@ void CNEOHud_FriendlyMarker::DrawPlayerForTeam(C_Team *team, const C_NEO_Player
for (int i = 0; i < memberCount; ++i)
{
auto player = static_cast<C_NEO_Player *>(team->GetPlayer(i));
if (player && localPlayer->entindex() != player->entindex() && player->IsAlive())
if (player && localPlayer->entindex() != player->entindex() && g_PR->IsAlive(player->entindex()))
{
if (pTargetPlayer && player->entindex() == pTargetPlayer->entindex())
{
Expand Down
9 changes: 1 addition & 8 deletions src/game/client/proxyplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,7 @@ void CEntitySpeedProxy::OnBind( void *pC_BaseEntity )
C_BaseAnimating *baseAnimating = pEntity->GetBaseAnimating();
C_BaseEntity *rootMoveParent = pEntity->GetRootMoveParent();
Vector velocity = vec3_origin;
if (baseAnimating && baseAnimating->IsRagdoll())
{
velocity = baseAnimating->m_pRagdoll->m_vecLastVelocity;
}
else
{
rootMoveParent->EstimateAbsVelocity(velocity);
}
rootMoveParent->EstimateAbsVelocity(velocity);
m_pResult->SetFloatValue(velocity.Length());
#else
m_pResult->SetFloatValue( pEntity->GetLocalVelocity().Length() );
Expand Down
9 changes: 0 additions & 9 deletions src/game/client/ragdoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,6 @@ bool CRagdoll::TransformVectorToWorld(int iBoneIndex, const Vector *vPosition, V
//-----------------------------------------------------------------------------
void CRagdoll::PhysForceRagdollToSleep()
{
#ifdef NEO
m_vecLastVelocity = vec3_origin;
#endif // NEO
for ( int i = 0; i < m_ragdoll.listCount; i++ )
{
if ( m_ragdoll.list[i].pObject )
Expand All @@ -276,12 +273,6 @@ static ConVar ragdoll_sleepaftertime( "ragdoll_sleepaftertime", "5.0f", 0, "Afte
void CRagdoll::CheckSettleStationaryRagdoll()
{
Vector delta = GetRagdollOrigin() - m_vecLastOrigin;
#ifdef NEO
if (gpGlobals->frametime > 0)
{
m_vecLastVelocity = delta / (gpGlobals->frametime);
}
#endif // NEO
m_vecLastOrigin = GetRagdollOrigin();
for ( int i = 0; i < 3; ++i )
{
Expand Down
11 changes: 0 additions & 11 deletions src/game/client/ragdoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ class CRagdoll : public IRagdoll
void ResetRagdollSleepAfterTime( void );
float GetLastVPhysicsUpdateTime() const { return m_lastUpdate; }

#ifdef NEO
void SetInitialVelocity(const Vector& velocity) { m_vecInitialVelocity = velocity; }
void SetLastOrigin(const Vector& velocity) { m_vecLastOrigin = velocity; }

#endif // NEO
private:

void CheckSettleStationaryRagdoll();
Expand All @@ -106,12 +101,6 @@ class CRagdoll : public IRagdoll
bool m_allAsleep;
Vector m_vecLastOrigin;
float m_flLastOriginChangeTime;
#ifdef NEO
public:
Vector m_vecLastVelocity;
private:
Vector m_vecInitialVelocity;
#endif // NEO

#if RAGDOLL_VISUALIZE
matrix3x4_t m_savedBone1[MAXSTUDIOBONES];
Expand Down
4 changes: 2 additions & 2 deletions src/game/server/hl2mp/hl2mp_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,7 @@ void CHL2MP_Player::Event_Killed( const CTakeDamageInfo &info )

BaseClass::Event_Killed( subinfo );

#ifndef NEO
if ( info.GetDamageType() & DMG_DISSOLVE )
{
if ( m_hRagdoll )
Expand All @@ -1409,10 +1410,9 @@ void CHL2MP_Player::Event_Killed( const CTakeDamageInfo &info )
iScoreToAdd = -1;
}

#ifndef NEO
GetGlobalTeam( pAttacker->GetTeamNumber() )->AddScore( iScoreToAdd );
#endif
}
#endif

FlashlightTurnOff();

Expand Down
Loading