mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-03-12 13:31:33 +00:00
Fix some mistakes with sniper rifle.
This commit is contained in:
parent
9230dbcf1a
commit
86fb9e4624
@ -98,7 +98,7 @@ int CHgun::GetItemInfo( ItemInfo *p )
|
|||||||
p->iMaxAmmo2 = -1;
|
p->iMaxAmmo2 = -1;
|
||||||
p->iMaxClip = WEAPON_NOCLIP;
|
p->iMaxClip = WEAPON_NOCLIP;
|
||||||
p->iSlot = 3;
|
p->iSlot = 3;
|
||||||
p->iPosition = 3;
|
p->iPosition = 2;
|
||||||
p->iId = m_iId = WEAPON_HORNETGUN;
|
p->iId = m_iId = WEAPON_HORNETGUN;
|
||||||
p->iFlags = ITEM_FLAG_NOAUTOSWITCHEMPTY | ITEM_FLAG_NOAUTORELOAD;
|
p->iFlags = ITEM_FLAG_NOAUTOSWITCHEMPTY | ITEM_FLAG_NOAUTORELOAD;
|
||||||
p->iWeight = HORNETGUN_WEIGHT;
|
p->iWeight = HORNETGUN_WEIGHT;
|
||||||
|
@ -38,10 +38,10 @@ int CSniper::GetItemInfo(ItemInfo *p)
|
|||||||
p->iMaxAmmo1 = _357_MAX_CARRY;
|
p->iMaxAmmo1 = _357_MAX_CARRY;
|
||||||
p->pszAmmo2 = NULL;
|
p->pszAmmo2 = NULL;
|
||||||
p->iMaxAmmo2 = -1;
|
p->iMaxAmmo2 = -1;
|
||||||
p->iMaxClip = CROSSBOW_MAX_CLIP;
|
p->iMaxClip = SNIPER_MAX_CLIP;
|
||||||
p->iFlags = 0;
|
p->iFlags = 0;
|
||||||
p->iSlot = 2;
|
p->iSlot = 3;
|
||||||
p->iPosition = 3;
|
p->iPosition = 1;
|
||||||
p->iId = m_iId = WEAPON_SNIPER;
|
p->iId = m_iId = WEAPON_SNIPER;
|
||||||
p->iWeight = PYTHON_WEIGHT;
|
p->iWeight = PYTHON_WEIGHT;
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ void CSniper::Spawn()
|
|||||||
m_iId = WEAPON_SNIPER;
|
m_iId = WEAPON_SNIPER;
|
||||||
SET_MODEL(ENT(pev), "models/w_sniper.mdl");
|
SET_MODEL(ENT(pev), "models/w_sniper.mdl");
|
||||||
|
|
||||||
m_iDefaultAmmo = CROSSBOW_DEFAULT_GIVE;
|
m_iDefaultAmmo = SNIPER_DEFAULT_GIVE;
|
||||||
|
|
||||||
FallInit();// get ready to fall down.
|
FallInit();// get ready to fall down.
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ void CSniper::Reload(void)
|
|||||||
if (m_pPlayer->ammo_357 <= 0)
|
if (m_pPlayer->ammo_357 <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int iResult = DefaultReload(CROSSBOW_MAX_CLIP, SNIPER_RELOAD, 2.0);
|
int iResult = DefaultReload(SNIPER_MAX_CLIP, SNIPER_RELOAD, 2.0);
|
||||||
|
|
||||||
if (iResult)
|
if (iResult)
|
||||||
{
|
{
|
||||||
@ -236,4 +236,4 @@ class CSniperAmmoClip : public CBasePlayerAmmo
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
LINK_ENTITY_TO_CLASS(ammo_sniper, CSniperAmmoClip);
|
LINK_ENTITY_TO_CLASS(ammo_sniper, CSniperAmmoClip);
|
||||||
|
@ -137,6 +137,7 @@ public:
|
|||||||
#define SATCHEL_MAX_CLIP WEAPON_NOCLIP
|
#define SATCHEL_MAX_CLIP WEAPON_NOCLIP
|
||||||
#define TRIPMINE_MAX_CLIP WEAPON_NOCLIP
|
#define TRIPMINE_MAX_CLIP WEAPON_NOCLIP
|
||||||
#define SNARK_MAX_CLIP WEAPON_NOCLIP
|
#define SNARK_MAX_CLIP WEAPON_NOCLIP
|
||||||
|
#define SNIPER_MAX_CLIP 3
|
||||||
|
|
||||||
// the default amount of ammo that comes with each gun when it spawns
|
// the default amount of ammo that comes with each gun when it spawns
|
||||||
#define GLOCK_DEFAULT_GIVE 17
|
#define GLOCK_DEFAULT_GIVE 17
|
||||||
@ -154,6 +155,7 @@ public:
|
|||||||
#define TRIPMINE_DEFAULT_GIVE 1
|
#define TRIPMINE_DEFAULT_GIVE 1
|
||||||
#define SNARK_DEFAULT_GIVE 5
|
#define SNARK_DEFAULT_GIVE 5
|
||||||
#define HIVEHAND_DEFAULT_GIVE 8
|
#define HIVEHAND_DEFAULT_GIVE 8
|
||||||
|
#define SNIPER_DEFAULT_GIVE 3
|
||||||
|
|
||||||
// The amount of ammo given to a player by an ammo item.
|
// The amount of ammo given to a player by an ammo item.
|
||||||
#define AMMO_URANIUMBOX_GIVE 20
|
#define AMMO_URANIUMBOX_GIVE 20
|
||||||
|
Loading…
x
Reference in New Issue
Block a user