No magic number for weapon

This commit is contained in:
def 2015-08-22 20:15:15 +02:00
parent 844d8b8ae3
commit 7ff9cd890c

View file

@ -1840,7 +1840,7 @@ void CCharacter::HandleTiles(int Index)
}
if(g_Config.m_SvTeleportLoseWeapons)
{
for(int i=1;i<NUM_WEAPONS-1;i++)
for(int i=WEAPON_GUN;i<NUM_WEAPONS-1;i++)
{
m_aWeapons[i].m_Got = false;
if(!m_FreezeTime) m_aWeapons[i].m_Ammo = -1;
@ -1869,7 +1869,7 @@ void CCharacter::HandleTiles(int Index)
}
if(g_Config.m_SvTeleportLoseWeapons)
{
for(int i=2;i<NUM_WEAPONS-1;i++)
for(int i=WEAPON_SHOTGUN;i<NUM_WEAPONS-1;i++)
{
m_aWeapons[i].m_Got = false;
if(!m_FreezeTime) m_aWeapons[i].m_Ammo = -1;
@ -2130,7 +2130,7 @@ bool CCharacter::UnFreeze()
void CCharacter::GiveAllWeapons()
{
for(int i=1;i<NUM_WEAPONS-1;i++)
for(int i=WEAPON_GUN;i<NUM_WEAPONS-1;i++)
{
m_aWeapons[i].m_Got = true;
if(!m_FreezeTime) m_aWeapons[i].m_Ammo = -1;