[idea] Ambush command for partisans (implemented)

I have an idea how to make partisans easier to use. It will involve giving them 2 more command buttons. One will trigger the new mode, the other will cancel it.

Basically, I want to introduce an ‘Ambush’ mode for them (they are ‘Very light ambushers’ after all). In this mode, rifle weapon will be locked out, and only grenades (molotov) will be active. This should in theory allow to make much more efficient ambushes for vehicles - one halftrack moving in front of a tank group will not draw rifle fire anymore, and will not cause the partisans to uncloak too early because of that. They will only uncloak when in grenade range, which will be too late for the enemy :smiling_imp:

How is that supposed to work: a new gloval var called bAmbush will be added to partisan script. It will be set to TRUE/FALSE by a function called from custom buttons. Then something like this will be added to the start of AimWeapon1 (weapon1 is the rifle): if (bAmbush) {return FALSE;}
As far as I understand infantry code, this will work.

Problem is, AimWeapon1 is in common infantry includes. I can modify it there and use #defines to control the new function (so it doesn’t mess up other infantry scripts), but I’m not sure that’s the right way to go. So I ask 2 things:

  1. Does this idea seem good?
  2. (this one probably to Nemo) Do you see anything in there that can break other infantry stuff?

Edit. After messing with the files some more, I decided to just implement the idea. It shouldn’t affect other units in any way - everything ambush-specific is in #define block that is only called by partisan script.

That is pretty cool, Yuri.