Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make primary 3rd person crosshair aim at everything a weapon can hit, except windows and grates #81

Merged
merged 1 commit into from
Sep 21, 2018
Merged
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
2 changes: 1 addition & 1 deletion mp/src/game/client/sdk/hud/da_hud_crosshair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void CDAHudCrosshair::Paint( void )

// Now trace to see where the player will hit
trace_t tr2;
UTIL_TraceLine( vecShootPosition, vecShootPosition + vecForward * 1000, MASK_SOLID|CONTENTS_DEBRIS|CONTENTS_HITBOX, pPlayer, COLLISION_GROUP_NONE, &tr2 );
UTIL_TraceLine( vecShootPosition, vecShootPosition + vecForward * 1000, MASK_SHOT|CONTENTS_GRATE, pPlayer, COLLISION_GROUP_NONE, &tr2 );

//DebugDrawLine(vecCamera, tr.endpos, 255, 0, 0, true, 0.1f);
//DebugDrawLine(vecShootPosition, tr2.endpos, 0, 0, 255, true, 0.1f);
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/shared/sdk/sdk_player_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,7 @@ void CSDKPlayer::UpdateThirdCamera(const Vector& vecEye, const QAngle& angEye)

// Trace to see where the camera is pointing
trace_t tr;
UTIL_TraceLine( m_vecThirdCamera, m_vecThirdCamera + vecShoot * 99999, MASK_VISIBLE|CONTENTS_DEBRIS|CONTENTS_HITBOX, this, COLLISION_GROUP_NONE, &tr );
UTIL_TraceLine( m_vecThirdCamera, m_vecThirdCamera + vecShoot * 99999, MASK_SHOT & ~(CONTENTS_WINDOW), this, COLLISION_GROUP_NONE, &tr );

m_vecThirdTarget = tr.endpos;
}
Expand Down