// Включить
for (byte skill = 25; skill != 58; skill += 11)
{
SetWeaponAccuracy(i, skill, accur); // поставить оружию разбрасываемость (ставь 10.0 или больше)
}
// Отключить
float test_GetWeaponDefaultAccuracy(byte weaponid) // получить стандартный разброс оружия (знаю говно функция)
void SetWeaponAccuracy(int weaponid, byte skill, float accuracy)
{
int addr;
addr = weaponid + skill;
addr *= 0x70;
addr += 0xC8AAB8;
addr += 0x38;
*(float*)addr = accuracy;
}
float test_GetWeaponDefaultAccuracy(byte weaponid)
{
float accur = 1.0;
switch (weaponid)
{
case 22:
accur = 1.25;
break;
case 23:
accur = 1.5;
break;
case 24:
accur = 1.25;
break;
case 25:
accur = 1.4;
break;
case 26:
accur = 0.9;
break;
case 27:
accur = 2.0;
break;
case 28:
accur = 1.1;
break;
case 29:
accur = 1.2;
break;
case 30:
accur = 1.6;
break;
case 31:
accur = 1.8;
break;
case 32:
accur = 1.1;
break;
}
return accur;
}