From 38f7f098174f6eca219c54bf4ceb93b3789d15c9 Mon Sep 17 00:00:00 2001 From: Night Owl Date: Sat, 31 Mar 2018 03:08:08 +0500 Subject: [PATCH] Do not use client weapons. --- cl_dll/CMakeLists.txt | 22 +--------------------- cl_dll/hl/hl_weapons.cpp | 38 -------------------------------------- dlls/CMakeLists.txt | 2 +- 3 files changed, 2 insertions(+), 60 deletions(-) diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 57cc2dee..60a86f4c 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -25,33 +25,13 @@ project (CLDLL) set (CLDLL_LIBRARY client) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_WEAPONS -DCLIENT_DLL -w") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-write-strings -DLINUX -D_LINUX -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DCLIENT_DLL -w") if (GOLDSOURCE_SUPPORT) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DGOLDSOURCE_SUPPORT") endif() set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}") set (CLDLL_SOURCES - ../dlls/crossbow.cpp - ../dlls/crowbar.cpp -# ../dlls/egon.cpp -# ../dlls/gauss.cpp -# ../dlls/handgrenade.cpp -# ../dlls/hornetgun.cpp -# ../dlls/mp5.cpp -# ../dlls/python.cpp - ../dlls/rpg.cpp - ../dlls/satchel.cpp - ../dlls/shotgun.cpp - ../dlls/squeakgrenade.cpp - ../dlls/tripmine.cpp -# ../dlls/glock.cpp - ../dlls/poke646/bradnailer.cpp - ../dlls/poke646/cmlwbr.cpp - ../dlls/poke646/heaterpipe.cpp - ../dlls/poke646/nailgun.cpp - ../dlls/poke646/weapon_pipebomb.cpp - ../dlls/poke646/xensquasher.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 59e74638..f9c09096 100644 --- a/cl_dll/hl/hl_weapons.cpp +++ b/cl_dll/hl/hl_weapons.cpp @@ -53,13 +53,6 @@ int g_irunninggausspred = 0; vec3_t previousorigin; // HLDM Weapon placeholder entities. -CHeaterPipe g_HeaterPipe; -CCmlwbr g_Cmlwbr; -CShotgun g_Shotgun; -CPipeBomb g_PipeBomb; -CBradnailer g_Bradnailer; -CNailgun g_Nailgun; -CXenSquasher g_Xs; /* ====================== AlertMessage @@ -594,13 +587,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_HeaterPipe, &player ); - HUD_PrepEntity( &g_Shotgun, &player ); - HUD_PrepEntity( &g_Cmlwbr, &player ); - HUD_PrepEntity( &g_PipeBomb, &player ); - HUD_PrepEntity( &g_Bradnailer, &player ); - HUD_PrepEntity( &g_Nailgun, &player ); - HUD_PrepEntity( &g_Xs, &player ); } /* @@ -662,30 +648,6 @@ 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 ) - { - case WEAPON_HEATERPIPE: - pWeapon = &g_HeaterPipe; - break; - case WEAPON_SHOTGUN: - pWeapon = &g_Shotgun; - break; - case WEAPON_CMLWBR: - pWeapon = &g_Cmlwbr; - break; - case WEAPON_PIPEBOMB: - pWeapon = &g_PipeBomb; - break; - case WEAPON_BRADNAILER: - pWeapon = &g_Bradnailer; - break; - case WEAPON_NAILGUN: - pWeapon = &g_Nailgun; - break; - case WEAPON_XS: - pWeapon = &g_Xs; - 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 diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 3dec6998..3ae6568c 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -25,7 +25,7 @@ project (SVDLL) set (SVDLL_LIBRARY server) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LINUX -DCLIENT_WEAPONS -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -fno-exceptions -w") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LINUX -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -fno-exceptions -w") set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}") set (SVDLL_SOURCES