View Issue Details

IDProjectCategoryView StatusLast Update
0006035Source patchesMulti Theft Auto : San Andreaspublic2011-08-06 12:36
ReporterarranTunaAssigned Toccw 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.1Fixed in Version1.1 
Summary0006035: Patch for #5987 (takeWeapon / takeWeaponAmmo can result in having negative ammo)
Description

The problem was that the check on the ammo count after taking it away from the current ammo was that the if statement could never be true. That is because the variable was unsigned so it could never be less than zero! Instead their ammo ended up more like 65535.

So I've fixed that, the source patch compares the current ammo with the amount you want to take away of course if the amount being taken away is greater than the current ammo its going to end up negative, so make it zero. It also makes the value returned by getPedTotalAmmo zero.

TagsNo tags attached.

Issue History

Date Modified Username Field Change