From 0169223e43513612da09006eddd755e8de963d2a Mon Sep 17 00:00:00 2001 From: Kamay Xutax Date: Sat, 7 Sep 2024 14:41:43 +0200 Subject: [PATCH] Renamed 50bmg to 20special --- .gitignore | 11 ----------- README.md | 12 +++--------- game/client/c_te_legacytempents.cpp | 8 ++++---- game/client/c_te_legacytempents.h | 4 ++-- game/client/cstrike/fx_cs_weaponfx.cpp | 6 +++--- game/server/cstrike/cs_player.cpp | 2 +- game/server/cstrike/item_ammo.cpp | 8 ++++---- game/shared/cstrike/cs_gamerules.cpp | 6 +++--- game/shared/cstrike/cs_player_shared.cpp | 14 +++++++------- game/shared/cstrike/weapon_csbase.cpp | 4 ++-- game/shared/cstrike/weapon_csbase.h | 2 +- 11 files changed, 30 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index 5c0c5d7abf..4d6e1d38b7 100755 --- a/.gitignore +++ b/.gitignore @@ -37,18 +37,7 @@ waf3*/ .vscode/ .depproj/ source-engine.sln -gamedata/css_enhanced/game/cstrike/cfg/config.cfg -gamedata/css_enhanced/game/bin/*.lib -gamedata/css_enhanced/game/cstrike/bin/*.lib -gamedata/css_enhanced/game/cstrike/downladlists/* -gamedata/css_enhanced/game/cstrike/download/* *.cache *.tmp *.lst -gamedata/css_enhanced/game/cstrike/textwindow_temp.html *.so -gamedata/css_enhanced/game/cstrike/videoconfig_linux.cfg -gamedata/css_enhanced/game/cstrike/cfg/autoexec.cfg -gamedata/css_enhanced/game/cstrike/glshaders.cfg -gamedata/css_enhanced/game/cstrike/gamestate.txt -gamedata/css_enhanced/game/cstrike/serverconfig.vdf diff --git a/README.md b/README.md index 46624fd44c..82229c803a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ First install dependencies: https://github.com/nillerusr/source-engine/wiki/Sour You also need zstd library. To compile for CS:S Enhanced a command line can look like so: -```./waf configure clangdb install -p -o build --use-ccache -T fastnative --prefix ../css_enhanced``` +```./waf configure clangdb install -p -o build -T fastnative --prefix ./gamedata/css_enhanced/game``` - `clangdb` generates compilation database for LSP - `install` installs into the prefix `../css_enhanced` the binaries @@ -18,14 +18,7 @@ To compile for CS:S Enhanced a command line can look like so: ## How to play: -You can join my Discord server at to get a release: https://discord.gg/e8nbakt8 - -OR: - -- First, you need original CS:S & HL2 files. -- Copy the original CS:S folder somewhere. -- Overwrite the hl2 and platform folder from the Half-Life 2 files so that shaders can work.\ -This is because stdshaders needs some rewrite to make it work basically with sdk 2013, can't do it now yet +- Compile the game as above. - Run the game with hl2_launcher(.exe) -game cstrike. - I have my own server at cssserv.xutaxkamay.com, when it isn't down. @@ -43,6 +36,7 @@ A lot! If you're curious you can look on the commit log, but here's the most int - You can use ARM servers to run a dedicated server (this is huge, since servers have a lot of power consumption). - Network compression mostly removed so the client get the exact values from the server - zstd compression with trained data so that it compress (and decompress) very fast for a very good ratio. (around 1/10) +- Added new weapon, M82A1 And more to come (TODO): - New weapons coming, thinking gluon gun & m82a1 diff --git a/game/client/c_te_legacytempents.cpp b/game/client/c_te_legacytempents.cpp index ca3044f6d3..af3bb57fe4 100644 --- a/game/client/c_te_legacytempents.cpp +++ b/game/client/c_te_legacytempents.cpp @@ -2419,7 +2419,7 @@ void CTempEnts::LevelInit() m_pCS_556Shell = (model_t *)engine->LoadModel( "models/Shells/shell_556.mdl" ); m_pCS_762NATOShell = (model_t *)engine->LoadModel( "models/Shells/shell_762nato.mdl" ); m_pCS_338MAGShell = (model_t *)engine->LoadModel( "models/Shells/shell_338mag.mdl" ); - m_pCS_50BMGShell = (model_t *)engine->LoadModel( "models/Shells/shell_50bmg.mdl" ); + m_pCS_20SpecialShell = (model_t *)engine->LoadModel( "models/Shells/shell_20special.mdl" ); #endif } @@ -2457,7 +2457,7 @@ void CTempEnts::Init (void) m_pCS_556Shell = NULL; m_pCS_762NATOShell = NULL; m_pCS_338MAGShell = NULL; - m_pCS_50BMGShell = NULL; + m_pCS_20SpecialShell = NULL; #endif // Clear out lists to start @@ -3363,9 +3363,9 @@ void CTempEnts::CSEjectBrass( const Vector &vecPosition, const QAngle &angVeloci hitsound = TE_RIFLE_SHELL; pModel = m_pCS_338MAGShell; break; - case CS_SHELL_50BMG: + case CS_SHELL_20Special: hitsound = TE_RIFLE_SHELL; - pModel = m_pCS_50BMGShell; + pModel = m_pCS_20SpecialShell; break; } #endif diff --git a/game/client/c_te_legacytempents.h b/game/client/c_te_legacytempents.h index 71647e8bb1..9ea705c8b2 100644 --- a/game/client/c_te_legacytempents.h +++ b/game/client/c_te_legacytempents.h @@ -28,7 +28,7 @@ enum CS_SHELL_556, CS_SHELL_762NATO, CS_SHELL_338MAG, - CS_SHELL_50BMG + CS_SHELL_20Special }; #endif @@ -162,7 +162,7 @@ private: struct model_t *m_pCS_556Shell; struct model_t *m_pCS_762NATOShell; struct model_t *m_pCS_338MAGShell; - struct model_t *m_pCS_50BMGShell; + struct model_t *m_pCS_20SpecialShell; #endif // Internal methods also available to children diff --git a/game/client/cstrike/fx_cs_weaponfx.cpp b/game/client/cstrike/fx_cs_weaponfx.cpp index 617525a308..f74a2e76b7 100644 --- a/game/client/cstrike/fx_cs_weaponfx.cpp +++ b/game/client/cstrike/fx_cs_weaponfx.cpp @@ -53,9 +53,9 @@ void CStrike_FX_EjectBrass_338Mag_Callback( const CEffectData &data ) CStrike_EjectBrass( CS_SHELL_338MAG, data ); } -void CStrike_FX_EjectBrass_50BMG_Callback( const CEffectData &data ) +void CStrike_FX_EjectBrass_20Special_Callback( const CEffectData &data ) { - CStrike_EjectBrass( CS_SHELL_50BMG, data ); + CStrike_EjectBrass( CS_SHELL_20Special, data ); } DECLARE_CLIENT_EFFECT( "EjectBrass_9mm", CStrike_FX_EjectBrass_9mm_Callback ); @@ -64,4 +64,4 @@ DECLARE_CLIENT_EFFECT( "EjectBrass_57", CStrike_FX_EjectBrass_57_Callback ); DECLARE_CLIENT_EFFECT( "EjectBrass_556", CStrike_FX_EjectBrass_556_Callback ); DECLARE_CLIENT_EFFECT( "EjectBrass_762Nato", CStrike_FX_EjectBrass_762Nato_Callback ); DECLARE_CLIENT_EFFECT( "EjectBrass_338Mag", CStrike_FX_EjectBrass_338Mag_Callback ); -DECLARE_CLIENT_EFFECT( "EjectBrass_50BMG", CStrike_FX_EjectBrass_50BMG_Callback ); \ No newline at end of file +DECLARE_CLIENT_EFFECT( "EjectBrass_20Special", CStrike_FX_EjectBrass_20Special_Callback ); \ No newline at end of file diff --git a/game/server/cstrike/cs_player.cpp b/game/server/cstrike/cs_player.cpp index adce375452..9d8a0c3493 100644 --- a/game/server/cstrike/cs_player.cpp +++ b/game/server/cstrike/cs_player.cpp @@ -1316,7 +1316,7 @@ void CCSPlayer::CheatImpulseCommands( int iImpulse ) AddAccount( 16000 ); - GiveAmmo( 13371, BULLET_PLAYER_50BMG ); + GiveAmmo( 13371, BULLET_PLAYER_20Special ); GiveAmmo( 13371, BULLET_PLAYER_50AE ); GiveAmmo( 13371, BULLET_PLAYER_762MM ); GiveAmmo( 13371, BULLET_PLAYER_338MAG ); diff --git a/game/server/cstrike/item_ammo.cpp b/game/server/cstrike/item_ammo.cpp index d44e3abad0..85ae510d3f 100644 --- a/game/server/cstrike/item_ammo.cpp +++ b/game/server/cstrike/item_ammo.cpp @@ -54,14 +54,14 @@ public: LINK_ENTITY_TO_CLASS( ammo_50ae, CItemAmmo50AE ); //----------------------------------------------------------------------------- -class CItemAmmo50BMG : public CItemAmmo +class CItemAmmo20Special : public CItemAmmo { public: - DECLARE_CLASS( CItemAmmo50BMG, CItemAmmo ); - virtual const char * GetAmmoName( void ) const { return BULLET_PLAYER_50BMG; } + DECLARE_CLASS( CItemAmmo20Special, CItemAmmo ); + virtual const char * GetAmmoName( void ) const { return BULLET_PLAYER_20Special; } }; -LINK_ENTITY_TO_CLASS( ammo_50bmg, CItemAmmo50BMG ); +LINK_ENTITY_TO_CLASS( ammo_20special, CItemAmmo20Special ); //----------------------------------------------------------------------------- class CItemAmmo762MM : public CItemAmmo diff --git a/game/shared/cstrike/cs_gamerules.cpp b/game/shared/cstrike/cs_gamerules.cpp index 193f7d66ed..9986e27039 100644 --- a/game/shared/cstrike/cs_gamerules.cpp +++ b/game/shared/cstrike/cs_gamerules.cpp @@ -165,7 +165,7 @@ IMPLEMENT_NETWORKCLASS_ALIASED( CSGameRulesProxy, DT_CSGameRulesProxy ) ConVar ammo_50AE_max( "ammo_50AE_max", "35", FCVAR_REPLICATED ); -ConVar ammo_50bmg_max( "ammo_50bmg_max", "18", FCVAR_REPLICATED ); +ConVar ammo_20special_max( "ammo_20special_max", "18", FCVAR_REPLICATED ); ConVar ammo_762mm_max( "ammo_762mm_max", "90", FCVAR_REPLICATED ); ConVar ammo_556mm_max( "ammo_556mm_max", "90", FCVAR_REPLICATED ); ConVar ammo_556mm_box_max( "ammo_556mm_box_max", "200", FCVAR_REPLICATED ); @@ -5077,7 +5077,7 @@ CAmmoDef* GetAmmoDef() bInitted = true; ammoDef.AddAmmoType( BULLET_PLAYER_50AE, DMG_BULLET, TRACER_LINE, 0, 0, "ammo_50AE_max", 2400 * BULLET_IMPULSE_EXAGGERATION, 0, 10, 14 ); - ammoDef.AddAmmoType( BULLET_PLAYER_50BMG, DMG_BULLET, TRACER_LINE, 0, 0, "ammo_50bmg_max", 4800 * BULLET_IMPULSE_EXAGGERATION, 0, 30, 40 ); + ammoDef.AddAmmoType( BULLET_PLAYER_20Special, DMG_BULLET, TRACER_LINE, 0, 0, "ammo_20special_max", 4800 * BULLET_IMPULSE_EXAGGERATION, 0, 30, 40 ); ammoDef.AddAmmoType( BULLET_PLAYER_762MM, DMG_BULLET, TRACER_LINE, 0, 0, "ammo_762mm_max", 2400 * BULLET_IMPULSE_EXAGGERATION, 0, 10, 14 ); ammoDef.AddAmmoType( BULLET_PLAYER_556MM, DMG_BULLET, TRACER_LINE, 0, 0, "ammo_556mm_max", 2400 * BULLET_IMPULSE_EXAGGERATION, 0, 10, 14 ); ammoDef.AddAmmoType( BULLET_PLAYER_556MM_BOX, DMG_BULLET, TRACER_LINE, 0, 0, "ammo_556mm_box_max",2400 * BULLET_IMPULSE_EXAGGERATION, 0, 10, 14 ); @@ -5094,7 +5094,7 @@ CAmmoDef* GetAmmoDef() //Adrian: I set all the prices to 0 just so the rest of the buy code works //This should be revisited. ammoDef.AddAmmoCost( BULLET_PLAYER_50AE, 0, 7 ); - ammoDef.AddAmmoCost( BULLET_PLAYER_50BMG, 0, 6 ); + ammoDef.AddAmmoCost( BULLET_PLAYER_20Special, 0, 6 ); ammoDef.AddAmmoCost( BULLET_PLAYER_762MM, 0, 30 ); ammoDef.AddAmmoCost( BULLET_PLAYER_556MM, 0, 30 ); ammoDef.AddAmmoCost( BULLET_PLAYER_556MM_BOX, 0, 30 ); diff --git a/game/shared/cstrike/cs_player_shared.cpp b/game/shared/cstrike/cs_player_shared.cpp index f3a79c483c..c998a9da64 100644 --- a/game/shared/cstrike/cs_player_shared.cpp +++ b/game/shared/cstrike/cs_player_shared.cpp @@ -235,7 +235,7 @@ float CCSPlayer::GetBulletDiameter(int iBulletType) { return MMToUnits(13.8f); } - else if (IsAmmoType(iBulletType, BULLET_PLAYER_50BMG)) + else if (IsAmmoType(iBulletType, BULLET_PLAYER_20Special)) { return MMToUnits(20.f); } @@ -296,7 +296,7 @@ void CCSPlayer::GetBulletTypeParameters( fPenetrationPower = 39; flPenetrationDistance = 5000.0; } - else if ( IsAmmoType( iBulletType, BULLET_PLAYER_50BMG ) ) + else if ( IsAmmoType( iBulletType, BULLET_PLAYER_20Special ) ) { fPenetrationPower = 266.6f; flPenetrationDistance = 150000.0; @@ -478,11 +478,11 @@ void CCSPlayer::FireBullet( GetBulletTypeParameters( iBulletType, flPenetrationPower, flPenetrationDistance, flBulletDiameter ); - bool is50bmg = false; + bool is20special = false; - if (IsAmmoType( iBulletType, BULLET_PLAYER_50BMG )) + if (IsAmmoType( iBulletType, BULLET_PLAYER_20Special )) { - is50bmg = true; + is20special = true; } float flBulletRadius = flBulletDiameter / 2.0f; @@ -711,7 +711,7 @@ void CCSPlayer::FireBullet( flDamageModifier = 0.99f; } - if (is50bmg && iEnterMaterial >= 'A') + if (is20special && iEnterMaterial >= 'A') { flPenetrationModifier = 1.0f; } @@ -866,7 +866,7 @@ void CCSPlayer::FireBullet( // #endif Vector penetrationEnd; - float flMaxPenetrationDistance = is50bmg ? 1024.0f : 128.0f; + float flMaxPenetrationDistance = is20special ? 1024.0f : 128.0f; // try to penetrate object, maximum penetration is 128 inch if ( !TraceToExit( tr.endpos, vecDir, penetrationEnd, 24, flMaxPenetrationDistance ) ) diff --git a/game/shared/cstrike/weapon_csbase.cpp b/game/shared/cstrike/weapon_csbase.cpp index 564a7f7528..1edd36598f 100644 --- a/game/shared/cstrike/weapon_csbase.cpp +++ b/game/shared/cstrike/weapon_csbase.cpp @@ -262,8 +262,8 @@ int GetShellForAmmoType( const char *ammoname ) if ( !Q_strcmp( BULLET_PLAYER_57MM, ammoname ) ) return CS_SHELL_57; - if ( !Q_strcmp( BULLET_PLAYER_50BMG, ammoname ) ) - return CS_SHELL_50BMG; + if ( !Q_strcmp( BULLET_PLAYER_20Special, ammoname ) ) + return CS_SHELL_20Special; // default 9 mm return CS_SHELL_9MM; diff --git a/game/shared/cstrike/weapon_csbase.h b/game/shared/cstrike/weapon_csbase.h index 48c742026b..ec84f1772c 100644 --- a/game/shared/cstrike/weapon_csbase.h +++ b/game/shared/cstrike/weapon_csbase.h @@ -33,7 +33,7 @@ class CCSPlayer; // These are the names of the ammo types that go in the CAmmoDefs and that the // weapon script files reference. -#define BULLET_PLAYER_50BMG "BULLET_PLAYER_50BMG" +#define BULLET_PLAYER_20Special "BULLET_PLAYER_20Special" #define BULLET_PLAYER_50AE "BULLET_PLAYER_50AE" #define BULLET_PLAYER_762MM "BULLET_PLAYER_762MM" #define BULLET_PLAYER_556MM "BULLET_PLAYER_556MM"