PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Grenade_Base Class Reference

Private Member Functions

override void OnExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 
void FlashGrenade ()
 
protected override void CreateLight ()
 
void ~FlashGrenade ()
 
void M67Grenade ()
 
void ~M67Grenade ()
 
void RGD5Grenade ()
 
void ~RGD5Grenade ()
 
void Pin ()
 
void Unpin ()
 
override void OnActivatedByTripWire ()
 DEPRECATED use OnActivatedByItem.
 
override void OnActivatedByItem (notnull ItemBase item)
 
bool IsPinned ()
 
bool IsPinnable ()
 
void ActivateImmediate ()
 
void ActivateRandomTime ()
 
void SetPinnable (bool state)
 
void SetFuseDelay (float delay)
 
void SetGrenadeType (EGrenadeType type)
 
EGrenadeType GetGrenadeType ()
 
protected void Activate ()
 
protected void Deactivate ()
 
protected override void InitiateExplosion ()
 
protected void ExplodeGrenade (EGrenadeType grenade_type)
 DEPRECATED - for backward compatibility only.
 
protected void OnPin ()
 
protected void OnUnpin ()
 
protected void OnActivateStarted ()
 
protected void OnActivateFinished ()
 
protected void OnActivateImmediate ()
 
protected void OnDeactivate ()
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override bool CanBeArmed ()
 
override bool CanBeDisarmed ()
 
override bool CanExplodeInFire ()
 
override void SetActions ()
 
override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
 
override void OnWasAttached (EntityAI parent, int slot_id)
 
void Grenade_Base ()
 
override void InitSpecificsExplosionEffectForSurface ()
 

Private Attributes

const float FX_RANGE_MAX_MULT = 1.0
 
protected const float DEFAULT_FUSE_DELAY = 10
 
protected ref Timer m_FuseTimer
 
protected float m_FuseDelay
 
protected float m_RemainingFuseTime
 
protected bool m_Pinned
 
protected bool m_Pinnable
 
protected EGrenadeType m_GrenadeType
 

Constructor & Destructor Documentation

◆ ~FlashGrenade()

void ~FlashGrenade ( )
inlineprivate

◆ ~M67Grenade()

void ~M67Grenade ( )
inlineprivate

◆ ~RGD5Grenade()

void ~RGD5Grenade ( )
inlineprivate

◆ Grenade_Base()

Member Function Documentation

◆ Activate()

protected void Activate ( )
inlineprivate

run only the remaining part (already unpinned and pinned)

References m_FuseDelay, m_FuseTimer, and m_RemainingFuseTime.

Referenced by EEItemLocationChanged().

◆ ActivateImmediate()

void ActivateImmediate ( )
inlineprivate

References OnActivateImmediate().

Referenced by ActivateRandomTime().

◆ ActivateRandomTime()

void ActivateRandomTime ( )
inlineprivate

◆ CanBeArmed()

override bool CanBeArmed ( )
inlineprivate

◆ CanBeDisarmed()

override bool CanBeDisarmed ( )
inlineprivate

◆ CanExplodeInFire()

override bool CanExplodeInFire ( )
inlineprivate

◆ CreateLight()

protected override void CreateLight ( )
inlineprivate

◆ Deactivate()

protected void Deactivate ( )
inlineprivate

◆ EEItemLocationChanged()

override void EEItemLocationChanged ( notnull InventoryLocation  oldLoc,
notnull InventoryLocation  newLoc 
)
inlineprivate

activate grenade when it leaves player hands (safety handle released)

References Activate(), and IsPinned().

◆ ExplodeGrenade()

protected void ExplodeGrenade ( EGrenadeType  grenade_type)
inlineprivate

DEPRECATED - for backward compatibility only.

References InitiateExplosion().

◆ FlashGrenade()

void FlashGrenade ( )
inlineprivate

◆ GetGrenadeType()

EGrenadeType GetGrenadeType ( )
inlineprivate

References m_GrenadeType.

Referenced by InitiateExplosion().

◆ InitiateExplosion()

protected override void InitiateExplosion ( )
inlineprivate

◆ InitSpecificsExplosionEffectForSurface()

