24 int boneIndex =
m_pPlayer.GetBoneIndexByName(
"RightHand_Dummy");
27 m_pPlayer.GetBoneTransformWS(boneIndex, m4);
33 int deadBodyLifetime =
GetCEApi().GetCEGlobalInt(
"CleanupLifetimeDeadPlayer");
34 if (deadBodyLifetime <= 0)
36 deadBodyLifetime = 3600;
38 itemInHands.SetLifetime(deadBodyLifetime);
62class DeathEffectTimer
extends Timer
68 PPERequesterBank.GetRequester(PPERequester_DeathDarkening).Stop();
72#ifdef FEATURE_NETWORK_RECONCILIATION
74class DayZPlayerImplementOwnerState : DayZPlayerOwnerState
76 float m_fLastHeadingDiff;
78 protected override event void Write(PawnStateWriter ctx)
82 ctx.Write(m_fLastHeadingDiff);
85 protected override event void Read(PawnStateReader ctx)
89 ctx.Read(m_fLastHeadingDiff);
93class DayZPlayerImplementMove : DayZPlayerMove
95 protected override event void Write(PawnMoveWriter ctx, PawnMove prev)
97 super.Write(ctx, prev);
101 protected override event void Read(PawnMoveReader ctx, PawnMove prev)
103 super.Read(ctx, prev);
215 #ifdef PLATFORM_CONSOLE
225 RegisterNetSyncVariableBoolSignal(
"m_TriggerPullPlayerOutOfVehicleSynch");
228#ifdef FEATURE_NETWORK_RECONCILIATION
229 protected override event typename GetOwnerStateType()
231 return DayZPlayerImplementOwnerState;
234 protected override event typename GetMoveType()
236 return DayZPlayerImplementMove;
239 protected override event void ObtainState( PawnOwnerState pState)
241 super.ObtainState(pState);
243 DayZPlayerImplementOwnerState state = DayZPlayerImplementOwnerState.Cast(pState);
245 state.m_fLastHeadingDiff = m_fLastHeadingDiff;
248 protected override event void RewindState(PawnOwnerState pState, PawnMove pMove, inout NetworkRewindType pRewindType)
250 super.RewindState(pState, pMove, pRewindType);
252 DayZPlayerImplementOwnerState state = DayZPlayerImplementOwnerState.Cast(pState);
254 if (pRewindType != NetworkRewindType.ADDITIVE)
256 m_fLastHeadingDiff = state.m_fLastHeadingDiff;
421 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
425 optics = weapon.GetAttachedOptics();
453 if (optic.HasEnergyManager())
454 optic.GetCompEM().SwitchOn();
463 if (optic.HasEnergyManager())
464 optic.GetCompEM().SwitchOff();
531 string text = super.GetDebugText();
533 text +=
"IsSimulationDisabled: " + GetIsSimulationDisabled() +
"\n";
558 for (
int i = 0; i < transport.CrewSize(); ++i)
560 if (transport.CrewMember(i) ==
this)
572 transport.CrewGetOut(crewIdx);
579#ifdef FEATURE_NETWORK_RECONCILIATION
585 identity.Possess(
this);
599 DisableSimulation(
false);
620 super.OnVariablesSynchronized();
634 PhysicsSetSolid(
true);
637 DayZPlayerVehicleCommandDeathCallback callbackVeh;
676 keepInLocalSpace =
true;
690#ifdef FEATURE_NETWORK_RECONCILIATION
696 identity.Possess(
this);
702 DisableSimulation(
false);
703 GetItemAccessor().HideItemInHands(
false);
712 PhysicsSetRagdoll(
true);
731 switch (pCurrentCommandID)
766 super.EEKilled(killer);
779 if (!
GetGame().GetMission().IsPlayerRespawning())
781 message =
"#dayz_implement_dead";
784 #ifdef PLATFORM_CONSOLE
813 if (
g_Game.GetMissionState() != DayZGame.MISSION_STATE_GAME)
821 if (m_KilledByHeadshot)
861 if (
GetGame().GetUIManager().IsDialogVisible())
873 if (
GetGame().GetUIManager().GetMenu())
915 int userDataType = 0;
916 if (!ctx.
Read(userDataType))
918 Error(
"DayZPlayer: OnInputForRemote - cannot read input type");
922 switch (userDataType)
934 Error(
"OnInputForRemote - unknown userDataType=" + userDataType);
941 int userDataType = 0;
942 if (!ctx.
Read(userDataType))
944 Error(
"DayZPlayer: OnInputFromServer - cannot read input type");
948 switch (userDataType)
954 Error(
"OnInputFromServer - unknown userDataType=" + userDataType);
967 GetItemAccessor().OnItemInHandsChanged();
972 GetItemAccessor().ResetWeaponInHands();
991 ItemOptics optic = weapon.GetAttachedOptics();
1001 if (wantedLift != currentLift)
1011 if (wantedObstruction != currentObstruction)
1015 const float outTime = 0.150;
1016 const float inTime = 0.010;
1017 const float inTimeLift = 0.100;
1022 wantedObstruction = 0.0;
1023 smoothTime = inTimeLift;
1028 smoothTime =
Math.
Lerp(outTime, inTime, t);
1038 #ifdef DIAG_DEVELOPER
1046 #ifdef DIAG_DEVELOPER
1075 weapon.StepZeroingUpAllMuzzles();
1086 weapon.StepZeroingDownAllMuzzles();
1093 HandleOptic(optic,
false, pInputs, pExitIronSights);
1099 if (weapon && weapon.IsInOptics())
1101 weapon.ExitOptics();
1125 bool autofire = weapon.GetCurrentModeAutoFire(weapon.GetCurrentMuzzle()) && weapon.IsChamberEjectable(weapon.GetCurrentMuzzle());
1126 int burst = weapon.GetCurrentModeBurstSize(weapon.GetCurrentMuzzle());
1127 int burst_count = weapon.GetBurstCount();
1128 if (!autofire && (burst < 2 || burst_count < 1))
1135 else if (autofire || burst > 1)
1137#ifdef DIAG_DEVELOPER
1139 if (burst_option == 0)
1144 if (autofire || burst_count < burst)
1151 weapon.ResetBurstCount();
1153#ifdef DIAG_DEVELOPER
1155 else if (burst_option == 1)
1157 if (burst > 1 && burst_count == burst)
1159 weapon.ResetBurstCount();
1161 else if (burst > 1 && burst_count < burst)
1178 #ifdef PLATFORM_CONSOLE
1181 if (!weapon.IsWaitingForActionFinish() && !
IsFighting())
1183 int muzzle_index = weapon.GetCurrentMuzzle();
1185 if (weapon.IsChamberFiredOut(muzzle_index))
1187 if (weapon.CanProcessWeaponEvents())
1192 pExitIronSights =
true;
1216 bool controllerPressIn;
1217 bool controllerPressOut;
1221 weapon =
Weapon_Base.Cast(optic.GetHierarchyParent());
1222 FOVcount = optic.GetStepFOVCount();
1223 controllerPressIn = input.
SyncedPress_ID(UAZoomInOpticsControllerHelper);
1229 optic.SetStepFOVIndex(0);
1233 if (controllerPressIn)
1235 if (!optic.StepFOVUp())
1239 optic.SetStepFOVIndex(0);
1242 if (weapon && weapon.CanEnterIronsights())
1258 weapon =
Weapon_Base.Cast(optic.GetHierarchyParent());
1259 FOVcount = optic.GetStepFOVCount();
1260 controllerPressOut = input.
SyncedPress_ID(UAZoomOutOpticsControllerHelper);
1263 if (!optic.StepFOVDown())
1265 if (controllerPressOut)
1267 if (FOVcount > 0 && (!weapon || !weapon.CanEnterIronsights()))
1269 optic.SetStepFOVIndex(FOVcount - 1);
1273 if (weapon && weapon.CanEnterIronsights())
1285 optic.SetStepFOVIndex(FOVcount - 1);
1322 SyncHitInfo greatest_hit;
1330 if (IsAlive() && !IsUnconscious() && data.m_HasSource &&
GetGame().GetMission().GetHud() &&
GetGame().
GetPlayer() ==
this)
1343 greatest_hit = data;
1346 else if (data.m_Fullbody)
1348 greatest_hit = data;
1423 vector targetDirection = GetDirection();
1426 targetDirection[1] = 0;
1427 toSourceDirection[1] = 0;
1432 float cosFi =
vector.
Dot(targetDirection, toSourceDirection);
1433 vector cross = targetDirection * toSourceDirection;
1437 pAnimHitDir = -pAnimHitDir;
1445 int invertHitDir = 0;
1448 pAnimHitFullbody =
false;
1451 switch (pDamageType)
1461 pAnimHitFullbody =
true;
1465 int impactBehaviour = 0;
1467 if (!IsUnconscious() && GetHealth(
"",
"Shock") > 25)
1470 if (pComponent ==
"Torso" || pComponent ==
"Head")
1475 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1476 pAnimHitFullbody =
true;
1488 pAnimHitFullbody =
true;
1496 vector targetDirection = GetDirection();
1499 targetDirection[1] = 0;
1500 toSourceDirection[1] = 0;
1505 float cosFi =
vector.
Dot(targetDirection, toSourceDirection);
1506 vector cross = targetDirection * toSourceDirection;
1511 if (invertHitDir > 0)
1515 pAnimHitDir = -pAnimHitDir;
1523 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
1525 m_TransportHitRegistered =
false;
1530 float animHitDirDeath;
1536 if (!m_DeathSyncSent)
1538 Man killer = source.GetHierarchyRootPlayer();
1543 m_KillerData.m_Killer = killer;
1544 m_KillerData.m_MurderWeapon = source;
1547 if (killer && killer.IsPlayer())
1550 if (dmgZone ==
"Brain")
1552 m_KilledByHeadshot =
true;
1553 if (m_KillerData.m_Killer == killer)
1554 m_KillerData.m_KillerHiTheBrain =
true;
1563 bool animHitFullbody;
1564 if (
EvaluateDamageHitAnimation(damageResult, damageType, source, dmgZone, ammo, modelPos, animType, animHitDir, animHitFullbody))
1568 bool skipSoundRequest =
false;
1569 if (damageType ==
DamageType.CUSTOM && GetCommand_Fall())
1572 if (!skipSoundRequest)
1578 if (animHitFullbody)
1638 if (actMenuValue != 0)
1668 if (IsUnconscious() || (GetCommand_Move() && GetCommand_Move().
IsLeavingUncon()))
1751 if (
IsRaised() && GetInputInterface().SyncedPress(
"UAGetOverControllerHelper"))
1779 bool CanClimb(
int climbType, SHumanCommandClimbResult climbRes)
1787 if (
IsRaised() && GetInputInterface().SyncedPress(
"UAGetOverControllerHelper"))
1799 if (
Class.
CastTo(entity,climbRes.m_GrabPointParent) && entity.IsHologram())
1801 if (
Class.
CastTo(entity,climbRes.m_ClimbStandPointParent) && entity.IsHologram())
1803 if (
Class.
CastTo(entity,climbRes.m_ClimbOverStandPointParent) && entity.IsHologram())
1849 bool bADSToggle =
false;
1850 bool exitSights =
false;
1857 if (playerPB.IsRolling())
1896 if (bADSToggle && !GetCommand_Melee2() && !
GetThrowing().IsThrowingModeEnabled())
1898 if (hia.IsItemInHandsWeapon() && playerPB.GetItemInHands() && playerPB.GetItemInHands().IsWeapon() && playerPB.GetWeaponManager() && !playerPB.GetWeaponManager().IsRunning())
1901 ItemOptics optic = weapon.GetAttachedOptics();
1902 bool switchToADS =
false;
1903 bool canUseIronsights = weapon.CanEnterIronsights();
1904 bool canUseOptics = optic != NULL;
1906 if (canUseIronsights || canUseOptics)
1914 switchToADS =
false;
1922 else if (switchToADS)
1925 if (weapon.GetWasIronSight() && !canUseIronsights)
1927 weapon.SetWasIronSight(
false);
1929 else if (!weapon.GetWasIronSight() && !canUseOptics)
1931 weapon.SetWasIronSight(
true);
1934 if (weapon.GetWasIronSight())
1939 else if (!weapon.GetWasIronSight() || (!canUseIronsights && canUseOptics))
1992 if (
GetGame().GetWorld().Is3rdPersonDisabled())
2042 float headingAngle = MiscGameplayFunctions.GetHeadingAngle(
this);
2045 float headingAngleDiff = 0.0;
2056 if (headingAngleDiff > 0.2)
2060 float timefilterconstant = 400 - (headingAngleDiff * 100);
2064 float volume = headingAngleDiff / 0.5;
2080 string soundSetName =
"Cloth_Body_longmove_TShirt_Soundset";
2082 string bodyClothName =
"";
2086 bodyClothName = attachment.GetAttachmentSoundType();
2089 if (bodyClothName !=
"")
2091 string path =
"CfgSoundTables CfgAttachmentSoundTables Cloth_Body_Longmove_LookupTable";
2094 for (
int i = 0; i < soundCount; i++)
2099 if (
name == bodyClothName)
2103 soundSetName = stringArray.Get(0);
2113 if (soundObjectBuilder != NULL)
2115 SoundObject soundObject = soundObjectBuilder.BuildSoundObject();
2117 if (soundObject != NULL)
2123 wave.SetVolumeRelative(volume);
2133 float volume2 = headingAngleDiff * 2;
2149 string soundSetName2 =
"walkProne_noHS_asphalt_ext_Char_SoundSet";
2152 if (surfaceType !=
"")
2154 string movementSurfaceType =
"walkProne_" + surfaceType;
2156 string path2 =
"CfgSoundTables CfgStepSoundTables walkProne_noHS_Char_LookupTable";
2159 for (
int i2 = 0; i2 < soundCount2; i2++)
2164 if (name2 == movementSurfaceType)
2168 soundSetName2 = stringArray2.Get(0);
2170 delete stringArray2;
2178 if (soundObjectBuilder2 != NULL)
2180 SoundObject soundObject2 = soundObjectBuilder2.BuildSoundObject();
2182 if (soundObject2 != NULL)
2188 wave2.SetVolumeRelative(volume2);
2237 override void CommandHandler(
float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished)
2241 vector playerPosition = PhysicsGetPositionWS();
2244 GetHumanInventory().Update(pDt);
2252 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
2256 bool isWeapon = entityInHands && entityInHands.IsInherited(
Weapon);
2258 bool updateAimingMdfr =
false;
2262 updateAimingMdfr =
true;
2267 updateAimingMdfr =
true;
2271 if (updateAimingMdfr)
2273 if (isRaisedNow && isWeapon)
2289 bool exitIronSights =
false;
2294 bool exitOptic =
false;
2322 if (
m_Swimming.CheckSwimmingStart( waterLevel ) )
2327 StartCommand_Swim();
2334 if (pCurrentCommandFinished)
2350 if (PhysicsIsFalling(
true))
2352 StartCommand_Fall(0);
2360 StartCommand_Swim();
2364 StartCommand_Move();
2366 if (GetHumanInventory().GetEntityInHands())
2461 OnLand(pCurrentCommandID, fallDamageData);
2462 npar = type.GetNoiseParamsLandLight();
2465 else if (fallDamageData.
m_Height < 3.0)
2472 OnLand(pCurrentCommandID, fallDamageData);
2473 npar = type.GetNoiseParamsLandLight();
2476 else if (fallDamageData.
m_Height < 5.0)
2479 OnLand(pCurrentCommandID, fallDamageData);
2480 npar = type.GetNoiseParamsLandHeavy();
2486 OnLand(pCurrentCommandID, fallDamageData);
2487 npar = type.GetNoiseParamsLandHeavy();
2493 OnPlayerRecievedHit();
2506 else if (PhysicsIsFalling(
false))
2509 StartCommand_Fall(0);
2526 hcls.m_fFwMaxDistance = 3;
2528 hcls.m_fFwMaxDistance = 1.2;
2530 SHumanCommandClimbResult ret;
2556 if (amplitude > 0.1 || force)
2559 ad.SetTalking(
true);
2576 case VoiceLevelWhisper:
2577 vonpar = pt.GetNoiseParamsWhisper();
2579 case VoiceLevelTalk:
2580 vonpar = pt.GetNoiseParamsTalk();
2582 case VoiceLevelShout:
2583 vonpar = pt.GetNoiseParamsShout();
2593 ad.SetTalking(
false);
2605 m_Throwing.HandleThrowing(hic, hcw, entityInHands, pDt);
2649 playerDebug.CommandHandler();
2681 EntityAI item_in_hands = player.GetHumanInventory().GetEntityInHands();
2682 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) &&
GetGame().
GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2684 player.PredictiveDropEntity(item_in_hands);
2756 ad.SetInjured(v,
true);
2763 ad.SetExhaustion(v,
true);
2783 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
2786 optics = weapon.GetAttachedOptics();
2787 else if (entityInHands)
2833 return transport.Get3rdPersonCameraType();
2994 #ifdef PLATFORM_CONSOLE
2995 if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() == 0)
3010 int userDataTypeParam = 0;
3011 if (!ctx.
Read(userDataTypeParam))
3013 Error(
"DayZPlayerImplement: cannot read input type");
3030 if (ctx.
Read(target))
3036 if (ctx.
Read(hitPos))
3041 int hitZoneIdx = -1;
3042 if (ctx.
Read(hitZoneIdx))
3047 int finisherType = -1;
3048 if (ctx.
Read(finisherType))
3065 switch (pJunctureID)
3073 SyncHitInfo data =
new SyncHitInfo;
3087 switch (boots.GetAttachmentSoundType())
3105 switch (attachment.GetAttachmentSoundType())
3108 return AnimUpperBodyType.NylonJacket;
3110 return AnimUpperBodyType.TShirt;
3112 return AnimUpperBodyType.WoolShirt;
3114 return AnimUpperBodyType.HeavyJacket;
3115 case "LeatherJacket":
3116 return AnimUpperBodyType.LeatherJacket;
3118 return AnimUpperBodyType.Coat;
3119 case "ChemlonDress":
3120 return AnimUpperBodyType.ChemlonDress;
3122 return AnimUpperBodyType.Ghillie;
3124 return AnimUpperBodyType.Chainmail;
3128 return AnimUpperBodyType.None;
3136 switch (back.GetAttachmentSoundType())
3139 return AnimBackType.Small;
3141 return AnimBackType.Military;
3143 return AnimBackType.Outdoor;
3145 return AnimBackType.Ghillie;
3149 return AnimBackType.None;
3158 AnimRangedWeaponType shoulderAttType = AnimRangedWeaponType.None;
3159 AnimRangedWeaponType meleeAttType = AnimRangedWeaponType.None;
3161 if (shoulderAttachment)
3163 switch (shoulderAttachment.GetAttachmentSoundType())
3167 shoulderAttType = AnimRangedWeaponType.Shotgun;
3172 shoulderAttType = AnimRangedWeaponType.Rifle;
3177 if (meleeAttachment)
3179 switch (meleeAttachment.GetAttachmentSoundType())
3183 meleeAttType = AnimRangedWeaponType.Shotgun;
3188 meleeAttType = AnimRangedWeaponType.Rifle;
3194 if (shoulderAttType == AnimRangedWeaponType.Shotgun || meleeAttType == AnimRangedWeaponType.Shotgun)
3195 return AnimRangedWeaponType.Shotgun;
3197 if (shoulderAttType == AnimRangedWeaponType.Rifle || meleeAttType == AnimRangedWeaponType.Rifle)
3198 return AnimRangedWeaponType.Rifle;
3200 return AnimRangedWeaponType.None;
3208 g_Game.SurfaceUnderObjectByBoneCorrectedLiquid(
this, limbType, surfaceType, liquidType);
3230 if (noisePar != null)
3244 GetMovementState(state);
3252 if (pUserInt % 2 == 1)
3255 if (surface.
Length() == 0)
3261 if (surface.
Length() == 0)
3265 if (surface.
Length() != 0)
3273 if (stepParticleID > 0)
3284 if (surface2.
Length() != 0)
3292 orientation =
Vector(0, 0, 0);
3295 excludedObjects.Insert(
this);
3298 if (
GetGame().IsBoxCollidingGeometry(
GetPosition(), orientation, edgeLength, ObjIntersectView, ObjIntersectNone, excludedObjects, collidedObjects))
3300 for (
int i = 0; i < collidedObjects.Count(); ++i)
3306 if (colObject && colObject.HasPlayerCollisionSound())
3308 for (
int j = 0; j < type.GetVegetationSounds().
Count(); ++j)
3317 if (vegSoundObject != NULL)
3320 PlaySound(vegSoundObject, vegSoundObjectBuilder);
3332 SoundObject soundObject = soundBuilder.BuildSoundObject();
3333 if (soundObject != NULL)
3345 float noiseMultiplier = 0;
3349 noiseParams = type.GetNoiseParamsStand();
3351 noiseParams = type.GetNoiseParamsCrouch();
3353 noiseParams = type.GetNoiseParamsProne();
3356 Debug.
Log(
string.Format(
"Wrong stance, id: %1 using backup with stand stance (id: 0)", state.
m_iStanceIdx));
3357 noiseParams = type.GetNoiseParamsStand();
3362 AddNoise(noiseParams, noiseMultiplier);
3375 if (pEventType ==
"Sound")
3380 if (eventReplaceID > 0)
3389 else if (pEventType ==
"SoundWeapon")
3394 if (eventReplaceID > 0)
3403 else if (pEventType ==
"SoundAttachment")
3407 else if (pEventType ==
"SoundVoice")
3422 Debug.
Log(
"OnSoundEvent: Unknown sound event \"" + pEventType +
"\"");
3435 AnimSoundEvent soundEvent = null;
3439 EntityAI entityInHands = GetHumanInventory().GetEntityInHands();
3440 if (entityInHands && entityInHands.IsInherited(
ItemBase))
3444 if (item.HasQuantity())
3445 quantity = (
float)item.GetQuantity() / (item.GetQuantityMax() - item.GetQuantityMin());
3450 if (soundEvent == null)
3453 soundEvent = type.GetSoundWeaponEvent(pUserInt);
3456 if (soundEvent != null)
3458 if (!
GetGame().IsDedicatedServer())
3463 builder.AddVariable(
"quantity", quantity);
3464 builder.AddVariable(
"interior", IsSoundInsideBuilding());
3466 SoundObject soundObject = builder.BuildSoundObject();
3467 if (soundObject != NULL)
3472 if (pUserString ==
"StopOnAnimEnd")
3495 pUserString.
Split(
",", attachments);
3496 for (
int i = 0; i < attachments.Count(); i++)
3498 int attachmentHash = -1;
3499 if (attachments[i] ==
"shoulder")
3501 else if (attachments[i] ==
"body")
3503 else if (attachments[i] ==
"back")
3508 if (soundBuilder != NULL)
3510 SoundObject soundObject = soundBuilder.BuildSoundObject();
3511 if (soundObject != NULL)
3524 soundObjectBuilder.AddVariable(
"laddertype", 1);
3528 soundObjectBuilder.AddVariable(
"laddertype", 0);
3535 soundObjectBuilder.AddVariable(
"bare", 1);
3536 soundObjectBuilder.AddVariable(
"sneakers", 0);
3537 soundObjectBuilder.AddVariable(
"boots", 0);
3541 soundObjectBuilder.AddVariable(
"bare", 0);
3542 soundObjectBuilder.AddVariable(
"sneakers", 1);
3543 soundObjectBuilder.AddVariable(
"boots", 0);
3547 soundObjectBuilder.AddVariable(
"bare", 0);
3548 soundObjectBuilder.AddVariable(
"sneakers", 0);
3549 soundObjectBuilder.AddVariable(
"boots", 1);
3556 DayZPlayerTypeAnimTable table = type.GetSoundTable();
3557 AnimSoundEvent soundEvent;
3560 soundEvent = table.GetSoundEvent(pUserInt);
3563 if (soundEvent != NULL)
3565 if (!
GetGame().IsDedicatedServer())
3568 if (GetCommand_Ladder())
3572 objectBuilder.AddEnvSoundVariables(
GetPosition());
3574 SoundObject soundObject = objectBuilder.BuildSoundObject();
3575 if (soundObject != NULL)
3580 if (pUserString ==
"StopOnAnimEnd")
3587 if (soundEvent.m_NoiseParams != NULL)
3609 if (mask || head_gear)
3611 string category_mask;
3612 string category_headgear;
3615 int priority_headgear;
3619 category_mask = mask.ConfigGetString(
"soundVoiceType");
3620 priority_mask = mask.ConfigGetInt(
"soundVoicePriority");
3624 category_headgear = head_gear.ConfigGetString(
"soundVoiceType");
3625 priority_headgear = head_gear.ConfigGetInt(
"soundVoicePriority");
3628 if (priority_headgear >= priority_mask && category_headgear !=
"")
3630 category = category_headgear;
3634 category = category_mask;
3649 int maleVoiceType = 0;
3650 int femaleVoiceType = 0;
3651 if (player.IsMale())
3653 maleVoiceType = player.GetVoiceType();
3657 femaleVoiceType = player.GetVoiceType();
3660 soundBuilder.AddVariable(
"male", maleVoiceType);
3661 soundBuilder.AddVariable(
"female", femaleVoiceType);
3664 SoundObject soundObject = soundBuilder.BuildSoundObject();
3665 if (soundObject != NULL)
3668 wave =
PlaySound(soundObject, soundBuilder);
3687 bool unconscious = IsUnconscious();
3690 if (ib && (
PlayerBase.DEBUG_INVENTORY_ACCESS || !IsAlive() || restrained || unconscious || ib.CanBeMovedOverride()))
3719 if (!IsAlive() || player.IsUnconscious())
3729 super.OnRPC(sender, rpc_type, ctx);
3731 if (rpc_type ==
ERPCs.RPC_DAYZPLAYER_DEBUGSERVERWALK)
3733 Print(
"ERPCs.RPC_DAYZPLAYER_DEBUGSERVERWALK");
3735 Param1<bool> rp =
new Param1<bool>(
false);
3738 GetInputController().OverrideMovementSpeed(rp.param1, 1);
3739 GetInputController().OverrideAimChangeX(rp.param1, 0.01);
3754 return fall.PhysicsLanded();
3790 StartCommand_Move();
3844 RegisterTransportHit(transport);
3916 preferredOptics = opticsInHands;
3923 preferredOptics = weaponInHands.GetAttachedOptics();
3932 optics.Insert(preferredOptics);
3940 if (!blockedByOptics &&
PlayerBase.Cast(
this).IsNVGWorking())
3942 NVGoggles nvg = NVGoggles.Cast(nvAttachment);
3963 if (FindAttachmentBySlotName(
"Eyewear") && FindAttachmentBySlotName(
"Eyewear").FindAttachmentBySlotName(
"NVG"))
3965 entity = FindAttachmentBySlotName(
"Eyewear").FindAttachmentBySlotName(
"NVG");
3967 else if (FindAttachmentBySlotName(
"Headgear") && FindAttachmentBySlotName(
"Headgear").FindAttachmentBySlotName(
"NVG"))
3969 entity = FindAttachmentBySlotName(
"Headgear").FindAttachmentBySlotName(
"NVG");
3975#ifdef DIAG_DEVELOPER
3978 return Weapon_Base.Cast(GetHumanInventory().CreateInHands(type));
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
override event void Read(PawnStateReader ctx)
override event void Write(PawnStateWriter ctx)
proto native CEApi GetCEApi()
Get the CE API.
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DamageType
exposed from C++ (do not change)
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
proto native void ResetDeathCooldown()
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)
void DayZPlayerMeleeFightLogic_LightHeavy(DayZPlayerImplement player)
void DayZPlayerUtils()
cannot be instantiated
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
bool IsProcessing()
returns true when FP is heating or cooling
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
proto void AddNoise(EntityAI source_entity, NoiseParams noise_params, float external_strenght_multiplier=1.0)
class NoiseSystem NoiseParams()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
void PlayerSoundEventHandler(PlayerBase player)
override void OnRPC(ParamsReadContext ctx)
void PluginDayzPlayerDebug()
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
void ReplaceSoundEventHandler(PlayerBase player)
proto native UIManager GetUIManager()
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
proto native NoiseSystem GetNoiseSystem()
proto native World GetWorld()
override ScriptCallQueue GetCallQueue(int call_category)
proto native AbstractSoundScene GetSoundScene()
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
proto native int GetVoiceLevel(Object player=null)
Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
proto int GetTime()
returns mission time in milliseconds
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
proto native Input GetInput()
proto native Mission GetMission()
Super root of all classes in Enforce script.
void ProcessSoundEvent(string pEventType, string pUserString, int pUserInt)
void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
bool IsWeaponDebugEnabled()
EntityAI GetNVEntityAttached()
void ResetWeaponRaiseProgress()
void SendSoundEventEx(EPlayerSoundEventID id, int param=0)
DayZPlayerImplementThrowing GetThrowing()
void LockControls(bool state)
override void StopDeathDarkeningEffect()
override bool IsShootingFromCamera()
bool m_IsUnconsciousFalling
bool m_HandheldOpticsInUse
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
void OverrideShootFromCamera(bool pState)
WeaponManager GetWeaponManager()
void SendCompleteWeaponRaiseJuncture()
AnimBackType GetBackAttachmentType()
void ShowDeadScreen(bool show, float duration)
void OverrideSlidePoseAngle(float value)
movement sliding override, originally for FB gestures
bool IsWeaponRaiseCompleted()
ref DayZPlayerImplementJumpClimb m_JumpClimb
bool m_WeaponRaiseCompleted
measures time from the weapon raise start to complete raise (once per)
bool IsTryingHoldBreath()
void ResetDamageHitState(bool resetTimer)
void SetFallYDiff(float value)
bool IsLanded(int pCurrentCommandID)
void CompleteWeaponRaise()
float m_SprintedTimePerStanceMin
void OnSoundEvent(string pEventType, string pUserString, int pUserInt)
void ShowWeaponDebug(bool show)
bool m_ShouldBeUnconscious
void SetIronsights(bool value)
ref array< AbstractWave > m_PerformedActionSounds
void TriggerPullPlayerOutOfVehicle()
ref Timer m_ADSAutomationTimer
bool IsFBSymptomPlaying()
AbstractWave ProcessVoiceEvent(string pEventType, string pUserString, int pUserInt)
bool CheckForRespawn(EntityAI item)
override bool IsEyeZoom()
Legacy.
bool m_IsShootingFromCamera
void ProcessAttachmentEvent(string pEventType, string pUserString, int pUserInt)
void RequestSoundEventEx(EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
float GetSlidePoseAngle()
void OnParticleEvent(string pEventType, string pUserString, int pUserInt)
void ~DayZPlayerImplement()
bool HandleDamageHit(int pCurrentCommandID)
override array< InventoryItem > OnDrawOptics2D()
void SetIsInThirdPerson(bool state)
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
void SetSuicide(bool state)
bool m_CameraOpticsAimOverride
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void HandleWeapons(float pDt, Entity pInHands, HumanInputController pInputs, out bool pExitIronSights)
ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
void EOnContact(IEntity other, Contact extra)
void CheckAnimationOverrides()
AbstractWave PlaySound(SoundObject so, SoundObjectBuilder sob)
bool IsWeaponObstructionBlockingADS()
bool ProcessJumpOrClimb(float pDt, int pCurrentCommandID)
bool m_IsFireWeaponRaised
ref DayZPlayerImplementAiming m_AimingModel
void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
bool m_ProcessLiftWeaponState
string GetSurfaceType(SurfaceAnimationBone limbType)
ref DeathEffectTimer m_DeathEffectTimer
void SetClimbingLadderType(string value)
static const float DEFAULT_DYING_TIME
ref DayZPlayerImplementThrowing m_Throwing
override float GetCurrentWaterLevel()
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void HideClothing(ItemOptics optic, bool state)
bool CanPickupHeavyItemSwap(notnull EntityAI item1, notnull EntityAI item2)
override void SetCurrentWaterLevel(float pWaterLevel)
void TriggerPullPlayerOutOfVehicleImpl()
bool m_ContinueFirearmMelee
float m_fObstructionSmooth
bool m_TriggerPullPlayerOutOfVehicleSynch
bool IsAlreadyInFallingCommand(int pCurrentCommandID)
int m_LastCommandBeforeUnconscious
bool IsInFBEmoteState()
Checks if fullbody animation or specific locked state is active in emote manager.
bool CanConsumeStamina(EStaminaConsumers consumer)
Implementations only! - used on PlayerBase.
bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
float m_TestDamageCounter
override void OnItemInHandsChanged()
static const int DEAD_SCREEN_DELAY
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
override int CameraHandler(int pCameraMode)
int m_DebugWeaponChangeShowSlot
override int GetEyeZoomLevel()
Transport GetTransportCache()
Get the transport that was cached when entering unconsciousness.
string m_DebugWeaponChangeItem
bool CanStartConsumingStamina(EStaminaConsumers consumer)
bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
override bool IsInThirdPerson()
void ProcessFeetDamageServer(int pUserInt)
int m_PullPlayerOutOfVehicleState
void SetVariablesLadderSoundObjectBuilder(SoundObjectBuilder soundObjectBuilder)
DayZPlayerImplementMeleeCombat GetMeleeCombat()
void SetHandheldOpticsInUse(bool state)
ref array< ref SyncHitInfo > m_SyncedHitDataArray
void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
DayZPlayerImplementFallDamage GetFallDamage()
ref WeaponDebug m_WeaponDebug
float m_LastHeadingAngleBlock
void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
void AttenuateSoundIfNecessary(SoundObject soundObject)
bool m_ProcessWeaponRaiseCompleted
void EvaluateDamageHit(int pCurrentCommandID)
Must be ran at the start of CommandHandler before Jump is triggered.
void OnMovementChanged()
Event, called when HumanMovementState.m_iMovement changes...walk, run, sprint, etc....
bool CanClimb(int climbType, SHumanCommandClimbResult climbRes)
bool m_PullPlayerOutOfVehicleKeepsInLocalSpace
override bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
is replayed after correction when 'NetworkRewindType.REPLAY' is used
void SetOptics(bool value)
int m_DebugWeaponChangeStage
bool IsInFullbodyDamageAnimation()
void SetReturnToOptics(bool state)
ref Timer m_FightEndBlendTimer
bool PlaySoundEventType(ESoundEventType soundType, int soundEventID, int param=0)
Handle sound event by respective sound handler based on its type.
float m_LastHeadingAngleBlock2
bool m_isFBsymptomPlaying
override void OnInputForRemote(ParamsReadContext ctx)
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
event from damage system
override void EEKilled(Object killer)
string m_ClimbingLadderType
float m_ProcessObstructWeapon
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
AnimRangedWeaponType GetShoulderAttachmentType()
bool m_AimingFinisherStarted
void CommandHandlerDebug(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
int GetTypeOfDeath(int pCurrentCommandID)
ref HumanMovementState m_MovementState
time step for gradual update of dead screen visibilibty up to full visbility [s]
ref DayZPlayerImplementFallDamage m_FallDamage
int m_ActionSoundCategoryHash
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
bool IsHandheldOpticsInUse()
bool m_CameraEyeZoom
DEPRECATED.
override void OnVariablesSynchronized()
int m_LastSurfaceUnderHash
AnimBootsType GetBootsType()
float GetWeaponObstruction()
bool m_IsTryingHoldBreath
void SimulateDeath(bool state)
DayZPlayerInventory GetDayZPlayerInventory()
bool EvaluateDamageHitAnimation(TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos, out int pAnimType, out float pAnimHitDir, out bool pAnimHitFullbody)
selects animation type and direction based on damage system data
static const float DYING_PROGRESSION_TIME
how long does it take to full death screen [s]
bool IsFireWeaponRaised()
bool HandleDeath(int pCurrentCommandID)
float m_ObstructWeapon_player
const float HIT_INTERVAL_MIN
void DayZPlayerImplement()
constructor
bool CheckForTakeItem(EntityAI item)
override string GetDebugText()
AnimUpperBodyType GetBodyAttachmentType()
void ProcessWeaponEvent(string pEventType, string pUserString, int pUserInt)
bool CanPickupHeavyItem(notnull EntityAI item)
-------------— Checks if player can pick up heavy item ----------------------—
bool m_ProcessFirearmMeleeHit
SHumanCommandMoveSettings m_MoveSettings
void OnJumpEnd(int pLandType=0)
void AddNoise(NoiseParams noisePar, float noiseMultiplier=1.0)
DayZPlayerImplementAiming GetAimingModel()
float m_DeathDarkeningCurrentTime
bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
bool CheckForDropItem(EntityAI item)
void HandleOptic(notnull ItemOptics optic, bool inHands, HumanInputController pInputs, out bool pExitOptics)
bool EvaluateDeathAnimation(int pDamageType, EntityAI pSource, string pAmmoType, out int pAnimType, out float pAnimHitDir)
selects animation type and direction based on damage system data
float m_CurrentWaterLevel
void OnStepEvent(string pEventType, string pUserString, int pUserInt)
void ResetDeathStartTime()
override bool AimingModel(float pDt, SDayZPlayerAimingModel pModel)
ref ReplaceSoundEventHandler m_ReplaceSoundEventHandler
DayZPlayerMeleeFightLogic_LightHeavy GetMeleeFightLogic()
void SendSoundEvent(EPlayerSoundEventID id)
float m_fObstructionSmoothVelocity[1]
void SwitchOptics(ItemOptics optic, bool state)
void OnInputUserDataReceived(ParamsReadContext ctx)
override void CommandHandler(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
override void OnInputFromServer(ParamsReadContext ctx)
ref DayZPlayerImplementSwimming m_Swimming
void SetDeathDarknessLevel(float duration, float tick_time)
void DepleteStaminaEx(EStaminaModifiers modifier, float dT=-1, float coef=1.0)
ECameraZoomType m_CameraEyeZoomLevel
Transport m_TransportCache
static const int DAYZCAMERA_OPTICS
optics
static const int DAYZCAMERA_1ST
1st person camera
static const int DAYZCAMERA_3RD_PRO_RAISED
3rd - laying raised
static const int DAYZCAMERA_3RD_CLIMB
climb / vault
static const int DAYZCAMERA_3RD_CRO_RAISED
3rd - crouch
static const int DAYZCAMERA_3RD_ERC_SPR
3rd - standing sprint
static const int DAYZCAMERA_3RD_PRO
3rd - laying
static const int DAYZCAMERA_3RD_ERC
3rd - standing
static const int DAYZCAMERA_IRONSIGHTS
ironsights camera
static const int DAYZCAMERA_3RD_CRO
3rd - crouch
static const int DAYZCAMERA_3RD_ERC_RAISED
3rd - standing raised
static const int DAYZCAMERA_1ST_UNCONSCIOUS
unconscious
static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE
3rd - laying raised
static const int DAYZCAMERA_1ST_VEHICLE
vehicle 1st person
static const int DAYZCAMERA_3RD_JUMP
jump
override void OnSimulationEnd()
override bool ShouldSimulationBeDisabled()
at which point does the stabilization start to get affected
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool RotateOrient(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static void SendDamageHitEx(DayZPlayer pPlayer, int pType, float pHitDir, bool pFullbody, TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos)
static const int SJ_DEATH
static bool ReadDamageHitParamsEx(ParamsReadContext pCtx, out SyncHitInfo pData)
static void SendDeath(DayZPlayer pPlayer, int pType, float pHitDir)
static const int SJ_DAMAGE_HIT
static bool ReadDeathParams(ParamsReadContext pCtx, out int pType, out float pHitDir)
SoundObjectBuilder GetSoundBuilder(int eventId, string slotName, int attachmentHash)
SoundObjectBuilder GetSoundBuilder(int eventId, int pMovement, int pSurfaceHash, AnimBootsType pBoots)
override SoundObjectBuilder GetSoundBuilder(int eventId, int parameterHash)
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
void SetVehicleCommand(HumanCommandVehicle hcv)
void SpawnHitDirEffect(DayZPlayer player, float hit_direction, float intensity_max)
proto static native bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
proto native bool IsFinisher()
proto native void Cancel()
cancels command melee and goes to HumanCommandMove
proto native float GetCurrentMovementSpeed()
0,1,2..3 idle, walk, run, sprint
proto native bool IsStandingFromBack()
return true if prone on back is chaning to crounch/stand
proto native bool IsChangingStance()
returns true if character is changing stance
proto native bool IsWakingUp()
proto native bool IsInWater()
proto native bool IsOnLand()
proto native Transport GetTransport()
proto native bool IsGettingIn()
proto native void ProcessLeaveEvents()
proto native bool WasGearChange()
proto native bool IsGettingOut()
proto native bool IsActionFinished()
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native void LiftWeapon(bool pState)
command for lifting weapon near obstacles (works only when weapon is raised)
proto native void ObstructWeapon(float pState01)
command for obstruction weapon near obstacles
proto native float GetWeaponObstruction()
return obstruction value
proto native bool IsWeaponLifted()
return if lifting weapon is active
proto native bool StartAction(WeaponActions pAction, int pActionType)
start reload,mechanism,chambering,unjam ...
proto native void SetADS(bool pState)
sets head tilt to optics
proto native int IsEvent()
return -1 when there is no event, otherwise it returns pId of event from animation
proto native EntityAI GetEntityInHands()
inventory for plain man/human
HumanInventory... with FSM (synchronous, no anims)
bool m_bJumpAllowed
default false
int m_StanceRotation[6]
6 stances -> all has movement mask, STANCEIDX_ ... is index
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
int m_iStanceIdx
current command's id
AnimSoundEvent GetSoundEvent(int event_id)
proto native void SetHands(notnull EntityAI parent, EntityAI e)
sets current inventory location type to Hands
provides access to slot configuration
proto native bool StepZeroingUp()
sets zeroing to next defined (respective to current) value in zeroing config array
proto native bool ExitOptics()
switches out of optics mode (if possible)
bool IsUsingOptics2DModel()
Returns whether this ItemOptics uses the 2D optics model.
proto native bool IsInOptics()
is weapon in optics mode or not
proto native bool IsUsingWeaponIronsightsOverride()
is optics using ironsights override settings or not
proto native bool EnterOptics()
switches to optics mode if possible
proto native bool StepZeroingDown()
sets zeroing to previous (respective to current) defined value in zeroing config array
static bool IsSyncLogEnable()
static void PlayVegetationCollideParticles(Object object, DayZPlayerImplement player)
static float GetNoiseMultiplier(DayZPlayerImplement playerImplement)
static float GetNoiseReduction(Weather weather)
proto void AddNoise(EntityAI source_entity, NoiseParams noise_params, float external_strenght_multiplier=1.0)
static void SetMultiplayState(bool state)
static const float WEAPON_RAISE_BLEND_DELAY
static const float FULL_SPRINT_DELAY_DEFAULT
static const float HEAVY_HIT_THRESHOLD
static const int CHECK_EVERY_N_STEP
The class that will be instanced (moddable)
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto bool Read(void value_in)
static int GetStepsParticleID(string surface_name)
proto native float GetHighestDamage(string healthType)
Native class for boats - handles physics simulation.
proto native bool SyncedPress_ID(int action, bool check_focus=true)
Returns true just in frame, when action was invoked (button was pressed)
proto native void ScreenFadeOut(float duration)
void ShowUICursor(bool visible)
proto native void CloseDialog()
proto native void ScreenFadeIn(float duration, string text, int backgroundColor, int textColor)
SoundObjectBuilder GetSoundObjectBuilder()
TIntArray GetAnimEventIds()
script counterpart to engine's class Weapon
proto native bool Is3rdPersonDisabled()
proto void SetVoiceOn(bool listening, bool toggled=false)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
proto float Normalize()
Normalizes vector. Returns length.
proto native void SetVerticalMinimumAimLimit(float value)
sets vertical minimum aim limit for a player
void SDayZPlayerHeadingModel()
cannot be created from script
void ForceStandUpForHeavyItems(notnull EntityAI item)
-------------— Forces player to stand up when swapping to heavy item ----------------------—
DayZPlayerInstanceType
defined in C++
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
proto native DayZPlayerInstanceType GetInstanceType()
proto native float IsPlayerSpeaking()
-------------— speaking anim ----------------------—
DayZPlayerConstants
defined in C++
int GetEyeZoomLevel()
returns eye zoom level, uses ECameraZoomType values
proto native bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
Serializer ParamsReadContext
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
proto void Print(void var)
Prints content of variable to console/log.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
EntityEvent
Entity events for event-mask, or throwing event from code.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Acos(float c)
Returns angle in radians from cosinus.
static proto int AbsInt(int i)
Returns absolute value.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static const float RAD2DEG
static proto float AbsFloat(float f)
Returns absolute value.
static proto float SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxVelocity, float dt)
Does the CD smoothing function - easy in | easy out / S shaped smoothing.
proto native AbstractWave Play3D(SoundObject soundObject, SoundObjectBuilder soundBuilder)
proto native void SetSoundVolume(float vol, float time)
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
class SoundObject SoundParams(string name)
proto native void SetSpeechExVolume(float vol, float time)
proto native void SetPosition(vector position)
Note: Sets the position locally if parented, retrieves globally with the sound offset.
proto native void SetVOIPVolume(float vol, float time)
proto native void SetKind(WaveKind kind)
proto native void SetRadioVolume(float vol, float time)
proto native void SetMusicVolume(float vol, float time)
proto native int Length()
Returns length of string.
proto native int Hash()
Returns hash of string.
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
class HumanCommandLadder HumanCommandSwim()
class HumanCommandMelee2 HumanCommandFall()
proto native bool IsLeavingUncon()
return true if character transitions out of uncon
class HumanCommandWeapons HumanCommandAdditives()
class SHumanGlobalSettings SHumanCommandMoveSettings()
class SHumanCommandSwimSettings SHumanCommandClimbSettings()