Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
|
Go to the source code of this file.
Data Structures | |
class | DeferredEvent |
class | DeferredSwapEntities |
class | DeferredHandEvent |
Variables | |
class DeferredEvent | m_src |
ref InventoryLocation | m_dst |
DeferredSwapEntities | m_item1 |
EntityAI | m_item2 |
ref InventoryLocation | m_dst1 |
ref InventoryLocation | m_dst2 |
ref HandEventBase | m_event |
m_DeferredEvent = NULL | |
ref Timer | m_DeferredWeaponTimer = new Timer |
protected ref HandEventBase | m_DeferredPostedHandEvent = NULL |
ref WeaponEventBase | m_DeferredWeaponEvent = NULL |
deferred hand event More... | |
protected ref HandAnimatedTakingFromAtt | m_Taking |
deferred weapon event More... | |
protected ref HandAnimatedMovingToAtt | m_MovingTo |
protected ref HandAnimatedSwapping | m_Swapping |
protected ref HandAnimatedForceSwapping | m_FSwapping |
protected ref HandAnimatedForceSwapping_Inst | m_FSwappingInst |
void AbortWeaponEvent | ( | ) |
Definition at line 269 of file dayzplayerinventory.c.
CancelHandEvent | ( | ) |
cancels any handevents that will be executed this frame @NOTE: this is used in situations where the player performs an action that renders the event invalid exactly on the frame it will be executed
Definition at line 257 of file dayzplayerinventory.c.
void CancelWeaponEvent | ( | ) |
Definition at line 263 of file dayzplayerinventory.c.
void CheckForRope | ( | InventoryLocation | src, |
InventoryLocation | dst | ||
) |
Definition at line 1570 of file dayzplayerinventory.c.
override void ClearInventoryReservation | ( | HumanInventory | inventory | ) |
Definition at line 31 of file dayzplayerinventory.c.
void DayZPlayerInventory | ( | ) |
Definition at line 151 of file dayzplayerinventory.c.
void DeferredForceSwapEntities | ( | InventoryMode | mode, |
notnull EntityAI | item1, | ||
notnull EntityAI | item2, | ||
notnull InventoryLocation | dst1, | ||
notnull InventoryLocation | dst2 | ||
) |
Definition at line 81 of file dayzplayerinventory.c.
void DayZPlayerInventory::DeferredHandEvent | ( | InventoryMode | mode, |
HandEventBase | e | ||
) |
Definition at line 134 of file dayzplayerinventory.c.
void DeferredTakeToDst | ( | InventoryMode | mode, |
notnull InventoryLocation | src, | ||
notnull InventoryLocation | dst | ||
) |
Definition at line 15 of file dayzplayerinventory.c.
void DeferredWeaponFailed | ( | ) |
Definition at line 308 of file dayzplayerinventory.c.
void EnableMovableOverride | ( | EntityAI | item | ) |
Definition at line 1562 of file dayzplayerinventory.c.
override bool ForceSwapEntities | ( | InventoryMode | mode, |
notnull EntityAI | item1, | ||
notnull EntityAI | item2, | ||
notnull InventoryLocation | item2_dst | ||
) |
Definition at line 1889 of file dayzplayerinventory.c.
DayZPlayer GetDayZPlayerOwner | ( | ) |
Definition at line 155 of file dayzplayerinventory.c.
override bool HandEvent | ( | InventoryMode | mode, |
HandEventBase | e | ||
) |
Let the client know a failure happened
If singleplayer or the client is executing this
Definition at line 2212 of file dayzplayerinventory.c.
void HandleForceSwapEntities | ( | DeferredEvent | deferred_event | ) |
Definition at line 1928 of file dayzplayerinventory.c.
void HandleHandEvent | ( | DeferredEvent | deferred_event | ) |
Default structure suffices
Definition at line 2254 of file dayzplayerinventory.c.
void HandleInventory | ( | float | dt | ) |
Definition at line 427 of file dayzplayerinventory.c.
override void HandleInventoryManipulation | ( | ) |
Definition at line 2367 of file dayzplayerinventory.c.
void HandleSwapEntities | ( | DeferredEvent | deferred_event | ) |
Definition at line 1823 of file dayzplayerinventory.c.
void HandleTakeToDst | ( | DeferredEvent | deferred_event | ) |
Definition at line 1695 of file dayzplayerinventory.c.
Definition at line 333 of file dayzplayerinventory.c.
override void Init | ( | ) |
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
pre-init arrays
Definition at line 190 of file dayzplayerinventory.c.
bool IsAuthoritative | ( | ) |
Definition at line 157 of file dayzplayerinventory.c.
bool IsOwner | ( | ) |
Definition at line 168 of file dayzplayerinventory.c.
bool IsProcessing | ( | ) |
Definition at line 2383 of file dayzplayerinventory.c.
bool IsProxy | ( | ) |
Definition at line 179 of file dayzplayerinventory.c.
bool IsServerOrLocalPlayer | ( | ) |
Definition at line 1577 of file dayzplayerinventory.c.
override void NetSyncCurrentStateID | ( | int | id | ) |
Definition at line 2059 of file dayzplayerinventory.c.
OnAfterStoreLoad | ( | ) |
engine reaction to load from database originates in: engine - Person::BinLoad script - PlayerBase.OnAfterStoreLoad
Definition at line 2072 of file dayzplayerinventory.c.
bool OnEventForRemoteWeapon | ( | ParamsReadContext | ctx | ) |
Definition at line 2080 of file dayzplayerinventory.c.
bool OnHandEventForRemote | ( | ParamsReadContext | ctx | ) |
Definition at line 2122 of file dayzplayerinventory.c.
protected void OnHandleStoredInputUserData | ( | ParamsReadContext | ctx | ) |
Definition at line 698 of file dayzplayerinventory.c.
protected void OnHandleStoredJunctureData | ( | ParamsReadContext | ctx | ) |
Juncture is only ever Server Req->Client Ack and Perform->Server Perform, never remote
Definition at line 654 of file dayzplayerinventory.c.
override void OnHandsEnteredStableState | ( | HandStateBase | src, |
HandStateBase | dst | ||
) |
Definition at line 2178 of file dayzplayerinventory.c.
override void OnHandsExitedStableState | ( | HandStateBase | src, |
HandStateBase | dst | ||
) |
Definition at line 2168 of file dayzplayerinventory.c.
override void OnHandsStateChanged | ( | HandStateBase | src, |
HandStateBase | dst | ||
) |
Definition at line 2188 of file dayzplayerinventory.c.
void OnInputUserDataForRemote | ( | ParamsReadContext | ctx | ) |
Definition at line 717 of file dayzplayerinventory.c.
override bool OnInputUserDataProcess | ( | ParamsReadContext | ctx | ) |
Definition at line 683 of file dayzplayerinventory.c.
override void OnInventoryFailure | ( | InventoryCommandType | type, |
InventoryValidationReason | reason, | ||
InventoryLocation | src, | ||
InventoryLocation | dst | ||
) |
TODO(kumarjac): Notify player here
Definition at line 640 of file dayzplayerinventory.c.
override void OnInventoryJunctureFailureFromServer | ( | ParamsReadContext | ctx | ) |
Function and setup is still messy due to the switch statement and relation with reading.
It could be cleaner if we used classes to handle each inventory command type, but that comes at a performance cost and will also probably require making a fair amount of changes elsewhere.
The downsides with this system right now:
The new changes at least remove the massive switch block and allow for all inventory commands to respond back to the client if something goes wrong
Definition at line 561 of file dayzplayerinventory.c.
override bool OnInventoryJunctureFromServer | ( | ParamsReadContext | ctx | ) |
Definition at line 514 of file dayzplayerinventory.c.
override bool OnInventoryJunctureRepairFromServer | ( | ParamsReadContext | ctx | ) |
Definition at line 536 of file dayzplayerinventory.c.
override void OnServerInventoryCommand | ( | ParamsReadContext | ctx | ) |
Definition at line 727 of file dayzplayerinventory.c.
bool PlayerCheckDropRequest | ( | notnull InventoryLocation | src, |
float | radius | ||
) |
Definition at line 2503 of file dayzplayerinventory.c.
bool PlayerCheckRequestDst | ( | notnull InventoryLocation | src, |
notnull InventoryLocation | dst, | ||
float | radius | ||
) |
Definition at line 2419 of file dayzplayerinventory.c.
bool PlayerCheckRequestSrc | ( | notnull InventoryLocation | src, |
float | radius | ||
) |
Definition at line 2388 of file dayzplayerinventory.c.
bool PlayerCheckSwapItemsRequest | ( | notnull InventoryLocation | src1, |
notnull InventoryLocation | src2, | ||
notnull InventoryLocation | dst1, | ||
notnull InventoryLocation | dst2, | ||
float | radius | ||
) |
Definition at line 2450 of file dayzplayerinventory.c.
void PostWeaponEvent | ( | WeaponEventBase | e | ) |
Definition at line 291 of file dayzplayerinventory.c.
bool ProcessInputData | ( | ParamsReadContext | ctx, |
bool | isJuncture, | ||
bool | isRemote | ||
) |
It should be impossible for juncture to be ran on remote
Serializer can be updated and re-written to when we may want to only correct the client instead of denying the inventory command
Only inform client about failure
General purpose serializer change from read to write here if the validation doesn't update it
Only send juncture back to client
Definition at line 1459 of file dayzplayerinventory.c.
void RemoveMovableOverride | ( | EntityAI | item | ) |
Definition at line 1555 of file dayzplayerinventory.c.
override bool ReserveInventory | ( | HumanInventory | inventory | ) |
Definition at line 22 of file dayzplayerinventory.c.
bool StoreInputForRemotes | ( | bool | handling_juncture, |
bool | remote, | ||
ParamsReadContext | ctx | ||
) |
Definition at line 1582 of file dayzplayerinventory.c.
proto native void StoreInputUserData | ( | ParamsReadContext | ctx | ) |
proto native void StoreJunctureData | ( | ParamsReadContext | ctx | ) |
override bool SwapEntities | ( | InventoryMode | mode, |
notnull EntityAI | item1, | ||
notnull EntityAI | item2 | ||
) |
Definition at line 1787 of file dayzplayerinventory.c.
void SyncHandEventToRemote | ( | HandEventBase | e | ) |
Definition at line 2149 of file dayzplayerinventory.c.
override bool TakeToDst | ( | InventoryMode | mode, |
notnull InventoryLocation | src, | ||
notnull InventoryLocation | dst | ||
) |
Remote inputs are processed in sync juncture once performed on the server - this code below was executing the inventory command before the player simulation timeestamp for remotes which is illegal
Definition at line 1600 of file dayzplayerinventory.c.
bool ValidateDestroy | ( | inout Serializer | ctx, |
InventoryValidation | validation | ||
) |
TODO(kumarjac): Probably should be called through inventory juncture, we shouldn't allow the client to delete until the server says it is okay as there can be more reasons than "cheater" for it to be rejected such as desync
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
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 1373 of file dayzplayerinventory.c.
bool ValidateHandEvent | ( | inout Serializer | ctx, |
InventoryValidation | validation | ||
) |
Pass partial information to guards so guards can do minimal checks if needed The guards can't prevent event so it would be incorrect to pass full InventoryValidation struct. We have to make sure guards don't inadvertantly produce different results in the FSM as that will create desync (two players attempting to put a rag into the same fireplace slot at the same time)
kumarjac: This indicates a failure in replication relationships as player full inventory should be synchronized always if player exists on the remote
TODO(kumarjac): Is this one correct to be 'RemoveMovableOverride' or are the other Validate methdos wrong with 'EnableMovableOverride'?
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
'HandEventBase.CheckRequestEx' updates failure reason
if it already happened on server, remote just needs to comply TODO(kumarjac): Move m_IsRemote check to inside of HandEventBase.CanPerformEventEx
'HandEventBase.CanPerformEventEx' updates failure reason
Check if this this is being executed on the server and not by a juncture or AI
Continuing on with execution of rest of the function
Is called twice unfortunately... but it works so won't change
TODO(kumarjac): We should probably set the result to failure like so
Definition at line 935 of file dayzplayerinventory.c.
bool ValidateSwap | ( | inout Serializer | ctx, |
InventoryValidation | validation | ||
) |
kumarjac: This indicates a failure in replication relationships as player full inventory should be synchronized always if player exists on the remote
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
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
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
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
Check if this this is being executed on the server and not by a juncture or AI
Continuing on with execution of rest of the function
Definition at line 1135 of file dayzplayerinventory.c.
bool ValidateSyncMove | ( | inout Serializer | ctx, |
InventoryValidation | validation | ||
) |
kumarjac: This indicates a failure in replication relationships as player full inventory should be synchronized always if player exists on the remote
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
kumarjac: This indicates a failure in replication relationships as player full inventory should be synchronized always if player exists on the remote
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
Check if this this is being executed on the server and not by a juncture or AI so we can lock the item and ensure replication relationships are setup
TODO(kumarjac): We should continue with the execution and not have this special block but making a change here now will require testing
Is called twice unfortunately...
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 737 of file dayzplayerinventory.c.
m_DeferredEvent = NULL |
protected ref HandEventBase m_DeferredPostedHandEvent = NULL |
Definition at line 142 of file dayzplayerinventory.c.
ref WeaponEventBase m_DeferredWeaponEvent = NULL |
deferred hand event
Definition at line 143 of file dayzplayerinventory.c.
Definition at line 138 of file dayzplayerinventory.c.
ref InventoryLocation m_dst |
Definition at line 13 of file dayzplayerinventory.c.
ref InventoryLocation m_dst1 |
Definition at line 78 of file dayzplayerinventory.c.
ref InventoryLocation m_dst2 |
Definition at line 79 of file dayzplayerinventory.c.
ref HandEventBase m_event |
Definition at line 133 of file dayzplayerinventory.c.
protected ref HandAnimatedForceSwapping m_FSwapping |
Definition at line 148 of file dayzplayerinventory.c.
protected ref HandAnimatedForceSwapping_Inst m_FSwappingInst |
Definition at line 149 of file dayzplayerinventory.c.
DeferredSwapEntities m_item1 |
EntityAI m_item2 |
Definition at line 77 of file dayzplayerinventory.c.
protected ref HandAnimatedMovingToAtt m_MovingTo |
Definition at line 146 of file dayzplayerinventory.c.
class DeferredEvent m_src |
protected ref HandAnimatedSwapping m_Swapping |
Definition at line 147 of file dayzplayerinventory.c.
protected ref HandAnimatedTakingFromAtt m_Taking |
deferred weapon event
Definition at line 145 of file dayzplayerinventory.c.