object - commandobject - unit - tank


void CannonFireToTarget(int nCannonNum, unit uTarget, int nShootCount)

Scope: private

Parameters
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.

See also
CannonFireGround, StopCannonFire