From 284c34dd1be38b55ff5a392509ef59cd84dfa0c7 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Tue, 11 Sep 2018 23:59:19 +0500 Subject: [PATCH] Do not link weapon entities in client library. --- cl_dll/CMakeLists.txt | 6 ------ cl_dll/hl/hl_weapons.cpp | 19 ++----------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 484d6b70..ab6e567d 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -46,12 +46,6 @@ endif() 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 hl/hl_baseentity.cpp hl/hl_events.cpp diff --git a/cl_dll/hl/hl_weapons.cpp b/cl_dll/hl/hl_weapons.cpp index e247dd64..36a11112 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -54,12 +54,6 @@ int g_irunninggausspred = 0; vec3_t previousorigin; // 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 ); // 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 // 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: pWeapon = &g_Glock; @@ -682,7 +670,7 @@ void HUD_WeaponsPostThink( local_state_s *from, local_state_s *to, usercmd_t *cm case WEAPON_CHAINGUN: pWeapon = &g_Chaingun; break; - } + }*/ // Store pointer to our destination entity_state_t so we can get our origin, etc. from it // 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; - if( pWeapon == &g_Glock && bIsMultiplayer() ) - body = 1; - // Force a fixed anim down to viewmodel HUD_SendWeaponAnim( to->client.weaponanim, body, 1 ); }