194 CreateStableStates();
196 m_Taking =
new HandAnimatedTakingFromAtt(GetManOwner(), null);
197 m_MovingTo =
new HandAnimatedMovingToAtt(GetManOwner(), null);
198 m_Swapping =
new HandAnimatedSwapping(GetManOwner(), null);
199 m_FSwapping =
new HandAnimatedForceSwapping(GetManOwner(), null);
200 m_FSwappingInst =
new HandAnimatedForceSwapping_Inst(GetManOwner(), null);
203 HandEventBase _fin_ =
new HandEventHumanCommandActionFinished;
204 HandEventBase _abt_ =
new HandEventHumanCommandActionAborted;
213 m_FSM.AddTransition(
new HandTransition( m_Empty , __T__,
m_Taking, NULL,
new HandSelectAnimationOfTakeToHandsEvent(GetManOwner())));
214 m_FSM.AddTransition(
new HandTransition(
m_Taking , _fin_, m_Empty, null,
new HandGuardNot(
new HandGuardHasItemInHands(GetManOwner()))));
216 m_FSM.AddTransition(
new HandTransition(
m_Taking , __Xd_, m_Empty,
new HandActionDestroyed,
new HandGuardHasDestroyedItemInHands(GetManOwner())));
220 m_FSM.AddTransition(
new HandTransition( m_Equipped, __M__,
m_MovingTo, NULL,
new HandSelectAnimationOfMoveFromHandsEvent(GetManOwner())));
221 m_FSM.AddTransition(
new HandTransition(
m_MovingTo, __Xd_, m_Empty,
new HandActionDestroyed,
new HandGuardHasDestroyedItemInHands(GetManOwner())));
222 m_FSM.AddTransition(
new HandTransition(
m_MovingTo, _fin_, m_Equipped, null,
new HandGuardHasItemInHands(GetManOwner())));
227 m_FSM.AddTransition(
new HandTransition( m_Equipped, __W__,
m_Swapping, NULL,
new HandSelectAnimationOfSwapInHandsEvent(GetManOwner())));
228 m_FSM.AddTransition(
new HandTransition(
m_Swapping, __Xd_, m_Empty,
new HandActionDestroyed,
new HandGuardHasDestroyedItemInHands(GetManOwner())));
229 m_FSM.AddTransition(
new HandTransition(
m_Swapping, _fin_, m_Empty, null,
new HandGuardNot(
new HandGuardHasItemInHands(GetManOwner()))));
236 m_FSM.AddTransition(
new HandTransition(
m_FSwappingInst, __Xd_, m_Empty,
new HandActionDestroyed,
new HandGuardHasDestroyedItemInHands(GetManOwner())));
240 m_FSM.AddTransition(
new HandTransition(
m_FSwapping, _fin_, m_Equipped, null,
new HandGuardHasItemInHands(GetManOwner())));
242 m_FSM.AddTransition(
new HandTransition(
m_FSwapping, __Xd_, m_Empty,
new HandActionDestroyed,
new HandGuardHasDestroyedItemInHands(GetManOwner())));
273 if (hcw && weapon && weapon.CanProcessWeaponEvents() && !weapon.IsIdle())
276 weapon.ProcessWeaponAbortEvent(
new WeaponEventHumanCommandActionAborted(
GetDayZPlayerOwner()));
300 string secondPart =
" - ENTITY IN HANDS IS NOT A WEAPON: " +
Object.GetDebugName(GetEntityInHands());
305 secondPart =
" on " +
Object.GetDebugName(GetEntityInHands()) +
" which is in state " + weapon.GetCurrentState();
306 secondPart +=
" with physical state: J: " + weapon.IsJammed() +
" | ";
307 for (
int i = 0; i < weapon.GetMuzzleCount(); ++i)
309 secondPart +=
"Chamber_" + i +
": B(" + weapon.IsChamberFull(i) +
") F(" + weapon.IsChamberFiredOut(i) +
") E(" + weapon.IsChamberEmpty(i) +
") | ";
310 secondPart +=
"Magazine_" + i +
": " + weapon.GetMagazine(i);
311 if (i < weapon.GetMuzzleCount() - 1)
316 Error(firstPart + secondPart);
327 if (hcw && weapon && weapon.CanProcessWeaponEvents())
329 weapon.GetCurrentState().OnUpdate(dt);
333 if (!weapon.IsIdle())
337 int weaponEventId = hcw.
IsEvent();
338 if (weaponEventId == -1)
350 if (anim_event != NULL)
352 weapon.ProcessWeaponEvent(anim_event);
358 if (weapon.IsWaitingForActionFinish())
361 weapon.ProcessWeaponEvent(
new WeaponEventHumanCommandActionFinished(
GetDayZPlayerOwner()));
366 weapon.ProcessWeaponAbortEvent(
new WeaponEventHumanCommandActionAborted(
GetDayZPlayerOwner()));
376 exitIronSights =
true;
399 m_FSM.GetCurrentState().OnUpdate(dt);
405 if ( !m_FSM.GetCurrentState().IsIdle() || !m_FSM.IsRunning() )
409 int weaponEventId = hcw.
IsEvent();
410 if (weaponEventId == -1)
417 hndDebugPrint(
"[hndfsm] HandleInventory: event arrived " +
typename.EnumToString(
WeaponEvents, weaponEventId) +
"(" + weaponEventId +
") fsm_ev=" + anim_event.ToString());
419 if (anim_event != NULL)
422 ProcessHandEvent(anim_event);
428 if (m_FSM.GetCurrentState().IsWaitingForActionFinish())
431 hndDebugPrint(
"[hndfsm] Hand-Weapon event: finished! notifying waiting state=" + m_FSM.GetCurrentState());
433 HandEventBase fin_event =
new HandEventHumanCommandActionFinished(GetManOwner());
435 ProcessHandEvent(fin_event);
440 hndDebugPrint(
"[hndfsm] Hand-Weapon event: ABORT! notifying running state=" + m_FSM.GetCurrentState());
442 HandEventBase abt_event =
new HandEventHumanCommandActionAborted(GetManOwner());
444 ProcessHandAbortEvent(abt_event);
518 if (
GetGame().IsDedicatedServer())
523 int udtIdentifier = -1;
574 if (!ctx.
Read(reason))
740 LocationSyncMoveEntity(src, dst);
757 DumpInventoryDebug();
785 Error(
"[syncinv] HandleInputData: unexpected return code from AcquireInventoryJunctureFromServer");
804 DumpInventoryDebug();
822 LocationSyncMoveEntity(src, dst);
835 EntityAI itemSrc = e.GetSrcEntity();
841 Debug.
InventoryMoveLog(
"STS = " + e.m_Player.GetSimulationTimeStamp() +
" event= " + e.ToString(),
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
845 if (validation.
m_IsRemote && !e.GetSrcEntity())
850 Debug.
InventoryMoveLog(
"Failed - CheckRequestSrc",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
854 Error(
"[syncinv] HandleInputData remote input (cmd=HAND_EVENT) dropped, item not in bubble");
873 Debug.
InventoryMoveLog(
"Failed - CheckRequestSrc",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
892 if (!validation.
m_IsRemote && !e.CheckRequestEx(validation))
897 Debug.
InventoryMoveLog(
"Failed - CheckRequest",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
915 if (!e.CanPerformEventEx(validation))
920 Debug.
InventoryMoveLog(
"Failed - CanPerformEvent",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
950 Debug.
InventoryMoveLog(
"Juncture not required",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
961 Debug.
InventoryMoveLog(
"Juncture sended",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
981 Debug.
InventoryMoveLog(
"Juncture denied",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
990 Error(
"[syncinv] HandleInputData: unexpected return code from AcquireInventoryJunctureFromServer");
1004 Debug.
InventoryMoveLog(
"Success - ProcessHandEvent",
"HAND_EVENT" ,
"n/a",
"ProcessInputData", e.m_Player.ToString() );
1009 if (!e.m_Player.GetHumanInventory().ProcessHandEvent(e))
1028 bool skippedSwap =
false;
1034 ctx.Read(skippedSwap);
1064 Error(
"[syncinv] HandleInputData remote input (cmd=SWAP) dropped, item not in bubble");
1130 DumpInventoryDebug();
1197 Error(
"[syncinv] HandleInputData: unexpected return code from TryAcquireTwoInventoryJuncturesFromServer");
return true;
1216 bool isNotSkipped = LocationSwap(src1, src2, dst1, dst2);
1260 Error(
"[syncinv] HandleInputData remote input (cmd=DESTROY) dropped, item not in bubble");
1308 if (isJuncture && isRemote)
1315 if (!ctx.
Read(type))
1330 if (!ValidateUserReservationCancel(serializer, validation))
1368 if (canSendJuncture)
1374 writeableSerializer.
CopyFrom(serializer);
1375 serializer = writeableSerializer;
1384 if (canSendJuncture)
1391 Error(
"InventoryValidationResult.JUNCTURE returned when not possible to send!");
1406 itemIB.SetCanBeMovedOverride(
false);
1413 itemIB.SetCanBeMovedOverride(
true);
1419 Rope rope = Rope.Cast(src.
GetItem());
1421 rope.SetTargetLocation(dst);
1447 if (!GetManOwner().IsAlive())
1448 return super.TakeToDst(mode,src,dst);
1460 if (RedirectToHandEvent(mode, src, dst))
1472 if (
GetDayZPlayerOwner().NeedInventoryJunctureFromServer(src.GetItem(), src.GetParent(), dst.GetParent()))
1510 LocationSyncMoveEntity(src, dst);
1513 if(!super.TakeToDst(mode,src,dst))
1531 if( deferred_take_to_dst )
1541 deferred_take_to_dst.ClearInventoryReservation(
this);
1544 switch (deferred_take_to_dst.m_mode)
1554 if (LocationCanMoveEntity(deferred_take_to_dst.m_src,deferred_take_to_dst.m_dst))
1557 LocationSyncMoveEntity(deferred_take_to_dst.m_src, deferred_take_to_dst.m_dst);
1577 if (LocationCanMoveEntity(deferred_take_to_dst.m_src,deferred_take_to_dst.m_dst))
1613 Error(
"HandEvent - Invalid mode");
1632 LocationSwap(src1, src2, dst1, dst2);
1637 if(!super.SwapEntities(mode,item1,item2))
1657 if( deferred_swap_entities )
1665 switch (deferred_swap_entities.
m_mode)
1671 LocationSwap(src1, src2, deferred_swap_entities.
m_dst1, deferred_swap_entities.
m_dst2);
1709 Error(
"SwapEntities - HandEvent - Invalid mode");
1713 Error(
"SwapEntities - MakeSrcAndDstForSwap - no inv loc");
1732 LocationSwap(src1, src2, dst1, item2_dst);
1738 if(!super.ForceSwapEntities(mode,item1,item2,item2_dst))
1760 if( deferred_force_swap_entities )
1762 deferred_force_swap_entities.ClearInventoryReservation(
this);
1765 deferred_force_swap_entities.m_item1.GetInventory().GetCurrentInventoryLocation(src1);
1766 deferred_force_swap_entities.m_item2.GetInventory().GetCurrentInventoryLocation(src2);
1772 switch (deferred_force_swap_entities.m_mode)
1775 if (CanForceSwapEntitiesEx(deferred_force_swap_entities.m_dst1.GetItem(),deferred_force_swap_entities.m_dst1,deferred_force_swap_entities.m_dst2.GetItem(), deferred_force_swap_entities.m_dst2))
1778 LocationSwap(src1, src2, deferred_force_swap_entities.m_dst1, deferred_force_swap_entities.m_dst2);
1792 if (CanForceSwapEntitiesEx(deferred_force_swap_entities.m_dst1.GetItem(),deferred_force_swap_entities.m_dst1,deferred_force_swap_entities.m_dst2.GetItem(), deferred_force_swap_entities.m_dst2))
1814 Error(
"ForceSwapEntities - HandEvent - Invalid mode");
1824 Error(
"[syncinv] " +
Object.GetDebugName(player) +
" SendServerHandEventViaJuncture - called on server side event only, e=" + e.
DumpToString());
1826 if (player.IsAlive())
1848 player.StoreInputForRemotes(ctx);
1853 Error(
"[syncinv] SendServerHandEventViaJuncture - called on dead player, juncture is for living only");
1863 super.NetSyncCurrentStateID(
id);
1884 if (GetEntityInHands())
1894 pb.GetWeaponManager().SetRunning(
true);
1896 fsmDebugSpam(
"[wpnfsm] " +
Object.GetDebugName(wpn) +
" recv event from remote: created event=" + e);
1899 wpn.ProcessWeaponAbortEvent(e);
1903 wpn.ProcessWeaponEvent(e);
1905 pb.GetWeaponManager().SetRunning(
false);
1909 Error(
"OnEventForRemoteWeapon - entity in hands, but not weapon. item=" + GetEntityInHands());
1912 Error(
"OnEventForRemoteWeapon - no entity in hands");
1925 hndDebugSpam(
"[hndfsm] recv event from remote: created event=" + e);
1927 if (e.GetEventID() ==
HandEventID.HUMANCOMMAND_ACTION_ABORTED)
1930 m_FSM.ProcessAbortEvent(e, aa);
1934 m_FSM.ProcessEvent(e);
1952 hndDebugPrint(
"[hndfsm] send 2 remote: sending e=" + e +
" id=" + e.GetEventID() +
" p=" + p +
" e=" + e.
DumpToString());
1953 p.StoreInputForRemotes(ctx);
1959 super.OnHandsExitedStableState(src, dst);
1961 hndDebugPrint(
"[hndfsm] hand fsm exit stable src=" + src.Type().ToString());
1966 super.OnHandsEnteredStableState(src, dst);
1968 hndDebugPrint(
"[hndfsm] hand fsm entered stable dst=" + dst.Type().ToString());
1973 super.OnHandsStateChanged(src, dst);
1975 hndDebugPrint(
"[hndfsm] hand fsm changed state src=" + src.Type().ToString() +
" ---> dst=" + dst.Type().ToString());
1996 EntityAI itemInHands = GetEntityInHands();
1999 handInventoryLocation.
SetHands(GetInventoryOwner(), itemInHands);
2002 if (e.CanPerformEventEx(validation))
2040 if (deferred_hand_event)
2052 switch (deferred_hand_event.
m_mode)
2062 if (deferred_hand_event.
m_event.CanPerformEventEx(validation))
2065 ProcessHandEvent(deferred_hand_event.
m_event);
2077 if (deferred_hand_event.
m_event.CanPerformEventEx(validation))
2102 ProcessHandEvent(deferred_hand_event.
m_event);
2127 ProcessHandEvent(deferred_hand_event.
m_event);
2132 Error(
"HumanInventory::HandEvent - Invalid mode");
2139 super.HandleInventoryManipulation();
2170 if (player.IsAlive())
2172 if (!player.IsRestrained() && !player.IsUnconscious())
2201 if (player.IsAlive())
2203 if (!player.IsRestrained() && !player.IsUnconscious())
2214 result = CheckMoveToDstRequest( GetManOwner(), src, dst, radius);
2228 player =
PlayerBase.Cast(ent.GetHierarchyRootPlayer());
2233 if (player.IsAlive())
2235 if (!player.IsRestrained() && !player.IsUnconscious())
2244 ent = dst2.GetParent();
2247 player =
PlayerBase.Cast(ent.GetHierarchyRootPlayer());
2252 if (player.IsAlive())
2254 if (!player.IsRestrained() && !player.IsUnconscious())
2285 if (player.IsAlive())
2287 if (!player.IsRestrained() && !player.IsUnconscious())
2298 result = CheckDropRequest( GetManOwner(), src, radius);
void syncDebugPrint(string s)
void inventoryDebugPrint(string s)
InventoryValidationResult
InventoryValidationReason
void wpnDebugSpamALot(string s)
void wpnDebugPrint(string s)
void ClearInventoryReservationEx(ActionData action_data)
protected ref HandAnimatedForceSwapping_Inst m_FSwappingInst
protected ref HandAnimatedTakingFromAtt m_Taking
deferred weapon event
override void OnAfterStoreLoad()
engine reaction to load from database originates in: engine - Person::BinLoad script - PlayerBase....
bool PlayerCheckDropRequest(notnull InventoryLocation src, float radius)
bool ValidateSyncMove(inout Serializer ctx, InventoryValidation validation)
bool ValidateHandEvent(inout Serializer ctx, InventoryValidation validation)
void EnableMovableOverride(EntityAI item)
bool ProcessInputData(ParamsReadContext ctx, bool isJuncture, bool isRemote)
protected ref HandAnimatedMovingToAtt m_MovingTo
void HandleHandEvent(DeferredEvent deferred_event)
protected void OnHandleStoredInputUserData(ParamsReadContext ctx)
void HandleWeaponEvents(float dt, out bool exitIronSights)
proto native void StoreInputUserData(ParamsReadContext ctx)
void SyncHandEventToRemote(HandEventBase e)
void HandleTakeToDst(DeferredEvent deferred_event)
void DeferredForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
bool ValidateDestroy(inout Serializer ctx, InventoryValidation validation)
void CheckForRope(InventoryLocation src, InventoryLocation dst)
protected ref HandAnimatedForceSwapping m_FSwapping
bool PlayerCheckRequestSrc(notnull InventoryLocation src, float radius)
override void OnInventoryFailure(InventoryCommandType type, InventoryValidationReason reason, InventoryLocation src, InventoryLocation dst)
void PostWeaponEvent(WeaponEventBase e)
override void NetSyncCurrentStateID(int id)
protected void OnHandleStoredJunctureData(ParamsReadContext ctx)
override void OnHandsEnteredStableState(HandStateBase src, HandStateBase dst)
bool IsServerOrLocalPlayer()
override bool TakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
override void OnInventoryJunctureFailureFromServer(ParamsReadContext ctx)
void RemoveMovableOverride(EntityAI item)
override void HandleInventoryManipulation()
override bool OnInventoryJunctureFromServer(ParamsReadContext ctx)
protected ref HandEventBase m_DeferredPostedHandEvent
override bool SwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2)
override bool OnInventoryJunctureRepairFromServer(ParamsReadContext ctx)
void DeferredTakeToDst(InventoryMode mode, notnull InventoryLocation src, notnull InventoryLocation dst)
override void OnHandsExitedStableState(HandStateBase src, HandStateBase dst)
void CancelHandEvent()
cancels any handevents that will be executed this frame @NOTE: this is used in situations where the p...
override void OnHandsStateChanged(HandStateBase src, HandStateBase dst)
bool OnHandEventForRemote(ParamsReadContext ctx)
ref InventoryLocation m_dst1
ref WeaponEventBase m_DeferredWeaponEvent
deferred hand event
void OnInputUserDataForRemote(ParamsReadContext ctx)
DayZPlayer GetDayZPlayerOwner()
override bool ForceSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation item2_dst)
bool ValidateSwap(inout Serializer ctx, InventoryValidation validation)
void HandleSwapEntities(DeferredEvent deferred_event)
bool PlayerCheckSwapItemsRequest(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2, float radius)
void HandleInventory(float dt)
void DeferredWeaponFailed()
ref InventoryLocation m_dst
void HandleForceSwapEntities(DeferredEvent deferred_event)
ref Timer m_DeferredWeaponTimer
bool PlayerCheckRequestDst(notnull InventoryLocation src, notnull InventoryLocation dst, float radius)
bool OnEventForRemoteWeapon(ParamsReadContext ctx)
override void OnServerInventoryCommand(ParamsReadContext ctx)
proto native void StoreJunctureData(ParamsReadContext ctx)
protected ref HandAnimatedSwapping m_Swapping
ref InventoryLocation m_dst2
DeferredSwapEntities m_item1
override bool HandEvent(InventoryMode mode, HandEventBase e)
class DeferredEvent m_src
static void SendServerHandEventViaJuncture(notnull DayZPlayer player, HandEventBase e)
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
WeaponEventBase WeaponAnimEventFactory(WeaponEvents type, DayZPlayer p=NULL, Magazine m=NULL)
creates animation system events
WeaponEventBase CreateWeaponEventFromContext(ParamsReadContext ctx)
WeaponEventID
identifier for events. mainly for rpc purposes
void fsmDebugSpam(string s)
HandEventBase HandAnimEventFactory(WeaponEvents type, Man p=null, InventoryLocation src=null)
void ClearInventoryReservation()
void hndDebugSpam(string s)
void hndDebugSpamALot(string s)
void hndDebugPrint(string s)
FSMTransition< HandStateBase, HandEventBase, HandActionBase, HandGuardBase > HandTransition
bool TryAcquireInventoryJunctureFromServer(notnull Man player, notnull InventoryLocation src, notnull InventoryLocation dst)
bool TryAcquireTwoInventoryJuncturesFromServer(notnull Man player, notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
proto native void ObjectDelete(Object obj)
proto native DayZPlayer GetPlayer()
Super root of all classes in Enforce script.
override void OnItemInHandsChanged()
static const int SJ_INVENTORY
static const int SJ_INVENTORY_FAILURE
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static void InventoryMoveLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
void ClearInventoryReservation(HumanInventory inventory)
bool ReserveInventory(HumanInventory inventory)
void DeferredHandEvent(InventoryMode mode, HandEventBase e)
override bool ReserveInventory(HumanInventory inventory)
ref HandEventBase m_event
override void ClearInventoryReservation(HumanInventory inventory)
override bool ReserveInventory(HumanInventory inventory)
void DeferredSwapEntities(InventoryMode mode, notnull EntityAI item1, notnull EntityAI item2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
override void ClearInventoryReservation(HumanInventory inventory)
ref InventoryLocation m_dst1
ref InventoryLocation m_dst2
script counterpart to engine's class Inventory
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
static bool MakeSrcAndDstForSwap(notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, out InventoryLocation dst2)
helper function for swap
const int c_InventoryReservationTimeoutMS
reservations
const float c_MaxItemDistanceRadius
anti-cheats
const int c_InventoryReservationTimeoutShortMS
bool ClearInventoryReservationEx(EntityAI item, InventoryLocation dst)
bool AddInventoryReservationEx(EntityAI item, InventoryLocation dst, int timeout_ms)
static bool MakeSrcAndDstForForceSwap(notnull EntityAI item1, notnull EntityAI item2, out InventoryLocation src1, out InventoryLocation src2, out InventoryLocation dst1, notnull InventoryLocation dst2)
helper function for ForceSwap
static proto native bool LocationCanMoveEntity(notnull InventoryLocation src, notnull InventoryLocation dst)
queries if the entity contained in inv_loc.m_item can be moved to another location This is a shorthan...
static bool LocationCanMoveEntitySyncCheck(notnull InventoryLocation src, notnull InventoryLocation dst)
Abstracted event, not to be used, only inherited.
override bool ReserveInventory()
override EntityAI GetSecondSrcEntity()
override void ClearInventoryReservation()
override string DumpToString()
override bool AcquireInventoryJunctureFromServer(notnull Man player)
override void WriteToContext(ParamsWriteContext ctx)
override bool IsServerSideOnly()
override bool CheckRequestSrc()
override InventoryLocation GetDst()
represent hand state base
override bool IsIdle()
idle state does not expect any animation events
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native bool IsActionFinished()
proto native int IsEvent()
return -1 when there is no event, otherwise it returns pId of event from animation
proto native int GetRunningActionType()
returns -1 when no action is running or appropriate action type
inventory for plain man/human
HumanInventory... with FSM (synchronous, no anims)
proto native bool IsValid()
verify current set inventory location
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
proto native EntityAI GetParent()
returns parent of current inventory location
bool ReadFromContext(ParamsReadContext ctx)
proto native EntityAI GetItem()
returns item of current inventory location
static string DumpToStringNullSafe(InventoryLocation loc)
InventoryValidationResult m_Result
InventoryValidationReason m_Reason
static bool IsInventoryHFSMLogEnable()
static bool IsInventoryMoveLogEnable()
static bool IsWeaponLogEnable()
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
proto native bool CanWrite()
signalize mechanism manipulation
WeaponEventID GetEventID()
returns id from enum WeaponEventID
proto native void StoreInputForRemotes(ParamsWriteContext ctx)
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerInstanceType GetInstanceType()
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
string WeaponActionTypeToString(int A, int AT)