object - commandobject - platoon
void CannonFireToTarget(int nUnit, int nCannonNum, unit uTarget, int nShootCount)
Scope: private
Parameters
nUnit - unit number
nCannonNum - cannon number.
uTarget - target to which we have to shoot.
nShootCount - shoot count to fire.
Return values
none
Description
This function orders cannon number nCannonNum to fire nShootCount-shoots to object
uTarget.
If nCannonNum == -1 order is given to all cannons in tank.
If nShootCount == -1 then if uTarget is enemy then cannons fires unfinitialy (if
possible), otherwise fires only once.
If object uTarget is not in cannon range cannon will be wait until it happens.
If nUnit==-1 then order is sent to all units.