Browse Source

Do not link weapon entities in client library.

theyhunger
Night Owl 6 years ago
parent
commit
284c34dd1b
  1. 6
      cl_dll/CMakeLists.txt
  2. 19
      cl_dll/hl/hl_weapons.cpp

6
cl_dll/CMakeLists.txt

@ -46,12 +46,6 @@ endif()
set (CLDLL_SOURCES set (CLDLL_SOURCES
../dlls/hunger/ap9.cpp
../dlls/hunger/chaingun.cpp
../dlls/hunger/sniper.cpp
../dlls/hunger/taurus.cpp
../dlls/hunger/tfcsniper.cpp
../dlls/glock.cpp
ev_hldm.cpp ev_hldm.cpp
hl/hl_baseentity.cpp hl/hl_baseentity.cpp
hl/hl_events.cpp hl/hl_events.cpp

19
cl_dll/hl/hl_weapons.cpp

@ -54,12 +54,6 @@ int g_irunninggausspred = 0;
vec3_t previousorigin; vec3_t previousorigin;
// HLDM Weapon placeholder entities. // HLDM Weapon placeholder entities.
CGlock g_Glock;
CWeaponEinarAP9 g_AP9;
CWeaponEinarTaurus g_Taurus;
CWeaponEinarSniper g_Sniper;
CWeaponEinarTFCSniper g_TFCSniper;
CWeaponEinarChaingun g_Chaingun;
/* /*
====================== ======================
@ -595,12 +589,6 @@ void HUD_InitClientWeapons( void )
HUD_PrepEntity( &player, NULL ); HUD_PrepEntity( &player, NULL );
// Allocate slot(s) for each weapon that we are going to be predicting // Allocate slot(s) for each weapon that we are going to be predicting
HUD_PrepEntity( &g_Glock, &player );
HUD_PrepEntity( &g_AP9, &player );
HUD_PrepEntity( &g_Taurus, &player );
HUD_PrepEntity( &g_Sniper, &player );
HUD_PrepEntity( &g_TFCSniper, &player );
HUD_PrepEntity( &g_Chaingun, &player );
} }
/* /*
@ -662,7 +650,7 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
// Fill in data based on selected weapon // Fill in data based on selected weapon
// FIXME, make this a method in each weapon? where you pass in an entity_state_t *? // FIXME, make this a method in each weapon? where you pass in an entity_state_t *?
switch( from->client.m_iId ) /* switch( from->client.m_iId )
{ {
case WEAPON_GLOCK: case WEAPON_GLOCK:
pWeapon = &g_Glock; pWeapon = &g_Glock;
@ -682,7 +670,7 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
case WEAPON_CHAINGUN: case WEAPON_CHAINGUN:
pWeapon = &g_Chaingun; pWeapon = &g_Chaingun;
break; break;
} }*/
// Store pointer to our destination entity_state_t so we can get our origin, etc. from it // Store pointer to our destination entity_state_t so we can get our origin, etc. from it
// for setting up events on the client // for setting up events on the client
@ -829,9 +817,6 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm
{ {
int body = 2; int body = 2;
if( pWeapon == &g_Glock && bIsMultiplayer() )
body = 1;
// Force a fixed anim down to viewmodel // Force a fixed anim down to viewmodel
HUD_SendWeaponAnim( to->client.weaponanim, body, 1 ); HUD_SendWeaponAnim( to->client.weaponanim, body, 1 );
} }

Loading…
Cancel
Save