From a18dbd425a0bf1d41f9f71285128de5a0179368b Mon Sep 17 00:00:00 2001 From: Glitch31415 <123266631+Glitch31415@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:38:21 -0700 Subject: [PATCH 1/6] cstdint fix --- dlls/Bsp.cpp | 1 + dlls/CKeyValue.h | 2 +- dlls/TextMenu.cpp | 2 +- dlls/bsptypes.cpp | 2 +- dlls/util.cpp | 2 +- external/SDL2/SDL_config_nintendods.h | 2 +- external/SDL2/SDL_config_windows.h | 2 +- external/SDL2/SDL_stdinc.h | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/Bsp.cpp b/dlls/Bsp.cpp index 7b761ae6..f6eb4a54 100644 --- a/dlls/Bsp.cpp +++ b/dlls/Bsp.cpp @@ -5,6 +5,7 @@ #include #include #include +#include using namespace std; diff --git a/dlls/CKeyValue.h b/dlls/CKeyValue.h index 54749c7c..5c6e157c 100644 --- a/dlls/CKeyValue.h +++ b/dlls/CKeyValue.h @@ -1,6 +1,6 @@ #pragma once #include "extdll.h" - +#include enum keyvalue_types { KEY_TYPE_NONE, // indicates value failed to load KEY_TYPE_INT, diff --git a/dlls/TextMenu.cpp b/dlls/TextMenu.cpp index 6cf39d86..ebc25870 100644 --- a/dlls/TextMenu.cpp +++ b/dlls/TextMenu.cpp @@ -3,7 +3,7 @@ #include "TextMenu.h" #include "user_messages.h" #include "CTriggerVote.h" - +#include class CTriggerVote; TextMenu g_textMenus[MAX_PLAYERS]; diff --git a/dlls/bsptypes.cpp b/dlls/bsptypes.cpp index 3c3d6c87..97a13568 100644 --- a/dlls/bsptypes.cpp +++ b/dlls/bsptypes.cpp @@ -1,7 +1,7 @@ #include "bsptypes.h" #include #include - +#include BSPEDGE::BSPEDGE() {} BSPEDGE::BSPEDGE(uint16_t v1, uint16_t v2) { diff --git a/dlls/util.cpp b/dlls/util.cpp index 7ffdf789..d5b48c03 100644 --- a/dlls/util.cpp +++ b/dlls/util.cpp @@ -19,7 +19,7 @@ Utility code. Really not optional after all. */ - +#include #include "extdll.h" #include "util.h" #include "cbase.h" diff --git a/external/SDL2/SDL_config_nintendods.h b/external/SDL2/SDL_config_nintendods.h index 7b5c21e7..9e2407a5 100644 --- a/external/SDL2/SDL_config_nintendods.h +++ b/external/SDL2/SDL_config_nintendods.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ - +#include #ifndef _SDL_config_nintendods_h #define _SDL_config_nintendods_h diff --git a/external/SDL2/SDL_config_windows.h b/external/SDL2/SDL_config_windows.h index c3f229f0..e9f5f9eb 100644 --- a/external/SDL2/SDL_config_windows.h +++ b/external/SDL2/SDL_config_windows.h @@ -18,7 +18,7 @@ misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ - +#include #ifndef _SDL_config_windows_h #define _SDL_config_windows_h diff --git a/external/SDL2/SDL_stdinc.h b/external/SDL2/SDL_stdinc.h index f1e0edbc..c60079bb 100644 --- a/external/SDL2/SDL_stdinc.h +++ b/external/SDL2/SDL_stdinc.h @@ -24,7 +24,7 @@ * * This is a general header that includes C language support. */ - +#include #ifndef _SDL_stdinc_h #define _SDL_stdinc_h From 669ff170772679ed90e0cbd4d6b15521f7cd38e3 Mon Sep 17 00:00:00 2001 From: Glitch31415 <123266631+Glitch31415@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:16:26 -0700 Subject: [PATCH 2/6] weapon precache --- dlls/client.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/dlls/client.cpp b/dlls/client.cpp index 6726383d..bbdc4b66 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -421,6 +421,36 @@ void ServerDeactivate( void ) #include "lagcomp.h" void PrecacheWeapons() { + UTIL_PrecacheOther("item_suit"); + UTIL_PrecacheOther("item_battery"); + UTIL_PrecacheOther("weapon_crowbar"); + UTIL_PrecacheOther("weapon_9mmhandgun"); + UTIL_PrecacheOther("ammo_9mmclip"); + UTIL_PrecacheOther("weapon_shotgun"); + UTIL_PrecacheOther("ammo_buckshot"); + UTIL_PrecacheOther("weapon_9mmAR"); + UTIL_PrecacheOther("ammo_9mmAR"); + UTIL_PrecacheOther("ammo_ARgrenades"); + UTIL_PrecacheOther("weapon_handgrenade"); + UTIL_PrecacheOther("weapon_tripmine"); + UTIL_PrecacheOther("weapon_357"); + UTIL_PrecacheOther("ammo_357"); + UTIL_PrecacheOther("weapon_crossbow"); + UTIL_PrecacheOther("ammo_crossbow"); + UTIL_PrecacheOther("weapon_egon"); + UTIL_PrecacheOther("weapon_gauss"); + UTIL_PrecacheOther("ammo_gaussclip"); + UTIL_PrecacheOther("weapon_rpg"); + UTIL_PrecacheOther("ammo_rpgclip"); + UTIL_PrecacheOther("weapon_satchel"); + UTIL_PrecacheOther("weapon_snark"); + UTIL_PrecacheOther("weapon_hornetgun"); + UTIL_PrecacheOther("weapon_grapple"); + UTIL_PrecacheOther("weapon_pipewrench"); + UTIL_PrecacheOther("weapon_displacer"); + UTIL_PrecacheOther("weapon_shockrifle"); + UTIL_PrecacheOther("weapon_sporelauncher"); + UTIL_PrecacheOther("item_longjump"); if (g_mapWeapons.find("weapon_shotgun") != g_mapWeapons.end()) { UTIL_PrecacheOther("weapon_shotgun"); UTIL_PrecacheOther("ammo_buckshot"); From eb395d04b0ccf18ece21cf4ddc7caedba93a422b Mon Sep 17 00:00:00 2001 From: Glitch31415 <123266631+Glitch31415@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:38:23 -0700 Subject: [PATCH 3/6] model precache --- dlls/client.cpp | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/dlls/client.cpp b/dlls/client.cpp index bbdc4b66..31594030 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -451,6 +451,86 @@ void PrecacheWeapons() { UTIL_PrecacheOther("weapon_shockrifle"); UTIL_PrecacheOther("weapon_sporelauncher"); UTIL_PrecacheOther("item_longjump"); + + PRECACHE_MODEL("models/hlcoop_v2/zombie_soldier.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/zombie_barney.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/zombie.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_squeak.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_spore_launcher.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_shock_rifle.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_shock.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_pipe_wrench.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_items_v2.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_displacer.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/w_bgrap.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/voltigore.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/vgibs.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/v_spore_launcher.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/v_shock.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/v_rpg.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/v_pipe_wrench.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/v_displacer.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/v_bgrap.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/turret.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/tor.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/strooper_gibs.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/strooper.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/spore_ammo.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/spore.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/shock_effect.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/sentry.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/scientist.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/saw_shell.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/saw_link.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/rgrunt.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/pit_drone_v2.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/pit_drone_spike.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/pit_drone_gibs.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/p_spore_launcher.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/p_shock.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/p_pipe_wrench.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/p_displacer.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/p_bgrap.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/otis.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/osprey.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/not_precached.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/nihilanth.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/miniturret.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/massn.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/kingpin.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/islave.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/icky.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/hwgrunt.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/houndeye.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/hgrunt_torch.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/hgrunt_opfor.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/hgrunt_medic.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/hgrunt.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/headcrab.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/hassassin.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/gonome.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/garg.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/controller.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/cleansuit_scientist.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/chumtoad.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/bullsquid.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/blkop_tailgibs.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/blkop_osprey.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/blkop_enginegibs.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/blkop_dead_osprey.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/blkop_bodygibs.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/blkop_apache.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/bigshrapnel.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/big_mom.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/bgman.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/barney_vest.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/barney_helmet.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/barney.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/babygarg.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/baby_voltigore.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/baby_headcrab.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/apache.mdl"); +PRECACHE_MODEL("models/hlcoop_v2/agrunt.mdl"); if (g_mapWeapons.find("weapon_shotgun") != g_mapWeapons.end()) { UTIL_PrecacheOther("weapon_shotgun"); UTIL_PrecacheOther("ammo_buckshot"); From 0e25be722ef136d17779f30b72cffaef8a425b07 Mon Sep 17 00:00:00 2001 From: Glitch31415 <123266631+Glitch31415@users.noreply.github.com> Date: Wed, 2 Oct 2024 20:51:09 -0700 Subject: [PATCH 4/6] undo my dumbassery and actually precache models and sounds and stuff --- dlls/client.cpp | 119 ++++++++++++++++-------------------------------- 1 file changed, 40 insertions(+), 79 deletions(-) diff --git a/dlls/client.cpp b/dlls/client.cpp index 31594030..59be9033 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -452,85 +452,46 @@ void PrecacheWeapons() { UTIL_PrecacheOther("weapon_sporelauncher"); UTIL_PrecacheOther("item_longjump"); - PRECACHE_MODEL("models/hlcoop_v2/zombie_soldier.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/zombie_barney.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/zombie.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_squeak.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_spore_launcher.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_shock_rifle.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_shock.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_pipe_wrench.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_items_v2.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_displacer.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/w_bgrap.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/voltigore.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/vgibs.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/v_spore_launcher.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/v_shock.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/v_rpg.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/v_pipe_wrench.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/v_displacer.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/v_bgrap.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/turret.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/tor.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/strooper_gibs.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/strooper.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/spore_ammo.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/spore.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/shock_effect.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/sentry.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/scientist.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/saw_shell.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/saw_link.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/rgrunt.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/pit_drone_v2.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/pit_drone_spike.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/pit_drone_gibs.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/p_spore_launcher.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/p_shock.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/p_pipe_wrench.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/p_displacer.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/p_bgrap.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/otis.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/osprey.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/not_precached.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/nihilanth.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/miniturret.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/massn.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/kingpin.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/islave.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/icky.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/hwgrunt.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/houndeye.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/hgrunt_torch.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/hgrunt_opfor.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/hgrunt_medic.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/hgrunt.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/headcrab.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/hassassin.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/gonome.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/garg.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/controller.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/cleansuit_scientist.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/chumtoad.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/bullsquid.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/blkop_tailgibs.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/blkop_osprey.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/blkop_enginegibs.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/blkop_dead_osprey.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/blkop_bodygibs.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/blkop_apache.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/bigshrapnel.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/big_mom.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/bgman.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/barney_vest.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/barney_helmet.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/barney.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/babygarg.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/baby_voltigore.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/baby_headcrab.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/apache.mdl"); -PRECACHE_MODEL("models/hlcoop_v2/agrunt.mdl"); + UTIL_PrecacheOther("monster_snark"); +UTIL_PrecacheOther("monster_shockroach"); +UTIL_PrecacheOther("monster_rat"); +UTIL_PrecacheOther("monster_alien_babyvoltigore"); +UTIL_PrecacheOther("monster_babycrab"); +UTIL_PrecacheOther("monster_cockroach"); +UTIL_PrecacheOther("monster_flyer_flock"); +UTIL_PrecacheOther("monster_headcrab"); +UTIL_PrecacheOther("monster_leech"); +UTIL_PrecacheOther("monster_penguin"); +UTIL_PrecacheOther("monster_alien_controller"); +UTIL_PrecacheOther("monster_alien_slave"); +UTIL_PrecacheOther("monster_barney"); +UTIL_PrecacheOther("monster_bullchicken"); +UTIL_PrecacheOther("monster_cleansuit_scientist"); +UTIL_PrecacheOther("monster_houndeye"); +UTIL_PrecacheOther("monster_human_assassin"); +UTIL_PrecacheOther("monster_human_grunt"); +UTIL_PrecacheOther("monster_human_grunt_ally"); +UTIL_PrecacheOther("monster_human_medic_ally"); +UTIL_PrecacheOther("monster_male_assassin"); +UTIL_PrecacheOther("monster_otis"); +UTIL_PrecacheOther("monster_pitdrone"); +UTIL_PrecacheOther("monster_scientist"); +UTIL_PrecacheOther("monster_zombie"); +UTIL_PrecacheOther("monster_alien_grunt"); +UTIL_PrecacheOther("monster_alien_voltigore"); +UTIL_PrecacheOther("monster_bigmomma"); +UTIL_PrecacheOther("monster_gargantua"); +UTIL_PrecacheOther("monster_geneworm"); +UTIL_PrecacheOther("monster_gonome"); +UTIL_PrecacheOther("monster_ichthyosaur"); +UTIL_PrecacheOther("monster_nihilanth"); +UTIL_PrecacheOther("monster_pitworm"); +UTIL_PrecacheOther("monster_pitworm_up"); +UTIL_PrecacheOther("monster_shocktrooper"); +UTIL_PrecacheOther("monster_barnacle"); +UTIL_PrecacheOther("monster_tentacle"); +UTIL_PrecacheOther("monster_zombie_soldier"); +UTIL_PrecacheOther("monster_shocktrooper"); if (g_mapWeapons.find("weapon_shotgun") != g_mapWeapons.end()) { UTIL_PrecacheOther("weapon_shotgun"); UTIL_PrecacheOther("ammo_buckshot"); From b7ec06ad3ba31b4342336b8e01d1d9e8ed833979 Mon Sep 17 00:00:00 2001 From: Glitch31415 <123266631+Glitch31415@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:51:23 -0700 Subject: [PATCH 5/6] more stuff i forgot to precache --- dlls/client.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/client.cpp b/dlls/client.cpp index 59be9033..7089a77a 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -492,6 +492,8 @@ UTIL_PrecacheOther("monster_barnacle"); UTIL_PrecacheOther("monster_tentacle"); UTIL_PrecacheOther("monster_zombie_soldier"); UTIL_PrecacheOther("monster_shocktrooper"); +UTIL_PrecacheOther("monster_apache"); +UTIL_PrecacheOther("monster_osprey"); if (g_mapWeapons.find("weapon_shotgun") != g_mapWeapons.end()) { UTIL_PrecacheOther("weapon_shotgun"); UTIL_PrecacheOther("ammo_buckshot"); From 00118d842bf3486a3a4355b454b2bb31c09f23d8 Mon Sep 17 00:00:00 2001 From: wootguy Date: Fri, 4 Oct 2024 00:12:03 -0700 Subject: [PATCH 6/6] fixes - own player name showing in place of an npc name - rename some kill feed messages caused by the world - possibly fix weapons not being selectable and falling off of players --- dlls/env/CEnvExplosion.cpp | 3 ++- dlls/func/CFuncTankMortar.cpp | 1 - dlls/multiplay_gamerules.cpp | 30 ++++++++++++++++++---------- dlls/triggers/CTriggerHurt.cpp | 2 +- dlls/triggers/CTriggerHurtRemote.cpp | 2 +- dlls/weapon/CBasePlayerItem.cpp | 15 +++++++++++++- dlls/weapon/CBasePlayerItem.h | 2 +- dlls/weapon/CMortar.cpp | 1 + 8 files changed, 40 insertions(+), 16 deletions(-) diff --git a/dlls/env/CEnvExplosion.cpp b/dlls/env/CEnvExplosion.cpp index a434cd5f..1f5100f7 100644 --- a/dlls/env/CEnvExplosion.cpp +++ b/dlls/env/CEnvExplosion.cpp @@ -141,7 +141,8 @@ void CEnvExplosion::Use(CBaseEntity* pActivator, CBaseEntity* pCaller, USE_TYPE // do damage if (!(pev->spawnflags & SF_ENVEXPLOSION_NODAMAGE)) { - ::RadiusDamage(pev->origin, pev, pev, m_iMagnitude, m_iMagnitude * 2.5, CLASS_NONE, DMG_BLAST); + entvars_t* ownerpev = pev->owner ? &pev->owner->v : pev; + ::RadiusDamage(pev->origin, pev, ownerpev, m_iMagnitude, m_iMagnitude * 2.5, CLASS_NONE, DMG_BLAST); } SetThink(&CEnvExplosion::Smoke); diff --git a/dlls/func/CFuncTankMortar.cpp b/dlls/func/CFuncTankMortar.cpp index 8994d144..07b79885 100644 --- a/dlls/func/CFuncTankMortar.cpp +++ b/dlls/func/CFuncTankMortar.cpp @@ -10,7 +10,6 @@ class CFuncTankMortar : public CFuncTank public: void KeyValue(KeyValueData* pkvd); void Fire(const Vector& barrelEnd, const Vector& forward, entvars_t* pevAttacker); - virtual const char* DisplayName() { return "Mortar"; } virtual const char* GetDeathNoticeWeapon() { return "grenade"; }; }; LINK_ENTITY_TO_CLASS(func_tankmortar, CFuncTankMortar) diff --git a/dlls/multiplay_gamerules.cpp b/dlls/multiplay_gamerules.cpp index 1f98f923..c14c7f17 100644 --- a/dlls/multiplay_gamerules.cpp +++ b/dlls/multiplay_gamerules.cpp @@ -690,7 +690,6 @@ void CHalfLifeMultiplay::DeathNotice( CBaseMonster *pVictim, entvars_t *pKiller, const char* hackedKillerOriginalName = NULL; const char* hackedVictimOriginalName = NULL; const char* originalKillerName = NULL; - const char* originalVictimName = NULL; bool monsterKill = !Killer->IsPlayer() || !pVictim->IsPlayer(); bool monsterKillingPlayer = !Killer->IsPlayer() && pVictim->IsPlayer(); bool playerKillingMonster = Killer->IsPlayer() && !pVictim->IsPlayer(); @@ -763,7 +762,7 @@ void CHalfLifeMultiplay::DeathNotice( CBaseMonster *pVictim, entvars_t *pKiller, killerName = "Laser"; } else if (pVictim->m_lastDamageType & DMG_DROWN) { - killerName = "Suffocation"; + killerName = "Hypoxia"; } else if (pVictim->m_lastDamageType & (DMG_POISON | DMG_NERVEGAS)) { killerName = "Poison"; @@ -774,18 +773,22 @@ void CHalfLifeMultiplay::DeathNotice( CBaseMonster *pVictim, entvars_t *pKiller, else if (pVictim->m_lastDamageType & DMG_ACID) { killerName = "Acid"; } - else if (pVictim->m_lastDamageType & DMG_SLOWBURN) { + else if (pVictim->m_lastDamageType & (DMG_BURN | DMG_SLOWBURN)) { killerName = "Hyperthermia"; } else if (pVictim->m_lastDamageType & (DMG_FREEZE | DMG_SLOWFREEZE)) { killerName = "Hypothermia"; } - else if (pVictim->m_lastDamageType & (DMG_MORTAR | DMG_BLAST)) { - killerName = "Explosion"; + else if (pVictim->m_lastDamageType & DMG_MORTAR) { + killerName = "Mortar"; + } + else if (pVictim->m_lastDamageType & DMG_BLAST) { + //killerName = "Explosion"; + // entity name should be better } else if (pVictim->m_lastDamageType & (DMG_PARALYZE)) { //killerName = "Nerve damage"; - // entity name should be better ("pain" for trigger_hurt) + // entity name should be better } else if (pVictim->m_lastDamageType & (DMG_SONIC)) { killerName = "Sound"; @@ -899,6 +902,7 @@ void CHalfLifeMultiplay::DeathNotice( CBaseMonster *pVictim, entvars_t *pKiller, } // restore player names if temporarily changed for the status bar, unless renamed just now + // or else the wrong name shows in the kill feed if (pVictim->IsPlayer()) { CBasePlayer* plr = (CBasePlayer*)pVictim; if (plr->tempNameActive && plr != hackedPlayer1 && plr != hackedPlayer2) { @@ -924,6 +928,12 @@ void CHalfLifeMultiplay::DeathNotice( CBaseMonster *pVictim, entvars_t *pKiller, if (hackedPlayer1) { hackedPlayer1->Rename(hackedKillerOriginalName, false); hackedPlayer1->UpdateTeamInfo(); + + // TODO: this is sending the hacked player double the network packets, and these are already heavy + if (hackedPlayer1->tempNameActive) { + hackedPlayer1->Rename(hackedPlayer1->m_tempName, false, MSG_ONE, hackedPlayer1->edict()); + hackedPlayer1->UpdateTeamInfo(hackedPlayer1->m_tempTeam, MSG_ONE, hackedPlayer1->edict()); + } } if (originalKillerName) { CBasePlayer* plr = (CBasePlayer*)Killer; @@ -933,9 +943,9 @@ void CHalfLifeMultiplay::DeathNotice( CBaseMonster *pVictim, entvars_t *pKiller, hackedPlayer2->Rename(hackedVictimOriginalName, false); hackedPlayer2->UpdateTeamInfo(); - if (originalVictimName) { - CBasePlayer* plr = (CBasePlayer*)Killer; - plr->Rename(originalVictimName, false); + if (hackedPlayer2->tempNameActive) { + hackedPlayer2->Rename(hackedPlayer2->m_tempName, false, MSG_ONE, hackedPlayer2->edict()); + hackedPlayer2->UpdateTeamInfo(hackedPlayer2->m_tempTeam, MSG_ONE, hackedPlayer2->edict()); } } @@ -949,7 +959,7 @@ void CHalfLifeMultiplay::DeathNotice( CBaseMonster *pVictim, entvars_t *pKiller, } if (Killer->IsPlayer()) { CBasePlayer* plr = (CBasePlayer*)Killer; - if (plr->tempNameActive && plr != hackedPlayer1 && plr != hackedPlayer2) { + if (plr->tempNameActive && plr != hackedPlayer1 && plr != hackedPlayer2 && !originalKillerName) { plr->Rename(plr->m_tempName, false, MSG_ONE, plr->edict()); plr->UpdateTeamInfo(plr->m_tempTeam, MSG_ONE, plr->edict()); } diff --git a/dlls/triggers/CTriggerHurt.cpp b/dlls/triggers/CTriggerHurt.cpp index 2c49169b..2eaba1f8 100644 --- a/dlls/triggers/CTriggerHurt.cpp +++ b/dlls/triggers/CTriggerHurt.cpp @@ -12,7 +12,7 @@ class CTriggerHurt : public CBaseTrigger public: void Spawn(void); void EXPORT RadiationThink(void); - virtual const char* DisplayName() { return "Pain"; } + virtual const char* DisplayName() { return "Injury"; } }; LINK_ENTITY_TO_CLASS(trigger_hurt, CTriggerHurt) diff --git a/dlls/triggers/CTriggerHurtRemote.cpp b/dlls/triggers/CTriggerHurtRemote.cpp index 94e2001f..1dbe39c0 100644 --- a/dlls/triggers/CTriggerHurtRemote.cpp +++ b/dlls/triggers/CTriggerHurtRemote.cpp @@ -21,7 +21,7 @@ class CTriggerHurtRemote : public CBaseLogic void ConstantThink(); void HurtAllTargets(); void HurtTarget(CBaseEntity* target); - virtual const char* DisplayName() { return "Pain"; } + virtual const char* DisplayName() { return "Injury"; } string_t m_targetClass; float m_armorDmg; diff --git a/dlls/weapon/CBasePlayerItem.cpp b/dlls/weapon/CBasePlayerItem.cpp index cdacf97c..df43fc8b 100644 --- a/dlls/weapon/CBasePlayerItem.cpp +++ b/dlls/weapon/CBasePlayerItem.cpp @@ -189,6 +189,10 @@ void CBasePlayerItem::DefaultTouch(CBaseEntity* pOther) if (!pOther->IsPlayer()) return; + if (pev->movetype == MOVETYPE_FOLLOW || m_hPlayer) { + return; // attached to a player + } + CBasePlayer* pPlayer = (CBasePlayer*)pOther; // can I have this? @@ -301,4 +305,13 @@ void CBasePlayerItem::DefaultUse(CBaseEntity* pActivator, CBaseEntity* pCaller, DefaultTouch(pCaller); } -} \ No newline at end of file +} + +int CBasePlayerItem::ObjectCaps() { + if (pev->movetype == MOVETYPE_FOLLOW) { + return CBaseEntity::ObjectCaps(); + } + else { + return FCAP_ACROSS_TRANSITION | FCAP_IMPULSE_USE; + } +} diff --git a/dlls/weapon/CBasePlayerItem.h b/dlls/weapon/CBasePlayerItem.h index 9e36c716..b8eae4e6 100644 --- a/dlls/weapon/CBasePlayerItem.h +++ b/dlls/weapon/CBasePlayerItem.h @@ -13,7 +13,7 @@ class EXPORT CBasePlayerItem : public CBaseAnimating virtual int Save( CSave &save ); virtual int Restore( CRestore &restore ); - virtual int ObjectCaps(void) { return FCAP_ACROSS_TRANSITION | FCAP_IMPULSE_USE; } + virtual int ObjectCaps(void); static TYPEDESCRIPTION m_SaveData[]; diff --git a/dlls/weapon/CMortar.cpp b/dlls/weapon/CMortar.cpp index f364c60f..af0cfeb4 100644 --- a/dlls/weapon/CMortar.cpp +++ b/dlls/weapon/CMortar.cpp @@ -34,6 +34,7 @@ class CMortar : public CGrenade public: void Spawn( void ); void Precache( void ); + virtual const char* DisplayName() { return "Mortar"; } void EXPORT MortarExplode( void );