Interface to the fire command handler.
struct IFireCommandHandler { };
IAgent.h
virtual ~IFireCommandHandler();
virtual void DebugDraw() = 0;
Draws debug information.
virtual void GetMemoryUsage(ICrySizer * pSizer) const;
Gets the name identifier of the handler.
virtual const char* GetName() = 0;
virtual bool GetOverrideAimingPosition(Vec3& overrideAimingPosition) const;
virtual void GetProjectileInfo(SFireCommandProjectileInfo & info) const;
Used by fire command handler to fill in information about projectiles to be fired by the AI
virtual int GetShotCount() const = 0;
Returns how many shots were done.
virtual float GetTimeToNextShot() const = 0;
If this firemode has a pause timer i.e. burst pause, this should return the current value of that timer or if the fire mode has a slow fire rate i.e. rocket launcher it should return the fire timer - 0 otherwise
Reloads a weapon.
virtual void OnReload() = 0;
Called whenever weapon is reloaded.
Shot event function.
virtual void OnShoot() = 0;
Called whenever shot is done (if weapon descriptor defines EnableWeaponListener).
virtual void Release() = 0;
Deletes the handler.
virtual void Reset() = 0;
Reset is called each time.
virtual EAIFireState Update(IAIObject* pTarget, bool canFire, EFireMode fireMode, const AIWeaponDescriptor& descriptor, Vec3& outShootTargetPos) = 0;
Update is called on each AI update when the target is valid.
virtual bool UseDefaultEffectFor(EFireMode fireMode) const = 0;
Returns true if default effect should be used for special firemode.
virtual bool ValidateFireDirection(const Vec3& fireVector, bool mustHit) = 0;
Checks if it's ok to shoot with this weapon in fireVector - to see if no friends are hit, no ostacles nearby hit, etc.