override void InitSpecificsExplosionEffectForSurface ( )
inlineprivate

◆ IsPinnable()

bool IsPinnable ( )
inlineprivate

cannot be pinned once the fuse has started

References m_FuseTimer, and m_Pinnable.

Referenced by ActionSingleUseBase::ActionCondition().

◆ IsPinned()

bool IsPinned ( )
inlineprivate

◆ M67Grenade()

void M67Grenade ( )
inlineprivate

◆ OnActivatedByItem()

override void OnActivatedByItem ( notnull ItemBase  item)
inlineprivate

References OnActivateFinished(), and Unpin().

◆ OnActivatedByTripWire()

override void OnActivatedByTripWire ( )
private

DEPRECATED use OnActivatedByItem.

◆ OnActivateFinished()

protected void OnActivateFinished ( )
inlineprivate

◆ OnActivateImmediate()

protected void OnActivateImmediate ( )
inlineprivate

References GetGame(), and SetTakeable().

Referenced by ActivateImmediate().

◆ OnActivateStarted()

protected void OnActivateStarted ( )
private

Referenced by OnUnpin().

◆ OnDeactivate()

protected void OnDeactivate ( )
private

Referenced by Deactivate().

◆ OnExplosionEffects()

override void OnExplosionEffects ( Object  source,
Object  directHit,
int  componentIndex,
string  surface,
vector  pos,
vector  surfNormal,
float  energyFactor,
float  explosionFactor,
bool  isWater,
string  ammoType 
)
inlineprivate

values less than 1.0 make no sense

removes possible obstacles made by items around the grenade(or on the same position)

References Math::Clamp(), CGame::ConfigGetFloat(), vector::Distance(), vector::DistanceSq(), RaycastRVParams::flags, GetGame(), GetPlayer(), MAX, DayZPhysics::RaycastRVProxy(), and Math::SqrFloat().

◆ OnPin()

protected void OnPin ( )
inlineprivate

References Deactivate(), GetGame(), and m_Pinned.

Referenced by Pin().

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext  ctx,
int  version 
)
inlineprivate

References m_Pinned, and Serializer::Read().

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext  ctx)
inlineprivate

◆ OnUnpin()

protected void OnUnpin ( )
inlineprivate

References GetGame(), m_Pinned, and OnActivateStarted().

Referenced by Unpin().

◆ OnWasAttached()

override void OnWasAttached ( EntityAI  parent,
int  slot_id 
)
inlineprivate

References Deactivate().

◆ Pin()

void Pin ( )
inlineprivate

References m_Pinnable, m_Pinned, and OnPin().

Referenced by ActionSingleUseBase::OnExecute().

◆ RGD5Grenade()

void RGD5Grenade ( )
inlineprivate

◆ SetActions()

override void SetActions ( )
inlineprivate

References AddAction().

◆ SetFuseDelay()

void SetFuseDelay ( float  delay)
inlineprivate

◆ SetGrenadeType()

void SetGrenadeType ( EGrenadeType  type)
inlineprivate

◆ SetPinnable()

void SetPinnable ( bool  state)
inlineprivate

◆ Unpin()

void Unpin ( )
inlineprivate

Field Documentation

◆ DEFAULT_FUSE_DELAY

protected const float DEFAULT_FUSE_DELAY = 10
private

Referenced by Grenade_Base().

◆ FX_RANGE_MAX_MULT

const float FX_RANGE_MAX_MULT = 1.0
private

◆ m_FuseDelay

protected float m_FuseDelay
private

Referenced by Activate(), and SetFuseDelay().

◆ m_FuseTimer

protected ref Timer m_FuseTimer
private

◆ m_GrenadeType

protected EGrenadeType m_GrenadeType
private

Referenced by GetGrenadeType(), and SetGrenadeType().

◆ m_Pinnable

protected bool m_Pinnable
private

Referenced by IsPinnable(), Pin(), and SetPinnable().

◆ m_Pinned

◆ m_RemainingFuseTime

protected float m_RemainingFuseTime
private

Referenced by Activate(), Deactivate(), and Grenade_Base().


The documentation for this class was generated from the following files: