Dear Ubisoft: How to Fix "The Division"
Example Solution:
#ifndef __ALLOW_HACKS__
#define MAX_AMMO 32
static const int ammo[MAX_AMMO+1] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32};
static int const* current_ammo = NULL;
...
void shoot() {
if (NULL == current_ammo) {
// handle error
} else {
if (ammo == current_ammo) {
reload();
current_ammo = ammo+MAX_AMMO;
} else {
current_ammo--;
}
}
}
...
#endif /* __ALLOW_HACKS__ */
And there ya go. no more hack engine problems!
edit: thanks to u/bonnici for the ALLOW_HACKS tip
Posted Apr 30, 2016, 1:08 AM UTC · edited
You forgot to set ALLOW_HACKS to false.
fix'd