Readable GetWeaponAccuracyFlags

This commit is contained in:
a1batross 2015-11-29 01:13:01 +03:00
parent 51cdc43a51
commit c90ca81048

View File

@ -934,20 +934,20 @@ int GetWeaponAccuracyFlags( int weaponid )
{
switch( weaponid )
{
case 8:
case 14:
case 20:
case 27:
case 28:
case 30:
case WEAPON_AUG:
case WEAPON_GALIL:
case WEAPON_M249:
case WEAPON_SG552:
case WEAPON_AK47:
case WEAPON_P90:
result = ACCURACY_AIR | ACCURACY_SPEED;
break;
case 1:
case 11:
case 26:
case WEAPON_P228:
case WEAPON_FIVESEVEN:
case WEAPON_DEAGLE:
result = ACCURACY_AIR | ACCURACY_SPEED | ACCURACY_DUCK;
break;
case 17:
case WEAPON_GLOCK18:
if( g_iWeaponFlags & WPNSTATE_GLOCK18_BURST_MODE)
{
result = ACCURACY_AIR | ACCURACY_SPEED | ACCURACY_DUCK;
@ -957,13 +957,13 @@ int GetWeaponAccuracyFlags( int weaponid )
result = ACCURACY_AIR | ACCURACY_SPEED | ACCURACY_DUCK | ACCURACY_MULTIPLY_BY_14_2;
}
break;
case 7:
case 12:
case 19:
case 23:
case WEAPON_MAC10:
case WEAPON_UMP45:
case WEAPON_MP5N:
case WEAPON_TMP:
result = ACCURACY_AIR;
break;
case 22:
case WEAPON_M4A1:
if(g_iWeaponFlags & WPNSTATE_USP_SILENCED)
{
result = ACCURACY_AIR | ACCURACY_SPEED;
@ -973,7 +973,7 @@ int GetWeaponAccuracyFlags( int weaponid )
result = ACCURACY_AIR | ACCURACY_SPEED | ACCURACY_MULTIPLY_BY_14;
}
break;
case 15:
case WEAPON_FAMAS:
if(g_iWeaponFlags & WPNSTATE_FAMAS_BURST_MODE)
{
result = ACCURACY_AIR | ACCURACY_SPEED;
@ -983,7 +983,7 @@ int GetWeaponAccuracyFlags( int weaponid )
result = ACCURACY_AIR | ACCURACY_SPEED | (1<<4);
}
break;
case 16:
case WEAPON_USP:
if(g_iWeaponFlags & WPNSTATE_USP_SILENCED)
{
result = ACCURACY_AIR | ACCURACY_SPEED | ACCURACY_DUCK;