IFireCommandHandler

Interface to the fire command handler.

C++
struct IFireCommandHandler {
};
File

IAgent.h

IFireCommandHandler::~IFireCommandHandler Destructor
C++
IFireCommandHandler::DebugDraw Method
C++
virtual void DebugDraw() = 0;
Description

Draws debug information.

IFireCommandHandler::GetMemoryUsage Method
C++
virtual void GetMemoryUsage(ICrySizer * pSizer) const;
IFireCommandHandler::GetName Method

Gets the name identifier of the handler.

C++
virtual const char* GetName() = 0;
IFireCommandHandler::GetOverrideAimingPosition Method
C++
virtual bool GetOverrideAimingPosition(Vec3& overrideAimingPosition) const;
IFireCommandHandler::GetProjectileInfo Method
C++
virtual void GetProjectileInfo(SFireCommandProjectileInfo & info) const;
Description

Used by fire command handler to fill in information about projectiles to be fired by the AI

IFireCommandHandler::GetShotCount Method
C++
virtual int GetShotCount() const = 0;
Description

Returns how many shots were done.

IFireCommandHandler::GetTimeToNextShot Method
C++
virtual float GetTimeToNextShot() const = 0;
Description

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

IFireCommandHandler::OnReload Method

Reloads a weapon.

C++
virtual void OnReload() = 0;
Description

Called whenever weapon is reloaded.

IFireCommandHandler::OnShoot Method

Shot event function.

C++
virtual void OnShoot() = 0;
Description

Called whenever shot is done (if weapon descriptor defines EnableWeaponListener).

IFireCommandHandler::Release Method
C++
virtual void Release() = 0;
Description

Deletes the handler.

IFireCommandHandler::Reset Method
C++
virtual void Reset() = 0;
Description

Reset is called each time.

IFireCommandHandler::Update Method
C++
virtual EAIFireState Update(IAIObject* pTarget, bool canFire, EFireMode fireMode, const AIWeaponDescriptor& descriptor, Vec3& outShootTargetPos) = 0;
Description

Update is called on each AI update when the target is valid.

IFireCommandHandler::UseDefaultEffectFor Method
C++
virtual bool UseDefaultEffectFor(EFireMode fireMode) const = 0;
Description

Returns true if default effect should be used for special firemode.

IFireCommandHandler::ValidateFireDirection Method
C++
virtual bool ValidateFireDirection(const Vec3& fireVector, bool mustHit) = 0;
Description

Checks if it's ok to shoot with this weapon in fireVector - to see if no friends are hit, no ostacles nearby hit, etc.