Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
trapbase.c File Reference

Go to the source code of this file.

Enumerations

enum  SoundTypeTrap { ACTIVATING = 5 }
 

Functions

void TrapBase ()
 
void OnUpdate (EntityAI victim)
 
TrapTrigger GetTrapTrigger ()
 
override void OnVariablesSynchronized ()
 this event is called all variables are synchronized on client
 
override void EEDelete (EntityAI parent)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
bool IsActive ()
 
bool IsInactive ()
 
override bool IsTakeable ()
 
bool IsActivable ()
 
bool IsPlaceable ()
 
bool IsPlaceableAtPosition (vector position)
 
void Disarm ()
 
void OnDisarm ()
 also called from RPC on client
 
void SnapOnObject (EntityAI victim)
 
void RemoveFromObject (EntityAI victim)
 
void OnSteppedOn (EntityAI victim)
 
void OnSteppedOut (EntityAI victim)
 
void Synch (EntityAI victim)
 keeping "step" here for consistency only
 
override void OnRPC (PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
 
void RefreshState ()
 
void SetupTrap ()
 
void SetupTrapPlayer (PlayerBase player, bool set_position=true)
 
void AddDefect ()
 
void SetActive ()
 
void OnActivate ()
 
void StartActivate (PlayerBase player)
 
void StartDeactivate (PlayerBase player)
 
void SetInactive (bool stop_timer=true)
 
void CreateTrigger ()
 
void DeleteTrigger ()
 
void DeferredEnableTrigger ()
 
override void OnItemLocationChanged (EntityAI old_owner, EntityAI new_owner)
 
override void EEItemAttached (EntityAI item, string slot_name)
 
override void EEItemDetached (EntityAI item, string slot_name)
 
override void OnPlacementComplete (Man player, vector position="0 0 0", vector orientation="0 0 0")
 
override bool CanPutInCargo (EntityAI parent)
 
override bool CanPutIntoHands (EntityAI parent)
 
override bool CanRemoveFromHands (EntityAI parent)
 
override bool CanBePlaced (Man player, vector position)
 
bool CanBeClapped ()
 DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem.
 
bool CanBeDisarmed ()
 
void SetDisarmed (bool disarmed)
 DEPRECATED.
 
bool GetDisarmed ()
 DEPRECATED.
 
override void SetActions ()
 
EntityAI GetClosestCarWheel (EntityAI victim)
 
void DamageClothing (PlayerBase player)
 
void PlayDeployLoopSound ()
 
void StopDeployLoopSound ()
 DEPRECATED.
 

Variables

enum SoundTypeTrap SPAWN_FLAGS = ECE_LOCAL
 
const int DAMAGE_TRIGGER_MINE = 75
 
const float UPDATE_TIMER_INTERVAL = 0.05
 
float m_InitWaitTime
 
bool m_NeedActivation
 
float m_DefectRate
 
float m_DamagePlayers
 
float m_DamageOthers
 
bool m_AddActivationDefect
 
bool m_AddDeactivationDefect
 
bool m_IsActive
 
bool m_IsInProgress
 
bool m_Disarmed = false
 
bool m_WasActivatedOrDeactivated
 DEPRECATED Used for explosive traps to prevent detonation after destroying through disarm action.
 
string m_AnimationPhaseGrounded
 
string m_AnimationPhaseSet
 
string m_AnimationPhaseTriggered
 
string m_InfoSetup
 
string m_InfoDeactivated
 
string m_InfoDamageManipulation
 
string m_InfoDamage
 
string m_InfoActivationTime
 
ref Timer m_Timer
 
ref Timer m_UpdateTimer
 
TrapTrigger m_TrapTrigger
 
ref array< intm_ClothingDmg
 
ref EffectSound m_DeployLoopSound
 DEPRECATED.
 

Enumeration Type Documentation

◆ SoundTypeTrap

Enumerator
ACTIVATING 

Definition at line 1 of file trapbase.c.

Function Documentation

◆ AddDefect()

void AddDefect ( )
protected

Definition at line 406 of file trapbase.c.

◆ CanBeClapped()

bool CanBeClapped ( )
protected

DEPRECATED Set if trap can be disarmed using ActionClapBearTrapWithThisItem.

Definition at line 588 of file trapbase.c.

◆ CanBeDisarmed()

bool CanBeDisarmed ( )
protected

Definition at line 594 of file trapbase.c.

◆ CanBePlaced()

override bool CanBePlaced ( Man player,
vector position )
protected

Definition at line 582 of file trapbase.c.

◆ CanPutInCargo()

override bool CanPutInCargo ( EntityAI parent)
protected

Definition at line 557 of file trapbase.c.

◆ CanPutIntoHands()

override bool CanPutIntoHands ( EntityAI parent)
protected

Definition at line 567 of file trapbase.c.

◆ CanRemoveFromHands()

override bool CanRemoveFromHands ( EntityAI parent)
protected

Definition at line 577 of file trapbase.c.

◆ CreateTrigger()

void CreateTrigger ( )
protected

Definition at line 475 of file trapbase.c.

◆ DamageClothing()

void DamageClothing ( PlayerBase player)
protected

Definition at line 664 of file trapbase.c.

◆ DeferredEnableTrigger()

void DeferredEnableTrigger ( )
protected

Definition at line 497 of file trapbase.c.

◆ DeleteTrigger()

void DeleteTrigger ( )
protected

Definition at line 488 of file trapbase.c.

◆ Disarm()

void Disarm ( )
protected

Definition at line 204 of file trapbase.c.

◆ EEDelete()

override void EEDelete ( EntityAI parent)
protected

Definition at line 100 of file trapbase.c.

◆ EEItemAttached()

override void EEItemAttached ( EntityAI item,
string slot_name )
protected

Definition at line 528 of file trapbase.c.

◆ EEItemDetached()

override void EEItemDetached ( EntityAI item,
string slot_name )
protected

Definition at line 536 of file trapbase.c.

◆ GetClosestCarWheel()

EntityAI GetClosestCarWheel ( EntityAI victim)
protected

carscript specific handling (not all traps are uses this)

ruined wheel, bail out

ignore all spare wheel

actual, healthy wheel, let it pass

Definition at line 623 of file trapbase.c.

◆ GetDisarmed()

bool GetDisarmed ( )
protected

DEPRECATED.

Definition at line 606 of file trapbase.c.

◆ GetTrapTrigger()

TrapTrigger GetTrapTrigger ( )
protected

Definition at line 80 of file trapbase.c.

◆ IsActivable()

bool IsActivable ( )
protected

Definition at line 167 of file trapbase.c.

◆ IsActive()

bool IsActive ( )
protected

Definition at line 146 of file trapbase.c.

◆ IsInactive()

bool IsInactive ( )
protected

Definition at line 151 of file trapbase.c.

◆ IsPlaceable()

bool IsPlaceable ( )
protected

Definition at line 172 of file trapbase.c.

◆ IsPlaceableAtPosition()

bool IsPlaceableAtPosition ( vector position)
protected

Definition at line 190 of file trapbase.c.

◆ IsTakeable()

override bool IsTakeable ( )
protected

Definition at line 157 of file trapbase.c.

◆ OnActivate()

void OnActivate ( )
protected

Definition at line 67 of file trap_landmine.c.

◆ OnDisarm()

void OnDisarm ( )
protected

also called from RPC on client

◆ OnItemLocationChanged()

override void OnItemLocationChanged ( EntityAI old_owner,
EntityAI new_owner )
protected

Definition at line 503 of file trapbase.c.

◆ OnPlacementComplete()

override void OnPlacementComplete ( Man player,
vector position = "0 0 0",
vector orientation = "0 0 0" )
protected

Definition at line 544 of file trapbase.c.

◆ OnRPC()

override void OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
protected

Definition at line 295 of file trapbase.c.

◆ OnSteppedOn()

void OnSteppedOn ( EntityAI victim)
protected

Definition at line 273 of file trapbase.c.

◆ OnSteppedOut()

void OnSteppedOut ( EntityAI victim)
protected

Definition at line 166 of file trap_landmine.c.

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
protected

Definition at line 120 of file trapbase.c.

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
protected

Definition at line 111 of file trapbase.c.

◆ OnUpdate()

void OnUpdate ( EntityAI victim)
protected

Definition at line 89 of file trap_landmine.c.

◆ OnVariablesSynchronized()

override void OnVariablesSynchronized ( )
protected

this event is called all variables are synchronized on client

Definition at line 86 of file trapbase.c.

◆ PlayDeployLoopSound()

void PlayDeployLoopSound ( )
protected

◆ RefreshState()

void RefreshState ( )
protected

Definition at line 331 of file trapbase.c.

◆ RemoveFromObject()

void RemoveFromObject ( EntityAI victim)
protected

Definition at line 268 of file trapbase.c.

◆ SetActions()

override void SetActions ( )
protected

Definition at line 615 of file trapbase.c.

◆ SetActive()

void SetActive ( )
protected

Definition at line 414 of file trapbase.c.

◆ SetDisarmed()

void SetDisarmed ( bool disarmed)
protected

DEPRECATED.

Definition at line 600 of file trapbase.c.

◆ SetInactive()

void SetInactive ( bool stop_timer = true)
protected

Definition at line 459 of file trapbase.c.

◆ SetupTrap()

void SetupTrap ( )
protected

Definition at line 379 of file trapbase.c.

◆ SetupTrapPlayer()

void SetupTrapPlayer ( PlayerBase player,
bool set_position = true )
protected

Definition at line 388 of file trapbase.c.

◆ SnapOnObject()

void SnapOnObject ( EntityAI victim)
protected

Definition at line 216 of file trapbase.c.

◆ StartActivate()

void StartActivate ( PlayerBase player)
protected

Definition at line 438 of file trapbase.c.

◆ StartDeactivate()

void StartDeactivate ( PlayerBase player)
protected

Definition at line 208 of file trap_tripwire.c.

◆ StopDeployLoopSound()

void StopDeployLoopSound ( )
protected

DEPRECATED.

◆ Synch()

void Synch ( EntityAI victim)
protected

keeping "step" here for consistency only

Definition at line 281 of file trapbase.c.

◆ TrapBase()

void TrapBase ( )
protected

timer calling OnUpdate in configured interval

Definition at line 48 of file trapbase.c.

Variable Documentation

◆ DAMAGE_TRIGGER_MINE

const int DAMAGE_TRIGGER_MINE = 75
protected

Definition at line 14 of file trapbase.c.

◆ m_AddActivationDefect

bool m_AddActivationDefect
protected

Definition at line 23 of file trapbase.c.

◆ m_AddDeactivationDefect

bool m_AddDeactivationDefect
protected

Definition at line 24 of file trapbase.c.

◆ m_AnimationPhaseGrounded

string m_AnimationPhaseGrounded
protected

Definition at line 32 of file trapbase.c.

◆ m_AnimationPhaseSet

string m_AnimationPhaseSet
protected

Definition at line 33 of file trapbase.c.

◆ m_AnimationPhaseTriggered

string m_AnimationPhaseTriggered
protected

Definition at line 34 of file trapbase.c.

◆ m_ClothingDmg

ref array<int> m_ClothingDmg
protected

Definition at line 46 of file trapbase.c.

◆ m_DamageOthers

float m_DamageOthers
protected

Definition at line 21 of file trapbase.c.

◆ m_DamagePlayers

float m_DamagePlayers
protected

Definition at line 20 of file trapbase.c.

◆ m_DefectRate

float m_DefectRate
protected

Definition at line 19 of file trapbase.c.

◆ m_DeployLoopSound

ref EffectSound m_DeployLoopSound
protected

DEPRECATED.

Definition at line 692 of file trapbase.c.

◆ m_Disarmed

bool m_Disarmed = false
protected

Definition at line 28 of file trapbase.c.

◆ m_InfoActivationTime

string m_InfoActivationTime
protected

Definition at line 40 of file trapbase.c.

◆ m_InfoDamage

string m_InfoDamage
protected

Definition at line 39 of file trapbase.c.

◆ m_InfoDamageManipulation

string m_InfoDamageManipulation
protected

Definition at line 38 of file trapbase.c.

◆ m_InfoDeactivated

string m_InfoDeactivated
protected

Definition at line 37 of file trapbase.c.

◆ m_InfoSetup

string m_InfoSetup
protected

Definition at line 36 of file trapbase.c.

◆ m_InitWaitTime

float m_InitWaitTime
protected

Definition at line 17 of file trapbase.c.

◆ m_IsActive

bool m_IsActive
protected

Definition at line 25 of file trapbase.c.

◆ m_IsInProgress

bool m_IsInProgress
protected

Definition at line 26 of file trapbase.c.

◆ m_NeedActivation

bool m_NeedActivation
protected

Definition at line 18 of file trapbase.c.

◆ m_Timer

ref Timer m_Timer
protected

Definition at line 42 of file trapbase.c.

◆ m_TrapTrigger

TrapTrigger m_TrapTrigger
protected

Definition at line 44 of file trapbase.c.

◆ m_UpdateTimer

ref Timer m_UpdateTimer
protected

Definition at line 43 of file trapbase.c.

◆ m_WasActivatedOrDeactivated

bool m_WasActivatedOrDeactivated
protected

DEPRECATED Used for explosive traps to prevent detonation after destroying through disarm action.

Definition at line 30 of file trapbase.c.

◆ SPAWN_FLAGS

enum SoundTypeTrap SPAWN_FLAGS = ECE_LOCAL

◆ UPDATE_TIMER_INTERVAL

const float UPDATE_TIMER_INTERVAL = 0.05
protected

Definition at line 15 of file trapbase.c.