Closed shamazmazum closed 4 years ago
The oob comment and check was added by me in response to Issue #265.
I presume the two uses of the memory location do get mixed up somehow, leading to the crash mentioned in the issue. It may be related to use of the cheat command to obtain weapons (which overwrite slots haphazardly) and doesn't occur in normal gameplay.
Uh, sorry, @donnierussellii. I think I skipped git blame
for this one. I'll see how #265 can be reproduced
@donnierussellii About cheat codes, you are right! Great thinking!
Just after starting the game, press CTRL+2
. You'll see something like this:
Compare with the screenshot in #265. You'll see the same weapon set, which means the reporter is a cheater ;) Also the weapons obtained with CTRL+2
cannot be removed from the inventory and also use wrong ammo type. Again, a rail gun is loaded with magcarts.
I'll create an issue for this.
Hello. If you reload a weapon with the last clip, you will not able to unload and then load it again (the remaining ammo disappears). Also it can be rendered incorrectly in HUD (screenshot shows a railgun loaded with magcarts).![20200420_10h42m33s_grim](https://user-images.githubusercontent.com/812069/79753399-89a87e80-831e-11ea-851e-4b3d5752e389.png)
The problem is caused by incorrect check in
mfd_weapon_expose_projectile()
. A comment before that check seems to be incorrect. Tested it by swapping weapons of different type (pistol/automatic/beam) in weapon slots in all possible combinations, all seem to be OK.