Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamTadeusz committed Nov 4, 2024
1 parent 14c4282 commit dc06b28
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
13 changes: 13 additions & 0 deletions mp/src/game/client/c_baseanimating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3384,6 +3384,19 @@ int C_BaseAnimating::InternalDrawModel( int flags )

DoInternalDrawModel( pInfo, ( bMarkAsDrawn && ( pInfo->flags & STUDIO_RENDER ) ) ? &state : NULL, pBoneToWorld );

auto index = GetBaseEntity()->index;
if (index == 52)
{
Vector forward, right, up;
MatrixVectors(*pBoneToWorld, &forward, &right, &up);
QAngle angle;
//MatrixAngles(*pBoneToWorld, angle);
//AngleVectors(pInfo->angles, &forward);
VectorAngles(forward, angle);
engine->Con_NPrintf(0, "Weapon Pitch: %f Yaw: %f", angle.x, angle.y);
Vector origin = GetBaseEntity()->GetMoveParent()->GetAbsOrigin() + GetBaseEntity()->GetMoveParent()->GetViewOffset();
DebugDrawLine(origin, (origin + (forward * 10000.f)), 255, 255, 0, false, 0);
}
OnPostInternalDrawModel( pInfo );

return bMarkAsDrawn;
Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/client/neo/c_neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,10 @@ void C_NEO_Player::ClientThink(void)
{
BaseClass::ClientThink();

Vector forward;
AngleVectors(EyeAngles(), &forward);
DebugDrawLine(EyePosition(), (EyePosition() + forward * 100), 255, 0, 0, false, 0.1);

if (IsCloaked())
{ // PreThink and PostThink are only ran for local player, update every in pvs player's cloak strength here
auto pLocalPlayer = C_NEO_Player::GetLocalNEOPlayer();
Expand Down
4 changes: 2 additions & 2 deletions mp/src/game/shared/hl2mp/hl2mp_playeranimstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ void CHL2MPPlayerAnimState::ComputePoseParam_AimPitch( CStudioHdr *pStudioHdr )
float flAimPitch = m_flEyePitch;

// Set the aim pitch pose parameter and save.
GetBasePlayer()->SetPoseParameter( pStudioHdr, m_PoseParameterData.m_iAimPitch, flAimPitch );
GetBasePlayer()->SetPoseParameter( pStudioHdr, m_PoseParameterData.m_iAimPitch, (20 + ((20 - flAimPitch) * (flAimPitch > 20 ? -1.2 : -1.85))));
m_DebugAnimData.m_flAimPitch = flAimPitch;
}

Expand Down Expand Up @@ -814,7 +814,7 @@ void CHL2MPPlayerAnimState::ComputePoseParam_AimYaw( CStudioHdr *pStudioHdr )
flAimYaw = AngleNormalize( flAimYaw );

// Set the aim yaw and save.
GetBasePlayer()->SetPoseParameter( pStudioHdr, m_PoseParameterData.m_iAimYaw, flAimYaw );
GetBasePlayer()->SetPoseParameter( pStudioHdr, m_PoseParameterData.m_iAimYaw, (flAimYaw * (1.4)) - 15 );
m_DebugAnimData.m_flAimYaw = flAimYaw;

// Turn off a force aim yaw - either we have already updated or we don't need to.
Expand Down
4 changes: 4 additions & 0 deletions mp/src/game/shared/neo/weapons/weapon_neobasecombatweapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,10 @@ int CNEOBaseCombatWeapon::DrawModel(int flags)
int ret = 0;
if (!pOwner->IsCloaked() || inThermalVision)
{
if (IsActiveByLocalPlayer())
{
engine->Con_NPrintf(0, "Our weapon");
}
ret |= BaseClass::DrawModel(flags);
}

Expand Down

0 comments on commit dc06b28

Please sign in to comment.