Master Marksman not activitating upon death of nearby enemies

So this is either a very old bug or a variation of a (partially fixed) old bug. For example, I found this on the forums from 2019:

Master Marksmen gets deactivated on dead enemy bodies

Whatever was patched since release in relation to this problem, it is hard to say. But in the current version you can get MM activated within 10 tiles of dead enemies, even enemies that were killed on the same turn. The problem is this: first you have to clear the area around a sniper of proximate enemies (correct so far…), and then a friendly character has to move in order for MM to activate on the sniper or snipers (…the part that is still bugged). I ran a test and this difference is not merely cosmetic, i.e. MM is working but the game doesn’t say so. This is not the case. The weapon becomes significantly more accurate after a friendly character moves. Most the time it doesn’t dramatically effect gameplay as long you are aware of the issue and are taking steps to work around it. But I’m sure if you put your mind to it you could come up with situations where this would forcibly produce sub-optimal play. For example, your only other remaining move is a soldier pinned down by overwatch which you need the sniper shot for to disable the arm and clearing the overwatch, a shot which would could potentially be 30% more accurate if it worked correctly. So it is clear that in its code the game does some type of assessment whenever a character moves and so solution here to have it also run the same assessment whenever a unit dies.

Here is a documented example from a haven defense mission:

No MM and I target a nearby enemy for comparison.

I move an assault (not pictured), using up the rest of his AP. No shots are taken, no enemies are killed, and no special abilities are used. After moving the assault, MM appears on the sniper.

And finally you can see the reticle is noticeably smaller by comparing the 2nd and 4th images.

1 Like

Probably it is that because game check enemy position only during movement. So all statuses which are dependant on these ranges are checked only then.

They would probably need to add another layer of these checks after performing ANY action, not just during the move. Question is how much it would lower the performance.

Right I glossed over a lot when I wrote “also run the same assessment whenever a unit dies”. I wouldn’t want to lower performance or worse have them introduce a bunch of redundant code all of which would have to be maintained. Hopefully, everything the game has to be aware of has been rendered into a tight, coherent set of functions that each event type only runs what is strictly necessary. Although I suppose “check everything on everything” has the advantage of being straightforward.

It all depends on what “check everything on everything” actually means. Most likely we are talking on checking variables on memory, or something that involves a simple instruction or constant set of simple instructions. People tend to forget that a modern CPU can perform millions of floating point operations per second, while the GPU is also performing millions of operations per second. Each one doing a lot of work in parallel. What do you think the overhead on performing 100 extra simple operations every minute actually means for a computer?

Nowadays, more efficient programing has often more drawbacks than benefits. And because we now use higher level programming, that is less efficient by definition, we can also create more complex and rich games.