Fix some misprints and mistakes in code, part 2 (#1021)
* Fix compiler warnings about broken syntax Revert "Fix compiler warnings about broken syntax" This reverts commit cd0649806feaab064e93a0fbcd1f4488747f9b79. Unbreak code * Unbreak code * Stop breaking code, please * Small real unused check * Fix "breaked" code and fix MAX_WEAPONS misprints * Compiler break in debug mode if passing upper case strings
This commit is contained in:
@ -434,7 +434,7 @@ void CPlayer::WeaponsCheck(int weapons)
|
||||
int old;
|
||||
int cur;
|
||||
|
||||
for(int i = 1; i < MAX_WEAPONS; ++i)
|
||||
for(int i = 1; i < DODMAX_WEAPONS; ++i)
|
||||
{
|
||||
// Check to see we are not talking about a grenade and we have changed
|
||||
if(i != 13 && i != 14 && i != 15 && i != 16 && i != 36)
|
||||
|
@ -263,7 +263,7 @@ static cell AMX_NATIVE_CALL dod_weapon_type(AMX *amx, cell *params) /* 2 params
|
||||
{
|
||||
int weaponsbit = pPlayer->pEdict->v.weapons & ~(1<<31); // don't count last element
|
||||
|
||||
for(int x = 1; x < MAX_WEAPONS; ++x)
|
||||
for(int x = 1; x < DODMAX_WEAPONS; ++x)
|
||||
{
|
||||
if((weaponsbit&(1<<x)) > 0)
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ void Client_AmmoX(void* mValue)
|
||||
case 1:
|
||||
if (!mPlayer )
|
||||
break;
|
||||
for(int i = 1; i < MAX_WEAPONS ; ++i)
|
||||
for(int i = 1; i < DODMAX_WEAPONS ; ++i)
|
||||
{
|
||||
if (iAmmo == weaponData[i].ammoSlot)
|
||||
mPlayer->weapons[i].ammo = *(int*)mValue;
|
||||
@ -244,7 +244,7 @@ void Client_AmmoShort(void* mValue)
|
||||
if(!mPlayer )
|
||||
break;
|
||||
|
||||
for(int i = 1; i < MAX_WEAPONS ; ++i)
|
||||
for(int i = 1; i < DODMAX_WEAPONS ; ++i)
|
||||
{
|
||||
if (iAmmo == weaponData[i].ammoSlot)
|
||||
mPlayer->weapons[i].ammo = *(int*)mValue;
|
||||
|
Reference in New Issue
Block a user