Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
Grenade_Base Class Reference
Inheritance diagram for Grenade_Base:
Grenade_ChemGas

Protected Member Functions

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

Protected Attributes

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

Private Member Functions

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

Private Attributes

const float FX_RANGE_MAX_MULT = 1.0

Detailed Description

Definition at line 1 of file flashgrenade.c.

Constructor & Destructor Documentation

◆ ~FlashGrenade()

void ~FlashGrenade ( )
inlineprotected

Definition at line 92 of file flashgrenade.c.

◆ ~M67Grenade()

void ~M67Grenade ( )
inlineprivate

Definition at line 10 of file m67grenade.c.

◆ ~RGD5Grenade()

void ~RGD5Grenade ( )
inlineprivate

Definition at line 10 of file rgd5grenade.c.

◆ Grenade_Base()

void Grenade_Base ( )
inlineprotected

Member Function Documentation

◆ Activate()

void Activate ( )
inlineprotected

run only the remaining part (already unpinned and pinned)

Definition at line 122 of file grenade_base.c.

References m_FuseDelay, m_FuseTimer, and m_RemainingFuseTime.

Referenced by EEItemLocationChanged().

◆ ActivateImmediate()

void ActivateImmediate ( )
inlineprotected

Definition at line 90 of file grenade_base.c.

References OnActivateImmediate().

Referenced by ActivateRandomTime().

◆ ActivateRandomTime()

void ActivateRandomTime ( )
inlineprotected

to millis

Definition at line 95 of file grenade_base.c.

References ActivateImmediate(), CALL_CATEGORY_GAMEPLAY, g_Game, and Math::RandomFloat().

◆ CanBeArmed()

override bool CanBeArmed ( )
inlineprotected

Definition at line 250 of file grenade_base.c.

◆ CanBeDisarmed()

override bool CanBeDisarmed ( )
inlineprotected

Definition at line 255 of file grenade_base.c.

◆ CanExplodeInFire()

override bool CanExplodeInFire ( )
inlineprotected

Definition at line 260 of file grenade_base.c.

◆ CreateLight()

override void CreateLight ( )
inlineprotected

Definition at line 87 of file flashgrenade.c.

References FlashGrenadeLight(), GetPosition(), and m_Light.

◆ Deactivate()

void Deactivate ( )
inlineprotected

Definition at line 141 of file grenade_base.c.

References m_FuseTimer, m_RemainingFuseTime, and OnDeactivate().

Referenced by OnPin(), and OnWasAttached().

◆ EEItemLocationChanged()

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

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

Definition at line 273 of file grenade_base.c.

References Activate(), and IsPinned().

◆ ExplodeGrenade()

void ExplodeGrenade ( EGrenadeType grenade_type)
inlineprotected

DEPRECATED - for backward compatibility only.

Definition at line 171 of file grenade_base.c.

References InitiateExplosion().

◆ FlashGrenade()

void FlashGrenade ( )
inlineprivate

◆ GetGrenadeType()

EGrenadeType GetGrenadeType ( )
inlineprotected

Definition at line 117 of file grenade_base.c.

References m_GrenadeType.

Referenced by InitiateExplosion().

◆ InitiateExplosion()

override void InitiateExplosion ( )
inlineprotected

Definition at line 151 of file grenade_base.c.

References Explode(), GetGrenadeType(), m_AmmoTypes, and OnExplode().

Referenced by ExplodeGrenade().

◆ InitSpecificsExplosionEffectForSurface()

override void InitSpecificsExplosionEffectForSurface ( )
inlineprotected

◆ IsPinnable()

bool IsPinnable ( )
inlineprotected

cannot be pinned once the fuse has started

Definition at line 79 of file grenade_base.c.

References m_FuseTimer, and m_Pinnable.

Referenced by ActionSingleUseBase::ActionCondition().

◆ IsPinned()

bool IsPinned ( )
inlineprotected

Definition at line 74 of file grenade_base.c.

References m_Pinned.

Referenced by ActionSingleUseBase::ActionCondition(), and EEItemLocationChanged().

◆ M67Grenade()

void M67Grenade ( )
inlineprivate

Definition at line 3 of file m67grenade.c.

References ParticleList::M67, SetAmmoType(), SetFuseDelay(), and SetParticleExplosion().

◆ OnActivatedByItem()

override void OnActivatedByItem ( notnull ItemBase item)
inlineprotected

Definition at line 63 of file grenade_base.c.

References OnActivateFinished(), and Unpin().

◆ OnActivatedByTripWire()

override void OnActivatedByTripWire ( )
protected

DEPRECATED use OnActivatedByItem.

◆ OnActivateFinished()

void OnActivateFinished ( )
inlineprotected

Definition at line 201 of file grenade_base.c.

References g_Game, and SetTakeable().

Referenced by Grenade_ChemGas::EOnContact(), and OnActivatedByItem().

◆ OnActivateImmediate()

void OnActivateImmediate ( )
inlineprotected

Definition at line 210 of file grenade_base.c.

References g_Game, and SetTakeable().

Referenced by ActivateImmediate().

◆ OnActivateStarted()

void OnActivateStarted ( )
protected

Referenced by OnUnpin().

◆ OnDeactivate()

void OnDeactivate ( )
protected

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)

Definition at line 5 of file flashgrenade.c.

References Math::Clamp(), vector::Distance(), vector::DistanceSq(), RaycastRVParams::flags, FX_RANGE_MAX_MULT, g_Game, DayZPhysics::RaycastRVProxy(), and Math::SqrFloat().

◆ OnPin()

void OnPin ( )
inlineprotected

Definition at line 176 of file grenade_base.c.

References Deactivate(), g_Game, and m_Pinned.

Referenced by Pin().

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

Definition at line 231 of file grenade_base.c.

References m_Pinned, and Serializer::Read().

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected

Definition at line 221 of file grenade_base.c.

References g_Game, m_Pinned, and Serializer::Write().

◆ OnUnpin()

void OnUnpin ( )
inlineprotected

Definition at line 188 of file grenade_base.c.

References g_Game, m_Pinned, and OnActivateStarted().

Referenced by Unpin().

◆ OnWasAttached()

override void OnWasAttached ( EntityAI parent,
int slot_id )
inlineprotected

Definition at line 284 of file grenade_base.c.

References Deactivate().

◆ Pin()

void Pin ( )
inlineprotected

Definition at line 44 of file grenade_base.c.

References m_Pinnable, m_Pinned, and OnPin().

Referenced by ActionSingleUseBase::OnExecute().

◆ RGD5Grenade()

void RGD5Grenade ( )
inlineprivate

Definition at line 3 of file rgd5grenade.c.

References ParticleList::RGD5, SetAmmoType(), SetFuseDelay(), and SetParticleExplosion().

◆ SetActions()

override void SetActions ( )
inlineprotected

Definition at line 265 of file grenade_base.c.

References AddAction().

◆ SetFuseDelay()

void SetFuseDelay ( float delay)
inlineprotected

Definition at line 107 of file grenade_base.c.

References m_FuseDelay.

Referenced by Grenade_Base(), FlashGrenade(), M67Grenade(), and RGD5Grenade().

◆ SetGrenadeType()

void SetGrenadeType ( EGrenadeType type)
inlineprotected

Definition at line 112 of file grenade_base.c.

References m_GrenadeType.

Referenced by Grenade_Base(), Grenade_ChemGas::Grenade_ChemGas(), and FlashGrenade().

◆ SetPinnable()

void SetPinnable ( bool state)
inlineprotected

Definition at line 102 of file grenade_base.c.

References m_Pinnable.

Referenced by Grenade_Base(), and Grenade_ChemGas::Grenade_ChemGas().

◆ Unpin()

void Unpin ( )
inlineprotected

Definition at line 52 of file grenade_base.c.

References m_Pinned, and OnUnpin().

Referenced by OnActivatedByItem(), and ActionSingleUseBase::OnExecute().

Field Documentation

◆ DEFAULT_FUSE_DELAY

const float DEFAULT_FUSE_DELAY = 10
protected

Definition at line 32 of file grenade_base.c.

Referenced by Grenade_Base().

◆ FX_RANGE_MAX_MULT

const float FX_RANGE_MAX_MULT = 1.0
private

Definition at line 3 of file flashgrenade.c.

Referenced by OnExplosionEffects().

◆ m_FuseDelay

float m_FuseDelay
protected

Definition at line 35 of file grenade_base.c.

Referenced by Activate(), and SetFuseDelay().

◆ m_FuseTimer

ref Timer m_FuseTimer
protected

Definition at line 34 of file grenade_base.c.

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

◆ m_GrenadeType

EGrenadeType m_GrenadeType
protected

Definition at line 42 of file grenade_base.c.

Referenced by GetGrenadeType(), and SetGrenadeType().

◆ m_Pinnable

bool m_Pinnable
protected

Definition at line 39 of file grenade_base.c.

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

◆ m_Pinned

◆ m_RemainingFuseTime

float m_RemainingFuseTime
protected

Definition at line 36 of file grenade_base.c.

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


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