Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
801 stars 62 forks source link

Added check that weapon has ammo in reload_weapon_hotkey. #391

Closed icosahedral-dragon closed 2 years ago

icosahedral-dragon commented 2 years ago

Without this the game would try to reload weapons that did not have ammo, which could cause it to access off the end of the player ammo clips array with strange results. Addresses issue #384

Interrupt commented 2 years ago

Good find! I assume this means that vanilla system shock for DOS has this same bug?

icosahedral-dragon commented 2 years ago

Good find! I assume this means that vanilla system shock for DOS has this same bug?

Well @bangstk found it, I just poked about in the debugger a bit. (I never used that hotkey and I always set the Sparq to max power anyway.) DOS Shock and System Shock "Classic" on Steam both exhibit the bug (not surprisingly since I'm pretty sure they're the exact same thing). So it's an oldie.