mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-26 22:54:39 +00:00
Add weapon_silencer, weapon_bloodly_9mmAR and weapon_bloodly_shotgun implementations.
This commit is contained in:
parent
f73fb094ab
commit
a8d0d70fdf
@ -236,13 +236,19 @@ class CGlockAmmo : public CBasePlayerAmmo
|
||||
void Spawn( void )
|
||||
{
|
||||
Precache();
|
||||
SET_MODEL( ENT( pev ), "models/w_9mmclip.mdl" );
|
||||
if( FClassnameIs( pev, "weapon_silencer" ) )
|
||||
SET_MODEL( ENT( pev ), "models/w_silencer.mdl" );
|
||||
else
|
||||
SET_MODEL( ENT( pev ), "models/w_9mmclip.mdl" );
|
||||
CBasePlayerAmmo::Spawn();
|
||||
}
|
||||
|
||||
void Precache( void )
|
||||
{
|
||||
PRECACHE_MODEL( "models/w_9mmclip.mdl" );
|
||||
if( FClassnameIs( pev, "weapon_silencer" ) )
|
||||
PRECACHE_MODEL( "models/w_silencer.mdl" );
|
||||
else
|
||||
PRECACHE_MODEL( "models/w_9mmclip.mdl" );
|
||||
PRECACHE_SOUND( "items/9mmclip1.wav" );
|
||||
}
|
||||
|
||||
@ -257,5 +263,6 @@ class CGlockAmmo : public CBasePlayerAmmo
|
||||
}
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( weapon_silencer, CGlockAmmo )
|
||||
LINK_ENTITY_TO_CLASS( ammo_glockclip, CGlockAmmo )
|
||||
LINK_ENTITY_TO_CLASS( ammo_9mmclip, CGlockAmmo )
|
||||
|
11
dlls/mp5.cpp
11
dlls/mp5.cpp
@ -281,12 +281,18 @@ class CMP5AmmoClip : public CBasePlayerAmmo
|
||||
void Spawn( void )
|
||||
{
|
||||
Precache();
|
||||
SET_MODEL( ENT( pev ), "models/w_9mmARclip.mdl" );
|
||||
if( FClassnameIs( pev, "weapon_bloodly_9mmAR" ) )
|
||||
SET_MODEL( ENT( pev ), "models/w_bloodly_9mmAR.mdl" );
|
||||
else
|
||||
SET_MODEL( ENT( pev ), "models/w_9mmARclip.mdl" );
|
||||
CBasePlayerAmmo::Spawn();
|
||||
}
|
||||
void Precache( void )
|
||||
{
|
||||
PRECACHE_MODEL( "models/w_9mmARclip.mdl" );
|
||||
if( FClassnameIs( pev, "weapon_bloodly_9mmAR" ) )
|
||||
PRECACHE_MODEL( "models/w_bloodly_9mmAR.mdl" );
|
||||
else
|
||||
PRECACHE_MODEL( "models/w_9mmARclip.mdl" );
|
||||
PRECACHE_SOUND( "items/9mmclip1.wav" );
|
||||
}
|
||||
BOOL AddAmmo( CBaseEntity *pOther )
|
||||
@ -300,6 +306,7 @@ class CMP5AmmoClip : public CBasePlayerAmmo
|
||||
}
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( weapon_bloodly_9mmAR, CMP5AmmoClip )
|
||||
LINK_ENTITY_TO_CLASS( ammo_mp5clip, CMP5AmmoClip )
|
||||
LINK_ENTITY_TO_CLASS( ammo_9mmAR, CMP5AmmoClip )
|
||||
|
||||
|
@ -370,12 +370,18 @@ class CShotgunAmmo : public CBasePlayerAmmo
|
||||
void Spawn( void )
|
||||
{
|
||||
Precache();
|
||||
SET_MODEL( ENT( pev ), "models/w_shotbox.mdl" );
|
||||
if( FClassnameIs( pev, "weapon_bloodly_9mmAR" ) )
|
||||
SET_MODEL( ENT( pev ), "models/w_bloodly_shotgun.mdl" );
|
||||
else
|
||||
SET_MODEL( ENT( pev ), "models/w_shotbox.mdl" );
|
||||
CBasePlayerAmmo::Spawn();
|
||||
}
|
||||
void Precache( void )
|
||||
{
|
||||
PRECACHE_MODEL( "models/w_shotbox.mdl" );
|
||||
if( FClassnameIs( pev, "weapon_bloodly_9mmAR" ) )
|
||||
PRECACHE_MODEL( "models/w_bloodly_shotgun.mdl" );
|
||||
else
|
||||
PRECACHE_MODEL( "models/w_shotbox.mdl" );
|
||||
PRECACHE_SOUND( "items/9mmclip1.wav" );
|
||||
}
|
||||
BOOL AddAmmo( CBaseEntity *pOther )
|
||||
@ -389,4 +395,5 @@ class CShotgunAmmo : public CBasePlayerAmmo
|
||||
}
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( weapon_bloodly_shotgun, CShotgunAmmo )
|
||||
LINK_ENTITY_TO_CLASS( ammo_buckshot, CShotgunAmmo )
|
||||
|
@ -304,6 +304,7 @@ void W_Precache( void )
|
||||
// shotgun
|
||||
UTIL_PrecacheOtherWeapon( "weapon_shotgun" );
|
||||
UTIL_PrecacheOther( "ammo_buckshot" );
|
||||
UTIL_PrecacheOther( "weapon_bloodly_shotgun" );
|
||||
|
||||
// crowbar
|
||||
UTIL_PrecacheOtherWeapon( "weapon_crowbar" );
|
||||
@ -311,11 +312,13 @@ void W_Precache( void )
|
||||
// glock
|
||||
UTIL_PrecacheOtherWeapon( "weapon_9mmhandgun" );
|
||||
UTIL_PrecacheOther( "ammo_9mmclip" );
|
||||
UTIL_PrecacheOther( "weapon_silencer" );
|
||||
|
||||
// mp5
|
||||
UTIL_PrecacheOtherWeapon( "weapon_9mmAR" );
|
||||
UTIL_PrecacheOther( "ammo_9mmAR" );
|
||||
UTIL_PrecacheOther( "ammo_ARgrenades" );
|
||||
UTIL_PrecacheOther( "weapon_bloodly_9mmAR" );
|
||||
|
||||
// 9mm ammo box
|
||||
UTIL_PrecacheOther( "ammo_9mmbox" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user