|
| void | DeferredTakeToDst (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst) |
| |
| override bool | ReserveInventory (HumanInventory inventory) |
| |
| override void | ClearInventoryReservation (HumanInventory inventory) |
| |
| void | DeferredForceSwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2) |
| |
| void | DeferredHandEvent (InventoryMode mode, HandEventBase e) |
| |
| void | DayZPlayerInventory () |
| |
| DayZPlayer | GetDayZPlayerOwner () |
| |
| bool | IsAuthoritative () |
| |
| bool | IsOwner () |
| |
| bool | IsProxy () |
| |
| override void | Init () |
| | Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
|
| |
| void | 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
|
| |
| void | CancelWeaponEvent () |
| |
| void | AbortWeaponEvent () |
| |
| void | PostWeaponEvent (WeaponEventBase e) |
| |
| void | DeferredWeaponFailed () |
| |
| void | HandleWeaponEvents (float dt, out bool exitIronSights) |
| |
| void | HandleInventory (float dt) |
| |
| void | OnInputUserDataForRemote (ParamsReadContext ctx) |
| |
| override void | OnServerInventoryCommand (ParamsReadContext ctx) |
| |
| bool | ValidateSyncMove (inout Serializer ctx, InventoryValidation validation) |
| |
| bool | ValidateHandEvent (inout Serializer ctx, InventoryValidation validation) |
| |
| bool | ValidateSwap (inout Serializer ctx, InventoryValidation validation) |
| |
| bool | ProcessInputData (ParamsReadContext ctx, bool isJuncture, bool isRemote) |
| |
| void | RemoveMovableOverride (EntityAI item) |
| |
| void | EnableMovableOverride (EntityAI item) |
| |
| void | CheckForRope (InventoryLocation src, InventoryLocation dst) |
| |
| bool | IsServerOrLocalPlayer () |
| |
| bool | StoreInputForRemotes (bool handling_juncture, bool remote, ParamsReadContext ctx) |
| |
| override bool | TakeToDst (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst) |
| |
| override bool | PostDeferredEventTakeToDst (InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst) |
| |
| void | HandleTakeToDst (DeferredEvent deferred_event) |
| |
| override bool | SwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2) |
| |
| override bool | PostDeferredForceSwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2) |
| |
| void | HandleSwapEntities (DeferredEvent deferred_event) |
| |
| override bool | ForceSwapEntities (InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst) |
| |
| void | HandleForceSwapEntities (DeferredEvent deferred_event) |
| |
| override void | NetSyncCurrentStateID (int id) |
| |
| override void | OnAfterStoreLoad () |
| |
| bool | OnEventForRemoteWeapon (ParamsReadContext ctx) |
| |
| bool | OnHandEventForRemote (ParamsReadContext ctx) |
| |
| void | SyncHandEventToRemote (HandEventBase e) |
| |
| override void | OnHandsExitedStableState (HandStateBase src, HandStateBase dst) |
| |
| override void | OnHandsEnteredStableState (HandStateBase src, HandStateBase dst) |
| |
| override void | OnHandsStateChanged (HandStateBase src, HandStateBase dst) |
| |
| override bool | HandEvent (InventoryMode mode, HandEventBase e) |
| |
| void | HandleHandEvent (DeferredEvent deferred_event) |
| |
| override void | HandleInventoryManipulation () |
| |
| bool | IsProcessing () |
| |
| bool | PlayerCheckRequestSrc (notnull InventoryLocation src, float radius) |
| |
| bool | PlayerCheckRequestDst (notnull InventoryLocation src, notnull InventoryLocation dst, float radius) |
| |
| bool | PlayerCheckSwapItemsRequest (notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2, float radius) |
| |
| bool | PlayerCheckDropRequest (notnull InventoryLocation src, float radius) |
| |
| bool | MoveCheckExclusionMaskLocal (notnull InventoryLocation src, notnull InventoryLocation dst) |
| | Local, checks only stuff that is in guaranteed sync.
|
| |
| bool | SwapCheckExclusionMaskLocal (notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2) |
| | Local, checks only stuff that is in guaranteed sync.
|
| |
| bool | ValidateDestroy (inout Serializer ctx, InventoryValidation validation) |
| | DEPRECATED.
|
| |
|
| override bool | OnInventoryJunctureFromServer (ParamsReadContext ctx) |
| |
| override bool | OnInventoryJunctureRepairFromServer (ParamsReadContext ctx) |
| |
| override void | OnInventoryJunctureFailureFromServer (ParamsReadContext ctx) |
| |
| override void | OnInventoryFailure (InventoryCommandType type, InventoryValidationReason reason, InventoryLocation src, InventoryLocation dst) |
| |
| void | OnHandleStoredJunctureData (ParamsReadContext ctx) |
| |
| proto native void | StoreJunctureData (ParamsReadContext ctx) |
| |
|
| override bool | OnInputUserDataProcess (ParamsReadContext ctx) |
| |
| void | OnHandleStoredInputUserData (ParamsReadContext ctx) |
| |
| proto native void | StoreInputUserData (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:
- It makes it hard to track what is written/read from the serializer
- It makes this file very very large
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 581 of file dayzplayerinventory.c.
- Returns
- false on malformed data, true on anything else, including cheats
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 1530 of file dayzplayerinventory.c.
DEPRECATED.
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 2651 of file dayzplayerinventory.c.
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 1004 of file dayzplayerinventory.c.
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 1239 of file dayzplayerinventory.c.
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 772 of file dayzplayerinventory.c.