Skip to content

Commit 2a7954a

Browse files
committed
Remove hud_autoaim.cpp from client_base.vpc
hud_autoaim.cpp uses m_HL2Local which doesn't exist in other inheritors of client_base like tf2 or cstrike, resulting in crashes. This fixes ValveSoftware/Source-1-Games#7112 assuming it gets applied to cstrike aswell.
1 parent b2705ba commit 2a7954a

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

src/game/client/client_base.vpc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ $Project
290290
$File "c_vehicle_jeep.cpp"
291291
$File "c_vguiscreen.cpp"
292292
$File "hl2\c_waterbullet.cpp"
293-
$File "hl2\hud_autoaim.cpp"
294293
$File "C_WaterLODControl.cpp"
295294
$File "c_world.cpp"
296295
$File "$SRCDIR\game\shared\cam_thirdperson.cpp"

src/game/client/client_episodic.vpc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ $Project "Client (Episodic)"
105105
$File "hl2\hl_in_main.cpp"
106106
$File "hl2\hl_prediction.cpp"
107107
$File "hl2\hud_ammo.cpp"
108+
$File "hl2\hud_autoaim.cpp"
108109
$File "hl2\hud_battery.cpp"
109110
$File "hl2\hud_blood.cpp"
110111
$File "hl2\hud_credits.cpp"

src/game/client/client_hl2.vpc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ $Project "Client (HL2)"
9595
$File "hl2\hl_in_main.cpp"
9696
$File "hl2\hl_prediction.cpp"
9797
$File "hl2\hud_ammo.cpp"
98+
$File "hl2\hud_autoaim.cpp"
9899
$File "hl2\hud_battery.cpp"
99100
$File "hl2\hud_blood.cpp"
100101
$File "hl2\hud_credits.cpp"

src/game/client/client_lostcoast.vpc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ $Project "Client (LostCoast)"
9393
$File "hl2\hl_in_main.cpp"
9494
$File "hl2\hl_prediction.cpp"
9595
$File "hl2\hud_ammo.cpp"
96+
$File "hl2\hud_autoaim.cpp"
9697
$File "hl2\hud_battery.cpp"
9798
$File "hl2\hud_blood.cpp"
9899
$File "hl2\hud_credits.cpp"

src/game/client/hl2/hud_autoaim.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,9 @@ void CHUDAutoAim::OnThink()
176176

177177
BaseClass::OnThink();
178178

179-
#ifdef TF_CLIENT_DLL
180-
if ( true )
181-
#else
182179
// Get the HL2 player
183180
C_BaseHLPlayer *pLocalPlayer = (C_BaseHLPlayer *)C_BasePlayer::GetLocalPlayer();
184181
if ( pLocalPlayer == NULL )
185-
#endif
186182
{
187183
// Just turn the autoaim crosshair off.
188184
ResetPosition();
@@ -193,7 +189,6 @@ void CHUDAutoAim::OnThink()
193189
return;
194190
}
195191

196-
#ifndef TF_CLIENT_DLL
197192
// Get the autoaim target.
198193
CBaseEntity *pTarget = pLocalPlayer->m_HL2Local.m_hAutoAimTarget.Get();
199194

@@ -386,7 +381,6 @@ void CHUDAutoAim::OnThink()
386381
}
387382
break;
388383
}
389-
#endif // !TF_CLIENT_DLL
390384
}
391385

392386
void CHUDAutoAim::Paint()

0 commit comments

Comments
 (0)