Renamed 50bmg to 20special
This commit is contained in:
parent
97bf5252e8
commit
0169223e43
11 changed files with 30 additions and 47 deletions
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -37,18 +37,7 @@ waf3*/
|
||||||
.vscode/
|
.vscode/
|
||||||
.depproj/
|
.depproj/
|
||||||
source-engine.sln
|
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
|
*.cache
|
||||||
*.tmp
|
*.tmp
|
||||||
*.lst
|
*.lst
|
||||||
gamedata/css_enhanced/game/cstrike/textwindow_temp.html
|
|
||||||
*.so
|
*.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
|
|
||||||
|
|
12
README.md
12
README.md
|
@ -8,7 +8,7 @@ First install dependencies: https://github.com/nillerusr/source-engine/wiki/Sour
|
||||||
You also need zstd library.
|
You also need zstd library.
|
||||||
|
|
||||||
To compile for CS:S Enhanced a command line can look like so:
|
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
|
- `clangdb` generates compilation database for LSP
|
||||||
- `install` installs into the prefix `../css_enhanced` the binaries
|
- `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:
|
## How to play:
|
||||||
|
|
||||||
You can join my Discord server at to get a release: https://discord.gg/e8nbakt8
|
- Compile the game as above.
|
||||||
|
|
||||||
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
|
|
||||||
- Run the game with hl2_launcher(.exe) -game cstrike.
|
- Run the game with hl2_launcher(.exe) -game cstrike.
|
||||||
- I have my own server at cssserv.xutaxkamay.com, when it isn't down.
|
- 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).
|
- 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
|
- 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)
|
- 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):
|
And more to come (TODO):
|
||||||
- New weapons coming, thinking gluon gun & m82a1
|
- New weapons coming, thinking gluon gun & m82a1
|
||||||
|
|
|
@ -2419,7 +2419,7 @@ void CTempEnts::LevelInit()
|
||||||
m_pCS_556Shell = (model_t *)engine->LoadModel( "models/Shells/shell_556.mdl" );
|
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_762NATOShell = (model_t *)engine->LoadModel( "models/Shells/shell_762nato.mdl" );
|
||||||
m_pCS_338MAGShell = (model_t *)engine->LoadModel( "models/Shells/shell_338mag.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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2457,7 +2457,7 @@ void CTempEnts::Init (void)
|
||||||
m_pCS_556Shell = NULL;
|
m_pCS_556Shell = NULL;
|
||||||
m_pCS_762NATOShell = NULL;
|
m_pCS_762NATOShell = NULL;
|
||||||
m_pCS_338MAGShell = NULL;
|
m_pCS_338MAGShell = NULL;
|
||||||
m_pCS_50BMGShell = NULL;
|
m_pCS_20SpecialShell = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Clear out lists to start
|
// Clear out lists to start
|
||||||
|
@ -3363,9 +3363,9 @@ void CTempEnts::CSEjectBrass( const Vector &vecPosition, const QAngle &angVeloci
|
||||||
hitsound = TE_RIFLE_SHELL;
|
hitsound = TE_RIFLE_SHELL;
|
||||||
pModel = m_pCS_338MAGShell;
|
pModel = m_pCS_338MAGShell;
|
||||||
break;
|
break;
|
||||||
case CS_SHELL_50BMG:
|
case CS_SHELL_20Special:
|
||||||
hitsound = TE_RIFLE_SHELL;
|
hitsound = TE_RIFLE_SHELL;
|
||||||
pModel = m_pCS_50BMGShell;
|
pModel = m_pCS_20SpecialShell;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,7 +28,7 @@ enum
|
||||||
CS_SHELL_556,
|
CS_SHELL_556,
|
||||||
CS_SHELL_762NATO,
|
CS_SHELL_762NATO,
|
||||||
CS_SHELL_338MAG,
|
CS_SHELL_338MAG,
|
||||||
CS_SHELL_50BMG
|
CS_SHELL_20Special
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ private:
|
||||||
struct model_t *m_pCS_556Shell;
|
struct model_t *m_pCS_556Shell;
|
||||||
struct model_t *m_pCS_762NATOShell;
|
struct model_t *m_pCS_762NATOShell;
|
||||||
struct model_t *m_pCS_338MAGShell;
|
struct model_t *m_pCS_338MAGShell;
|
||||||
struct model_t *m_pCS_50BMGShell;
|
struct model_t *m_pCS_20SpecialShell;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Internal methods also available to children
|
// Internal methods also available to children
|
||||||
|
|
|
@ -53,9 +53,9 @@ void CStrike_FX_EjectBrass_338Mag_Callback( const CEffectData &data )
|
||||||
CStrike_EjectBrass( CS_SHELL_338MAG, 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 );
|
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_556", CStrike_FX_EjectBrass_556_Callback );
|
||||||
DECLARE_CLIENT_EFFECT( "EjectBrass_762Nato", CStrike_FX_EjectBrass_762Nato_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_338Mag", CStrike_FX_EjectBrass_338Mag_Callback );
|
||||||
DECLARE_CLIENT_EFFECT( "EjectBrass_50BMG", CStrike_FX_EjectBrass_50BMG_Callback );
|
DECLARE_CLIENT_EFFECT( "EjectBrass_20Special", CStrike_FX_EjectBrass_20Special_Callback );
|
|
@ -1316,7 +1316,7 @@ void CCSPlayer::CheatImpulseCommands( int iImpulse )
|
||||||
|
|
||||||
AddAccount( 16000 );
|
AddAccount( 16000 );
|
||||||
|
|
||||||
GiveAmmo( 13371, BULLET_PLAYER_50BMG );
|
GiveAmmo( 13371, BULLET_PLAYER_20Special );
|
||||||
GiveAmmo( 13371, BULLET_PLAYER_50AE );
|
GiveAmmo( 13371, BULLET_PLAYER_50AE );
|
||||||
GiveAmmo( 13371, BULLET_PLAYER_762MM );
|
GiveAmmo( 13371, BULLET_PLAYER_762MM );
|
||||||
GiveAmmo( 13371, BULLET_PLAYER_338MAG );
|
GiveAmmo( 13371, BULLET_PLAYER_338MAG );
|
||||||
|
|
|
@ -54,14 +54,14 @@ public:
|
||||||
LINK_ENTITY_TO_CLASS( ammo_50ae, CItemAmmo50AE );
|
LINK_ENTITY_TO_CLASS( ammo_50ae, CItemAmmo50AE );
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class CItemAmmo50BMG : public CItemAmmo
|
class CItemAmmo20Special : public CItemAmmo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DECLARE_CLASS( CItemAmmo50BMG, CItemAmmo );
|
DECLARE_CLASS( CItemAmmo20Special, CItemAmmo );
|
||||||
virtual const char * GetAmmoName( void ) const { return BULLET_PLAYER_50BMG; }
|
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
|
class CItemAmmo762MM : public CItemAmmo
|
||||||
|
|
|
@ -165,7 +165,7 @@ IMPLEMENT_NETWORKCLASS_ALIASED( CSGameRulesProxy, DT_CSGameRulesProxy )
|
||||||
|
|
||||||
|
|
||||||
ConVar ammo_50AE_max( "ammo_50AE_max", "35", FCVAR_REPLICATED );
|
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_762mm_max( "ammo_762mm_max", "90", FCVAR_REPLICATED );
|
||||||
ConVar ammo_556mm_max( "ammo_556mm_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 );
|
ConVar ammo_556mm_box_max( "ammo_556mm_box_max", "200", FCVAR_REPLICATED );
|
||||||
|
@ -5077,7 +5077,7 @@ CAmmoDef* GetAmmoDef()
|
||||||
bInitted = true;
|
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_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_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, 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 );
|
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
|
//Adrian: I set all the prices to 0 just so the rest of the buy code works
|
||||||
//This should be revisited.
|
//This should be revisited.
|
||||||
ammoDef.AddAmmoCost( BULLET_PLAYER_50AE, 0, 7 );
|
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_762MM, 0, 30 );
|
||||||
ammoDef.AddAmmoCost( BULLET_PLAYER_556MM, 0, 30 );
|
ammoDef.AddAmmoCost( BULLET_PLAYER_556MM, 0, 30 );
|
||||||
ammoDef.AddAmmoCost( BULLET_PLAYER_556MM_BOX, 0, 30 );
|
ammoDef.AddAmmoCost( BULLET_PLAYER_556MM_BOX, 0, 30 );
|
||||||
|
|
|
@ -235,7 +235,7 @@ float CCSPlayer::GetBulletDiameter(int iBulletType)
|
||||||
{
|
{
|
||||||
return MMToUnits(13.8f);
|
return MMToUnits(13.8f);
|
||||||
}
|
}
|
||||||
else if (IsAmmoType(iBulletType, BULLET_PLAYER_50BMG))
|
else if (IsAmmoType(iBulletType, BULLET_PLAYER_20Special))
|
||||||
{
|
{
|
||||||
return MMToUnits(20.f);
|
return MMToUnits(20.f);
|
||||||
}
|
}
|
||||||
|
@ -296,7 +296,7 @@ void CCSPlayer::GetBulletTypeParameters(
|
||||||
fPenetrationPower = 39;
|
fPenetrationPower = 39;
|
||||||
flPenetrationDistance = 5000.0;
|
flPenetrationDistance = 5000.0;
|
||||||
}
|
}
|
||||||
else if ( IsAmmoType( iBulletType, BULLET_PLAYER_50BMG ) )
|
else if ( IsAmmoType( iBulletType, BULLET_PLAYER_20Special ) )
|
||||||
{
|
{
|
||||||
fPenetrationPower = 266.6f;
|
fPenetrationPower = 266.6f;
|
||||||
flPenetrationDistance = 150000.0;
|
flPenetrationDistance = 150000.0;
|
||||||
|
@ -478,11 +478,11 @@ void CCSPlayer::FireBullet(
|
||||||
|
|
||||||
GetBulletTypeParameters( iBulletType, flPenetrationPower, flPenetrationDistance, flBulletDiameter );
|
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;
|
float flBulletRadius = flBulletDiameter / 2.0f;
|
||||||
|
@ -711,7 +711,7 @@ void CCSPlayer::FireBullet(
|
||||||
flDamageModifier = 0.99f;
|
flDamageModifier = 0.99f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is50bmg && iEnterMaterial >= 'A')
|
if (is20special && iEnterMaterial >= 'A')
|
||||||
{
|
{
|
||||||
flPenetrationModifier = 1.0f;
|
flPenetrationModifier = 1.0f;
|
||||||
}
|
}
|
||||||
|
@ -866,7 +866,7 @@ void CCSPlayer::FireBullet(
|
||||||
// #endif
|
// #endif
|
||||||
Vector penetrationEnd;
|
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
|
// try to penetrate object, maximum penetration is 128 inch
|
||||||
if ( !TraceToExit( tr.endpos, vecDir, penetrationEnd, 24, flMaxPenetrationDistance ) )
|
if ( !TraceToExit( tr.endpos, vecDir, penetrationEnd, 24, flMaxPenetrationDistance ) )
|
||||||
|
|
|
@ -262,8 +262,8 @@ int GetShellForAmmoType( const char *ammoname )
|
||||||
if ( !Q_strcmp( BULLET_PLAYER_57MM, ammoname ) )
|
if ( !Q_strcmp( BULLET_PLAYER_57MM, ammoname ) )
|
||||||
return CS_SHELL_57;
|
return CS_SHELL_57;
|
||||||
|
|
||||||
if ( !Q_strcmp( BULLET_PLAYER_50BMG, ammoname ) )
|
if ( !Q_strcmp( BULLET_PLAYER_20Special, ammoname ) )
|
||||||
return CS_SHELL_50BMG;
|
return CS_SHELL_20Special;
|
||||||
|
|
||||||
// default 9 mm
|
// default 9 mm
|
||||||
return CS_SHELL_9MM;
|
return CS_SHELL_9MM;
|
||||||
|
|
|
@ -33,7 +33,7 @@ class CCSPlayer;
|
||||||
|
|
||||||
// These are the names of the ammo types that go in the CAmmoDefs and that the
|
// These are the names of the ammo types that go in the CAmmoDefs and that the
|
||||||
// weapon script files reference.
|
// 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_50AE "BULLET_PLAYER_50AE"
|
||||||
#define BULLET_PLAYER_762MM "BULLET_PLAYER_762MM"
|
#define BULLET_PLAYER_762MM "BULLET_PLAYER_762MM"
|
||||||
#define BULLET_PLAYER_556MM "BULLET_PLAYER_556MM"
|
#define BULLET_PLAYER_556MM "BULLET_PLAYER_556MM"
|
||||||
|
|
Loading…
Reference in a new issue