Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
hand_events.c File Reference

Go to the source code of this file.

Data Structures

class  HandEventBase
 Abstracted event, not to be used, only inherited. More...
class  HandEventDestroyAndReplaceWithNew
class  HandEventRemove
class  HandEventReplaceWithNewBase
class  HandEventSwap

Variables

 ERROR
 JUNCTURE_ACQUIRED
 JUNCTURE_DENIED
 JUNCTURE_NOT_REQUIRED
bool AcquireInventoryJunctureFromServer (notnull Man player)
bool CanPerformEvent ()
bool CanPerformEventEx (InventoryValidation validation)
bool CheckRequest ()
bool CheckRequestEx (InventoryValidation validation)
bool CheckRequestSrc ()
void ClearInventoryReservation ()
static HandEventBase CreateHandEventFromContext (ParamsReadContext ctx)
string DumpToString ()
int GetAnimationID ()
InventoryLocation GetDst ()
HandEventID GetEventID ()
InventoryLocation GetSecondDst ()
InventoryLocation GetSecondSrc ()
EntityAI GetSecondSrcEntity ()
InventoryLocation GetSrc ()
EntityAI GetSrcEntity ()
HandEventBase HandAnimEventFactory (WeaponEvents type, Man p=null, InventoryLocation src=null)
void HandEventBase (Man p=null, InventoryLocation src=null)
static HandEventBase HandEventFactory (HandEventID id, Man p=null, InventoryLocation src=null)
enum  HandEventID {
  UNKNOWN , TAKE , MOVETO , DROP ,
  THROW , SWAP , FORCESWAP , DESTROY ,
  CREATED , DESTROYED , REPLACE , REPLACE2 ,
  REPLACE3 , REPLACED , HUMANCOMMAND_ACTION_FINISHED , HUMANCOMMAND_ACTION_ABORTED ,
  ANIMEVENT_CHANGE_HIDE
}
 events More...
bool IsAuthoritative ()
bool IsOwner ()
bool IsProxy ()
bool IsServerSideOnly ()
enum  JunctureRequestResult
int m_AnimationID = -1
 m_EventID = 0
bool m_IsJuncture
 For action guards. Although we can guarantee the item will exist for remotes and juncture, we can't guarantee the conditions will be the same as when the action was first performed. So therefore we only perform maximal checks on the Client and then Server but then do minimal checks on Juncture-Client and Juncture-Server and no checks on Remote-Client.
bool m_IsRemote
DayZPlayer m_Player
ref InventoryLocation m_Src
void ReadFromContext (ParamsReadContext ctx)
bool ReserveInventory ()
void WriteToContext (ParamsWriteContext ctx)

Enumeration Type Documentation

◆ HandEventID

events

identifier for events mainly for rpc purposes

Enumerator
UNKNOWN 
TAKE 
MOVETO 
DROP 
THROW 
SWAP 

swapping from ground

FORCESWAP 
DESTROY 
CREATED 
DESTROYED 
REPLACE 
REPLACE2 
REPLACE3 
REPLACED 
HUMANCOMMAND_ACTION_FINISHED 
HUMANCOMMAND_ACTION_ABORTED 
ANIMEVENT_CHANGE_HIDE 

Definition at line 6 of file hand_events.c.

◆ JunctureRequestResult

Definition at line 27 of file hand_events.c.

Function Documentation

◆ AcquireInventoryJunctureFromServer()

bool AcquireInventoryJunctureFromServer ( notnull Man player)

Definition at line 93 of file hand_events.c.

◆ CanPerformEvent()

bool CanPerformEvent ( )

Definition at line 105 of file hand_events.c.

◆ CanPerformEventEx()

bool CanPerformEventEx ( InventoryValidation validation)

Definition at line 106 of file hand_events.c.

References HandEventBase::CanPerformEvent().

◆ CheckRequest()

bool CheckRequest ( )

Definition at line 94 of file hand_events.c.

◆ CheckRequestEx()

bool CheckRequestEx ( InventoryValidation validation)

Do not check for action validity on remotes or when performing through juncture. Juncture locks guarentee the item is safe to interact with and the server has validated the command at this point. Checking at this point is both wasteful and can result in a failure which leads to desync

Definition at line 95 of file hand_events.c.

References HandEventBase::CheckRequest(), InventoryValidation::m_IsJuncture, and InventoryValidation::m_IsRemote.

◆ CheckRequestSrc()

bool CheckRequestSrc ( )

Definition at line 107 of file hand_events.c.

Referenced by PlayerCheckRequestSrc().

◆ ClearInventoryReservation()

void ClearInventoryReservation ( )

◆ CreateHandEventFromContext()

◆ DumpToString()

◆ GetAnimationID()

int GetAnimationID ( )

Definition at line 92 of file hand_events.c.

References m_AnimationID.

◆ GetDst()

◆ GetEventID()

◆ GetSecondDst()

InventoryLocation GetSecondDst ( )

Definition at line 91 of file hand_events.c.

◆ GetSecondSrc()

InventoryLocation GetSecondSrc ( )

Definition at line 81 of file hand_events.c.

◆ GetSecondSrcEntity()

EntityAI GetSecondSrcEntity ( )

Definition at line 89 of file hand_events.c.

◆ GetSrc()

◆ GetSrcEntity()

◆ HandAnimEventFactory()

HandEventBase HandAnimEventFactory ( WeaponEvents type,
Man p = null,
InventoryLocation src = null )

Definition at line 847 of file hand_events.c.

Referenced by HandleInventory().

◆ HandEventBase()

void HandEventBase ( Man p = null,
InventoryLocation src = null )

Definition at line 52 of file hand_events.c.

References Class::CastTo(), and m_Src.

◆ HandEventFactory()

◆ IsAuthoritative()

bool IsAuthoritative ( )

Definition at line 55 of file hand_events.c.

Referenced by HandEventRemove::CheckRequestEx().

◆ IsOwner()

bool IsOwner ( )

Definition at line 60 of file hand_events.c.

Referenced by Car::IsServerOrOwner(), and Car::OnVariablesSynchronized().

◆ IsProxy()

◆ IsServerSideOnly()

bool IsServerSideOnly ( )

Definition at line 108 of file hand_events.c.

◆ ReadFromContext()

void ReadFromContext ( ParamsReadContext ctx)

Definition at line 70 of file hand_events.c.

◆ ReserveInventory()

◆ WriteToContext()

void WriteToContext ( ParamsWriteContext ctx)

Variable Documentation

◆ ERROR

@ ERROR

Definition at line 32 of file hand_events.c.

◆ JUNCTURE_ACQUIRED

JUNCTURE_ACQUIRED

Definition at line 30 of file hand_events.c.

◆ JUNCTURE_DENIED

JUNCTURE_DENIED

Definition at line 31 of file hand_events.c.

◆ JUNCTURE_NOT_REQUIRED

JUNCTURE_NOT_REQUIRED

Definition at line 29 of file hand_events.c.

◆ m_AnimationID

int m_AnimationID = -1

Definition at line 41 of file hand_events.c.

Referenced by GetAnimationID(), and WriteToContext().

◆ m_EventID

◆ m_IsJuncture

bool m_IsJuncture

For action guards. Although we can guarantee the item will exist for remotes and juncture, we can't guarantee the conditions will be the same as when the action was first performed. So therefore we only perform maximal checks on the Client and then Server but then do minimal checks on Juncture-Client and Juncture-Server and no checks on Remote-Client.

Definition at line 49 of file hand_events.c.

◆ m_IsRemote

bool m_IsRemote

Definition at line 50 of file hand_events.c.

◆ m_Player

◆ m_Src