sudasana / armcom2

Armoured Commander II
104 stars 13 forks source link

Sight Range after taking Light or Serious wounds #15

Closed Edward-O closed 4 years ago

Edward-O commented 4 years ago

I'm not sure about this since It was my first playthrough but.

When I was playing France I thought that spotting sight range was only 1 tile unless you opened the hatch.

After my commander took Light wounds he could only see 1 tile with it both open and closed. He took about 8 battles to heal (is 5 grit considered low?) but when he did he could still only see 1 tile .

I spent several days only spotting with the Driver (R35), who took serious wounds (and thus also had a 1 tile reduction) but, later he fully died and I abandonded the tank.

When I took a new tank(S35), the new Driver could not spot with the hatch open even though he was unwounded.

I hate to post an issue without providing a save file, but I think I can purposely get injured and see if it happens again.

Edward-O commented 4 years ago

I mailed you a save file of a new game (Poland) where I intentionally got the driver killed.

This save file has a Commander who cannot spot and has never been injured. I had a theory that the problem with my French game was that the injuries from my old crew were being applied to my new crew after they died and were replaced, but this Poland game is a lot stranger - the Driver could still spot at full range while he had a Serious Wound, and after he died and was replaced, the new Driver also had full spotting range.... but suddenly the Commander (who has NEVER opened his hatch or been injured) has the "injured" spotting range.

I'm stumped with theories and I think diving into the code is the only way to get to the bottom of this one

sudasana commented 4 years ago

This is an interesting bug because the calculation for spotting hex range (UpdateVisibleHexes) does not take injuries or negative statuses into account. Have you tried changing the current command of the crewman? Some commands can restrict spotting for that turn.

I'll need your savegame.dir file as well to open your save for testing.

sudasana commented 4 years ago

Should be fixed now, and will fix a number of other related problems that would have occured after crew transferred to a new tank.

Thanks very much!