Browse Source

Fix some mistakes with sniper rifle.

visitors
Night Owl 8 years ago
parent
commit
86fb9e4624
  1. 2
      dlls/hornetgun.cpp
  2. 10
      dlls/visitors/sniper.cpp
  3. 2
      dlls/weapons.h

2
dlls/hornetgun.cpp

@ -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;

10
dlls/visitors/sniper.cpp

@ -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)
{ {

2
dlls/weapons.h

@ -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…
Cancel
Save