38class DeathEffectTimer
extends Timer
44 PPERequesterBank.GetRequester(PPERequester_DeathDarkening).Stop();
48#ifdef FEATURE_NETWORK_RECONCILIATION
50class DayZPlayerImplementOwnerState : DayZPlayerOwnerState
52 float m_fLastHeadingDiff;
54 protected override event void Write(PawnStateWriter ctx)
58 ctx.Write(m_fLastHeadingDiff);
61 protected override event void Read(PawnStateReader ctx)
65 ctx.Read(m_fLastHeadingDiff);
69class DayZPlayerImplementMove : DayZPlayerMove
71 protected override event void Write(PawnMoveWriter ctx, PawnMove prev)
73 super.Write(ctx, prev);
77 protected override event void Read(PawnMoveReader ctx, PawnMove prev)
79 super.Read(ctx, prev);
191 #ifdef PLATFORM_CONSOLE
203 RegisterNetSyncVariableBoolSignal(
"m_TriggerPullPlayerOutOfVehicleSynch");
206#ifdef FEATURE_NETWORK_RECONCILIATION
207 protected override event typename GetOwnerStateType()
209 return DayZPlayerImplementOwnerState;
212 protected override event typename GetMoveType()
214 return DayZPlayerImplementMove;
217 protected override event void ObtainState( PawnOwnerState pState)
219 super.ObtainState(pState);
221 DayZPlayerImplementOwnerState state = DayZPlayerImplementOwnerState.Cast(pState);
223 state.m_fLastHeadingDiff = m_fLastHeadingDiff;
226 protected override event void RewindState(PawnOwnerState pState, PawnMove pMove, inout NetworkRewindType pRewindType)
228 super.RewindState(pState, pMove, pRewindType);
230 DayZPlayerImplementOwnerState state = DayZPlayerImplementOwnerState.Cast(pState);
232 if (pRewindType != NetworkRewindType.ADDITIVE)
234 m_fLastHeadingDiff = state.m_fLastHeadingDiff;
399 EntityAI entityInHands = GetEntityInHands();
403 optics = weapon.GetAttachedOptics();
431 if (optic.HasEnergyManager())
432 optic.GetCompEM().SwitchOn();
441 if (optic.HasEnergyManager())
442 optic.GetCompEM().SwitchOff();
513 string text = super.GetDebugText();
515 text +=
"IsSimulationDisabled: " + GetIsSimulationDisabled() +
"\n";
540 for (
int i = 0; i < transport.CrewSize(); ++i)
542 if (transport.CrewMember(i) ==
this)
554 transport.CrewGetOut(crewIdx);
561#ifdef FEATURE_NETWORK_RECONCILIATION
567 identity.Possess(
this);
581 DisableSimulation(
false);
602 super.OnVariablesSynchronized();
619 EntityAI itemInHands = GetEntityInHands();
628 GetBoneTransformWS(boneIndex, m4);
632 GetInventory().DropEntityWithTransform(
InventoryMode.SERVER,
this, itemInHands, m4);
637 int deadBodyLifetime = ceApi.GetCEGlobalInt(
"CleanupLifetimeDeadPlayer");
638 if (deadBodyLifetime <= 0)
640 deadBodyLifetime = 3600;
643 itemInHands.SetLifetime(deadBodyLifetime);
658 PhysicsSetSolid(
true);
661 DayZPlayerVehicleCommandDeathCallback callbackVeh;
700 keepInLocalSpace =
true;
714#ifdef FEATURE_NETWORK_RECONCILIATION
720 identity.Possess(
this);
726 DisableSimulation(
false);
727 GetItemAccessor().HideItemInHands(
false);
736 PhysicsSetRagdoll(
true);
740 g_Game.GetWorld().SetVoiceOn(
false,
false);
755 switch (pCurrentCommandID)
790 super.EEKilled(killer);
803 if (!
g_Game.GetMission().IsPlayerRespawning())
805 message =
"#dayz_implement_dead";
808 #ifdef PLATFORM_CONSOLE
809 g_Game.GetUIManager().ScreenFadeIn(duration, message, FadeColors.DARK_RED, FadeColors.WHITE);
811 g_Game.GetUIManager().ScreenFadeIn(duration, message, FadeColors.BLACK, FadeColors.WHITE);
816 g_Game.GetUIManager().ScreenFadeOut(duration);
837 if (
g_Game.GetMissionState() != DayZGame.MISSION_STATE_GAME)
845 if (m_KilledByHeadshot)
861 g_Game.GetSoundScene().SetSoundVolume(0,0);
862 g_Game.GetSoundScene().SetSpeechExVolume(0,0);
863 g_Game.GetSoundScene().SetMusicVolume(0,0);
864 g_Game.GetSoundScene().SetVOIPVolume(0,0);
865 g_Game.GetSoundScene().SetRadioVolume(0,0);
882 if (
g_Game.GetUIManager())
884 g_Game.GetUIManager().ShowUICursor(
true);
885 if (
g_Game.GetUIManager().IsDialogVisible())
886 g_Game.GetUIManager().CloseDialog();
895 if (
g_Game.GetUIManager())
897 if (
g_Game.GetUIManager().GetMenu())
899 g_Game.GetUIManager().ShowUICursor(
true);
903 g_Game.GetUIManager().ShowUICursor(
false);
939 int userDataType = 0;
940 if (!ctx.
Read(userDataType))
942 Error(
"DayZPlayer: OnInputForRemote - cannot read input type");
946 switch (userDataType)
958 Error(
"OnInputForRemote - unknown userDataType=" + userDataType);
965 int userDataType = 0;
966 if (!ctx.
Read(userDataType))
968 Error(
"DayZPlayer: OnInputFromServer - cannot read input type");
972 switch (userDataType)
978 Error(
"OnInputFromServer - unknown userDataType=" + userDataType);
992 GetItemAccessor().OnItemInHandsChanged();
997 GetItemAccessor().ResetWeaponInHands();
1016 ItemOptics optic = weapon.GetAttachedOptics();
1026 if (wantedLift != currentLift)
1036 if (wantedObstruction != currentObstruction)
1040 const float outTime = 0.150;
1041 const float inTime = 0.010;
1042 const float inTimeLift = 0.100;
1047 wantedObstruction = 0.0;
1048 smoothTime = inTimeLift;
1053 smoothTime =
Math.
Lerp(outTime, inTime, t);
1063 #ifdef DIAG_DEVELOPER
1071 #ifdef DIAG_DEVELOPER
1100 weapon.StepZeroingUpAllMuzzles();
1111 weapon.StepZeroingDownAllMuzzles();
1118 HandleOptic(optic,
false, pInputs, pExitIronSights);
1124 if (weapon && weapon.IsInOptics())
1126 weapon.ExitOptics();
1150 bool autofire = weapon.GetCurrentModeAutoFire(weapon.GetCurrentMuzzle()) && weapon.IsChamberEjectable(weapon.GetCurrentMuzzle());
1151 int burst = weapon.GetCurrentModeBurstSize(weapon.GetCurrentMuzzle());
1152 int burst_count = weapon.GetBurstCount();
1153 if (!autofire && (burst < 2 || burst_count < 1))
1160 else if (autofire || burst > 1)
1162#ifdef DIAG_DEVELOPER
1164 if (burst_option == 0)
1169 if (autofire || burst_count < burst)
1176 weapon.ResetBurstCount();
1178#ifdef DIAG_DEVELOPER
1180 else if (burst_option == 1)
1182 if (burst > 1 && burst_count == burst)
1184 weapon.ResetBurstCount();
1186 else if (burst > 1 && burst_count < burst)
1203 #ifdef PLATFORM_CONSOLE
1206 if (!weapon.IsWaitingForActionFinish() && !
IsFighting())
1208 int muzzle_index = weapon.GetCurrentMuzzle();
1210 if (weapon.IsChamberFiredOut(muzzle_index))
1212 if (weapon.CanProcessWeaponEvents())
1217 pExitIronSights =
true;
1241 bool controllerPressIn;
1242 bool controllerPressOut;
1246 weapon =
Weapon_Base.Cast(optic.GetHierarchyParent());
1247 FOVcount = optic.GetStepFOVCount();
1248 controllerPressIn = input.
SyncedPress_ID(UAZoomInOpticsControllerHelper);
1254 optic.SetStepFOVIndex(0);
1258 if (controllerPressIn)
1260 if (!optic.StepFOVUp())
1264 optic.SetStepFOVIndex(0);
1267 if (weapon && weapon.CanEnterIronsights())
1283 weapon =
Weapon_Base.Cast(optic.GetHierarchyParent());
1284 FOVcount = optic.GetStepFOVCount();
1285 controllerPressOut = input.
SyncedPress_ID(UAZoomOutOpticsControllerHelper);
1288 if (!optic.StepFOVDown())
1290 if (controllerPressOut)
1292 if (FOVcount > 0 && (!weapon || !weapon.CanEnterIronsights()))
1294 optic.SetStepFOVIndex(FOVcount - 1);
1298 if (weapon && weapon.CanEnterIronsights())
1310 optic.SetStepFOVIndex(FOVcount - 1);
1347 SyncHitInfo greatest_hit;
1349 for (
int i = 0; i < nSyncedHitDataArray; ++i)
1356 if (IsAlive() && !IsUnconscious() && data.m_HasSource &&
g_Game.GetMission().GetHud() &&
g_Game.GetPlayer() ==
this)
1369 greatest_hit = data;
1372 else if (data.m_Fullbody)
1374 greatest_hit = data;
1442 bool doPhxImpulse =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" doPhxImpulse") > 0;
1449 vector targetDirection = GetDirection();
1452 targetDirection[1] = 0;
1453 toSourceDirection[1] = 0;
1458 float cosFi =
vector.
Dot(targetDirection, toSourceDirection);
1459 vector cross = targetDirection * toSourceDirection;
1463 pAnimHitDir = -pAnimHitDir;
1471 int invertHitDir = 0;
1474 pAnimHitFullbody =
false;
1477 switch (pDamageType)
1484 pAnimType =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" hitAnimation");
1485 invertHitDir =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" invertHitDir");
1487 pAnimHitFullbody =
true;
1491 int impactBehaviour = 0;
1493 if (!IsUnconscious() && GetHealth(
"",
"Shock") > 25)
1496 if (pComponent ==
"Torso" || pComponent ==
"Head")
1498 impactBehaviour =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" impactBehaviour");
1501 if ((fireDamage > 80.0 || shockDamage > 40.0) && impactBehaviour == 1)
1502 pAnimHitFullbody =
true;
1512 pAnimType =
g_Game.ConfigGetInt(
"cfgAmmo " + pAmmoType +
" hitAnimation");
1514 pAnimHitFullbody =
true;
1522 vector targetDirection = GetDirection();
1525 targetDirection[1] = 0;
1526 toSourceDirection[1] = 0;
1531 float cosFi =
vector.
Dot(targetDirection, toSourceDirection);
1532 vector cross = targetDirection * toSourceDirection;
1537 if (invertHitDir > 0)
1541 pAnimHitDir = -pAnimHitDir;
1549 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
1551 m_TransportHitRegistered =
false;
1556 float animHitDirDeath;
1562 if (!m_DeathSyncSent)
1564 Man killer = source.GetHierarchyRootPlayer();
1569 m_KillerData.m_Killer = killer;
1570 m_KillerData.m_MurderWeapon = source;
1573 if (killer && killer.IsPlayer())
1576 if (dmgZone ==
"Brain")
1578 m_KilledByHeadshot =
true;
1579 if (m_KillerData.m_Killer == killer)
1580 m_KillerData.m_KillerHiTheBrain =
true;
1589 bool animHitFullbody;
1590 if (
EvaluateDamageHitAnimation(damageResult, damageType, source, dmgZone, ammo, modelPos, animType, animHitDir, animHitFullbody))
1594 bool skipSoundRequest =
false;
1595 if (damageType ==
DamageType.CUSTOM && GetCommand_Fall())
1598 if (!skipSoundRequest)
1604 if (animHitFullbody)
1664 if (actMenuValue != 0)
1694 if (IsUnconscious() || (GetCommand_Move() && GetCommand_Move().
IsLeavingUncon()))
1777 if (
IsRaised() && GetInputInterface().SyncedPress(
"UAGetOverControllerHelper"))
1805 bool CanClimb(
int climbType, SHumanCommandClimbResult climbRes)
1813 if (
IsRaised() && GetInputInterface().SyncedPress(
"UAGetOverControllerHelper"))
1825 if (
Class.
CastTo(entity,climbRes.m_GrabPointParent) && entity.IsHologram())
1827 if (
Class.
CastTo(entity,climbRes.m_ClimbStandPointParent) && entity.IsHologram())
1829 if (
Class.
CastTo(entity,climbRes.m_ClimbOverStandPointParent) && entity.IsHologram())
1881 bool bADSToggle =
false;
1882 bool exitSights =
false;
1889 if (playerPB.IsRolling())
1894 bool isItemInHandsWeapon = hia.IsItemInHandsWeapon();
1909 if (
m_bADS != isWeaponADS)
1930 if (bADSToggle && !GetCommand_Melee2() && !
GetThrowing().IsThrowingModeEnabled())
1932 if (hia.IsItemInHandsWeapon() && playerPB.GetWeaponManager() && !playerPB.GetWeaponManager().IsRunning())
1935 ItemOptics optic = weapon.GetAttachedOptics();
1936 bool switchToADS =
false;
1937 bool canUseIronsights = weapon.CanEnterIronsights();
1938 bool canUseOptics = optic != NULL;
1940 if (canUseIronsights || canUseOptics)
1948 switchToADS =
false;
1956 else if (switchToADS)
1959 if (weapon.GetWasIronSight() && !canUseIronsights)
1961 weapon.SetWasIronSight(
false);
1963 else if (!weapon.GetWasIronSight() && !canUseOptics)
1965 weapon.SetWasIronSight(
true);
1968 if (weapon.GetWasIronSight())
1973 else if (!weapon.GetWasIronSight() || (!canUseIronsights && canUseOptics))
2026 if (
g_Game.GetWorld().Is3rdPersonDisabled())
2076 float headingAngle = MiscGameplayFunctions.GetHeadingAngle(
this);
2079 float headingAngleDiff = 0.0;
2090 if (headingAngleDiff > 0.2)
2092 int time =
g_Game.GetTime();
2094 float timefilterconstant = 400 - (headingAngleDiff * 100);
2098 float volume = headingAngleDiff / 0.5;
2114 string soundSetName =
"Cloth_Body_longmove_TShirt_Soundset";
2116 string bodyClothName =
"";
2120 bodyClothName = attachment.GetAttachmentSoundType();
2123 if (bodyClothName !=
"")
2125 string path =
"CfgSoundTables CfgAttachmentSoundTables Cloth_Body_Longmove_LookupTable";
2126 int soundCount =
g_Game.ConfigGetChildrenCount(
path);
2128 for (
int i = 0; i < soundCount; i++)
2133 if (
name == bodyClothName)
2136 g_Game.ConfigGetTextArray(
path +
" " +
name +
" soundSets", stringArray);
2137 soundSetName = stringArray.Get(0);
2147 if (soundObjectBuilder != NULL)
2149 SoundObject soundObject = soundObjectBuilder.BuildSoundObject();
2151 if (soundObject != NULL)
2157 wave.SetVolumeRelative(volume);
2167 float volume2 = headingAngleDiff * 2;
2183 string soundSetName2 =
"walkProne_noHS_asphalt_ext_Char_SoundSet";
2186 if (surfaceType !=
"")
2188 string movementSurfaceType =
"walkProne_" + surfaceType;
2190 string path2 =
"CfgSoundTables CfgStepSoundTables walkProne_noHS_Char_LookupTable";
2191 int soundCount2 =
g_Game.ConfigGetChildrenCount(path2);
2193 for (
int i2 = 0; i2 < soundCount2; i2++)
2196 g_Game.ConfigGetChildName(path2, i2, name2);
2198 if (name2 == movementSurfaceType)
2201 g_Game.ConfigGetTextArray(path2 +
" " + name2 +
" soundSets", stringArray2);
2202 soundSetName2 = stringArray2.Get(0);
2204 delete stringArray2;
2212 if (soundObjectBuilder2 != NULL)
2214 SoundObject soundObject2 = soundObjectBuilder2.BuildSoundObject();
2216 if (soundObject2 != NULL)
2220 AbstractWave wave2 =
g_Game.GetSoundScene().Play3D(soundObject2, soundObjectBuilder2);
2222 wave2.SetVolumeRelative(volume2);
2271 override void CommandHandler(
float pDt,
int pCurrentCommandID,
bool pCurrentCommandFinished)
2275 vector playerPosition = PhysicsGetPositionWS();
2278 GetHumanInventory().Update(pDt);
2286 EntityAI entityInHands = GetEntityInHands();
2290 bool isWeapon = entityInHands && entityInHands.IsInherited(
Weapon);
2292 bool updateAimingMdfr =
false;
2296 updateAimingMdfr =
true;
2301 updateAimingMdfr =
true;
2305 if (updateAimingMdfr)
2307 if (isRaisedNow && isWeapon)
2323 bool exitIronSights =
false;
2328 bool exitOptic =
false;
2356 if (
m_Swimming.CheckSwimmingStart( waterLevel ) )
2361 StartCommand_Swim();
2368 if (pCurrentCommandFinished)
2384 if (PhysicsIsFalling(
true))
2386 StartCommand_Fall(0);
2394 StartCommand_Swim();
2398 StartCommand_Move();
2495 OnLand(pCurrentCommandID, fallDamageData);
2496 npar = type.GetNoiseParamsLandLight();
2499 else if (fallDamageData.
m_Height < 3.0)
2506 OnLand(pCurrentCommandID, fallDamageData);
2507 npar = type.GetNoiseParamsLandLight();
2510 else if (fallDamageData.
m_Height < 5.0)
2513 OnLand(pCurrentCommandID, fallDamageData);
2514 npar = type.GetNoiseParamsLandHeavy();
2520 OnLand(pCurrentCommandID, fallDamageData);
2521 npar = type.GetNoiseParamsLandHeavy();
2527 OnPlayerRecievedHit();
2540 else if (PhysicsIsFalling(
false))
2543 StartCommand_Fall(0);
2560 hcls.m_fFwMaxDistance = 3;
2562 hcls.m_fFwMaxDistance = 1.2;
2564 SHumanCommandClimbResult ret;
2590 if (amplitude > 0.1 || force)
2593 ad.SetTalking(
true);
2598 int now =
g_Game.GetTime();
2603 int voiceLevel =
g_Game.GetVoiceLevel(
this);
2610 case VoiceLevelWhisper:
2611 vonpar = pt.GetNoiseParamsWhisper();
2613 case VoiceLevelTalk:
2614 vonpar = pt.GetNoiseParamsTalk();
2616 case VoiceLevelShout:
2617 vonpar = pt.GetNoiseParamsShout();
2627 ad.SetTalking(
false);
2639 m_Throwing.HandleThrowing(hic, hcw, entityInHands, pDt);
2683 playerDebug.CommandHandler();
2715 EntityAI item_in_hands = player.GetEntityInHands();
2716 if (item_in_hands != NULL && player.CanDropEntity(item_in_hands) &&
g_Game.GetPlayer().GetHumanInventory().CanRemoveEntityInHands())
2718 player.PredictiveDropEntity(item_in_hands);
2790 ad.SetInjured(v,
true);
2797 ad.SetExhaustion(v,
true);
2817 EntityAI entityInHands = GetEntityInHands();
2820 optics = weapon.GetAttachedOptics();
2821 else if (entityInHands)
2867 return transport.Get3rdPersonCameraType();
2970 #ifdef PLATFORM_CONSOLE
2971 if (
GetUApi().GetInputByID(UAVoiceModifierHelper).LocalValue() == 0)
2986 int userDataTypeParam = 0;
2987 if (!ctx.
Read(userDataTypeParam))
2989 Error(
"DayZPlayerImplement: cannot read input type");
3006 if (ctx.
Read(target))
3012 if (ctx.
Read(hitPos))
3017 int hitZoneIdx = -1;
3018 if (ctx.
Read(hitZoneIdx))
3023 int finisherType = -1;
3024 if (ctx.
Read(finisherType))
3041 switch (pJunctureID)
3049 SyncHitInfo data =
new SyncHitInfo;
3063 switch (boots.GetAttachmentSoundType())
3081 switch (attachment.GetAttachmentSoundType())
3084 return AnimUpperBodyType.NylonJacket;
3086 return AnimUpperBodyType.TShirt;
3088 return AnimUpperBodyType.WoolShirt;
3090 return AnimUpperBodyType.HeavyJacket;
3091 case "LeatherJacket":
3092 return AnimUpperBodyType.LeatherJacket;
3094 return AnimUpperBodyType.Coat;
3095 case "ChemlonDress":
3096 return AnimUpperBodyType.ChemlonDress;
3098 return AnimUpperBodyType.Ghillie;
3100 return AnimUpperBodyType.Chainmail;
3104 return AnimUpperBodyType.None;
3112 switch (back.GetAttachmentSoundType())
3115 return AnimBackType.Small;
3117 return AnimBackType.Military;
3119 return AnimBackType.Outdoor;
3121 return AnimBackType.Ghillie;
3125 return AnimBackType.None;
3134 AnimRangedWeaponType shoulderAttType = AnimRangedWeaponType.None;
3135 AnimRangedWeaponType meleeAttType = AnimRangedWeaponType.None;
3137 if (shoulderAttachment)
3139 switch (shoulderAttachment.GetAttachmentSoundType())
3143 shoulderAttType = AnimRangedWeaponType.Shotgun;
3148 shoulderAttType = AnimRangedWeaponType.Rifle;
3153 if (meleeAttachment)
3155 switch (meleeAttachment.GetAttachmentSoundType())
3159 meleeAttType = AnimRangedWeaponType.Shotgun;
3164 meleeAttType = AnimRangedWeaponType.Rifle;
3170 if (shoulderAttType == AnimRangedWeaponType.Shotgun || meleeAttType == AnimRangedWeaponType.Shotgun)
3171 return AnimRangedWeaponType.Shotgun;
3173 if (shoulderAttType == AnimRangedWeaponType.Rifle || meleeAttType == AnimRangedWeaponType.Rifle)
3174 return AnimRangedWeaponType.Rifle;
3176 return AnimRangedWeaponType.None;
3184 g_Game.SurfaceUnderObjectByBoneCorrectedLiquid(
this, limbType, surfaceType, liquidType);
3206 if (noisePar != null)
3207 g_Game.GetNoiseSystem().AddNoise(
this, noisePar, noiseMultiplier);
3220 GetMovementState(state);
3228 if (pUserInt % 2 == 1)
3231 if (surface.
Length() == 0)
3237 if (surface.
Length() == 0)
3241 if (surface.
Length() != 0)
3249 if (stepParticleID > 0)
3260 if (surface2.
Length() != 0)
3266 if (soundBuilder != NULL &&
g_Game.GetPlayer())
3268 orientation =
Vector(0, 0, 0);
3271 excludedObjects.Insert(
this);
3274 if (
g_Game.IsBoxCollidingGeometry(
GetPosition(), orientation, edgeLength, ObjIntersectView, ObjIntersectNone, excludedObjects, collidedObjects))
3276 for (
int i = 0; i < collidedObjects.Count(); ++i)
3282 if (colObject && colObject.HasPlayerCollisionSound())
3284 for (
int j = 0; j < type.GetVegetationSounds().
Count(); ++j)
3293 if (vegSoundObject != NULL)
3296 PlaySound(vegSoundObject, vegSoundObjectBuilder);
3308 SoundObject soundObject = soundBuilder.BuildSoundObject();
3309 if (soundObject != NULL)
3321 float noiseMultiplier = 0;
3325 noiseParams = type.GetNoiseParamsStand();
3327 noiseParams = type.GetNoiseParamsCrouch();
3329 noiseParams = type.GetNoiseParamsProne();
3332 Debug.
Log(
string.Format(
"Wrong stance, id: %1 using backup with stand stance (id: 0)", state.
m_iStanceIdx));
3333 noiseParams = type.GetNoiseParamsStand();
3338 AddNoise(noiseParams, noiseMultiplier);
3349 int eventReplaceID = 0;
3351 if (pEventType ==
"Sound")
3362 else if (pEventType ==
"SoundWeapon")
3373 else if (pEventType ==
"SoundAttachment")
3377 else if (pEventType ==
"SoundVoice")
3404 Debug.
Log(
"OnSoundEvent: Unknown sound event \"" + pEventType +
"\"");
3417 AnimSoundEvent soundEvent = null;
3421 EntityAI entityInHands = GetEntityInHands();
3422 if (entityInHands && entityInHands.IsInherited(
ItemBase))
3426 if (item.HasQuantity())
3427 quantity = (
float)item.GetQuantity() / (item.GetQuantityMax() - item.GetQuantityMin());
3429 soundEvent = invItemType.GetSoundEvent(pUserInt);
3432 if (soundEvent == null)
3435 soundEvent = type.GetSoundWeaponEvent(pUserInt);
3438 if (soundEvent != null)
3440 if (!
g_Game.IsDedicatedServer())
3445 builder.AddVariable(
"quantity", quantity);
3446 builder.AddVariable(
"interior", IsSoundInsideBuilding());
3448 SoundObject soundObject = builder.BuildSoundObject();
3449 if (soundObject != NULL)
3454 if (pUserString ==
"StopOnAnimEnd")
3477 pUserString.
Split(
",", attachments);
3478 for (
int i = 0; i < attachments.Count(); i++)
3480 int attachmentHash = -1;
3481 if (attachments[i] ==
"shoulder")
3483 else if (attachments[i] ==
"body")
3485 else if (attachments[i] ==
"back")
3490 if (soundBuilder != NULL)
3492 SoundObject soundObject = soundBuilder.BuildSoundObject();
3493 if (soundObject != NULL)
3506 soundObjectBuilder.AddVariable(
"laddertype", 1);
3510 soundObjectBuilder.AddVariable(
"laddertype", 0);
3517 soundObjectBuilder.AddVariable(
"bare", 1);
3518 soundObjectBuilder.AddVariable(
"sneakers", 0);
3519 soundObjectBuilder.AddVariable(
"boots", 0);
3523 soundObjectBuilder.AddVariable(
"bare", 0);
3524 soundObjectBuilder.AddVariable(
"sneakers", 1);
3525 soundObjectBuilder.AddVariable(
"boots", 0);
3529 soundObjectBuilder.AddVariable(
"bare", 0);
3530 soundObjectBuilder.AddVariable(
"sneakers", 0);
3531 soundObjectBuilder.AddVariable(
"boots", 1);
3538 DayZPlayerTypeAnimTable table = type.GetSoundTable();
3539 AnimSoundEvent soundEvent;
3542 soundEvent = table.GetSoundEvent(pUserInt);
3545 if (soundEvent != NULL)
3547 if (!
g_Game.IsDedicatedServer())
3550 if (GetCommand_Ladder())
3554 objectBuilder.AddEnvSoundVariables(
GetPosition());
3556 SoundObject soundObject = objectBuilder.BuildSoundObject();
3557 if (soundObject != NULL)
3562 if (pUserString ==
"StopOnAnimEnd")
3569 if (soundEvent.m_NoiseParams != NULL)
3592 if (mask || head_gear)
3594 string category_mask;
3595 string category_headgear;
3598 int priority_headgear;
3602 category_mask = mask.ConfigGetString(
"soundVoiceType");
3603 priority_mask = mask.ConfigGetInt(
"soundVoicePriority");
3607 category_headgear = head_gear.ConfigGetString(
"soundVoiceType");
3608 priority_headgear = head_gear.ConfigGetInt(
"soundVoicePriority");
3611 if (priority_headgear >= priority_mask && category_headgear !=
"")
3613 category = category_headgear;
3617 category = category_mask;
3632 int maleVoiceType = 0;
3633 int femaleVoiceType = 0;
3634 if (player.IsMale())
3636 maleVoiceType = player.GetVoiceType();
3640 femaleVoiceType = player.GetVoiceType();
3643 soundBuilder.AddVariable(
"male", maleVoiceType);
3644 soundBuilder.AddVariable(
"female", femaleVoiceType);
3647 SoundObject soundObject = soundBuilder.BuildSoundObject();
3648 if (soundObject != NULL)
3651 wave =
PlaySound(soundObject, soundBuilder);
3670 bool unconscious = IsUnconscious();
3673 if (ib && (
PlayerBase.DEBUG_INVENTORY_ACCESS || !IsAlive() || restrained || unconscious || ib.CanBeMovedOverride()))
3702 if (!IsAlive() || player.IsUnconscious())
3712 super.OnRPC(sender, rpc_type, ctx);
3714 if (rpc_type ==
ERPCs.RPC_DAYZPLAYER_DEBUGSERVERWALK)
3716 Print(
"ERPCs.RPC_DAYZPLAYER_DEBUGSERVERWALK");
3718 Param1<bool> rp =
new Param1<bool>(
false);
3721 GetInputController().OverrideMovementSpeed(rp.param1, 1);
3722 GetInputController().OverrideAimChangeX(rp.param1, 0.01);
3737 return fall.PhysicsLanded();
3773 StartCommand_Move();
3827 RegisterTransportHit(transport);
3834 if (
g_Game.GetPlayer() != NULL && (IsSoundInsideBuilding() !=
g_Game.GetPlayer().IsSoundInsideBuilding() || IsCameraInsideVehicle() !=
g_Game.GetPlayer().IsCameraInsideVehicle()))
3899 preferredOptics = opticsInHands;
3906 preferredOptics = weaponInHands.GetAttachedOptics();
3915 optics.Insert(preferredOptics);
3924 foreach (
Entity nvg : nvgs)
3935 NVGoggles goggles = NVGoggles.Cast(nvAttachment);
3941 optics.Insert(goggles);
3949#ifdef DIAG_DEVELOPER
3952 return Weapon_Base.Cast(GetHumanInventory().CreateInHands(type));
void syncDebugPrint(string s)
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void CachedEquipmentStorage(DayZPlayerImplement player)
override event void Read(PawnStateReader ctx)
override event void Write(PawnStateWriter ctx)
class CEItemProfile CEApi
API to interact with Central Economy.
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
ECachedEquipmentItemCategory m_Category
ECachedEquipmentPlacement m_Placement
Super root of all classes in Enforce script.
static const int DAYZCAMERA_3RD_ERC_RAISED
3rd - standing raised
static const int DAYZCAMERA_3RD_CRO_RAISED
3rd - crouch
static const int DAYZCAMERA_IRONSIGHTS
ironsights camera
static const int DAYZCAMERA_3RD_CRO
3rd - crouch
static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE
3rd - laying raised
static const int DAYZCAMERA_1ST
1st person camera
static const int DAYZCAMERA_1ST_VEHICLE
vehicle 1st person
static const int DAYZCAMERA_3RD_PRO_RAISED
3rd - laying raised
static const int DAYZCAMERA_3RD_PRO
3rd - laying
static const int DAYZCAMERA_3RD_JUMP
jump
static const int DAYZCAMERA_3RD_CLIMB
climb / vault
static const int DAYZCAMERA_3RD_ERC_SPR
3rd - standing sprint
static const int DAYZCAMERA_1ST_UNCONSCIOUS
unconscious
static const int DAYZCAMERA_3RD_ERC
3rd - standing
static const int DAYZCAMERA_OPTICS
optics
override bool ShouldSimulationBeDisabled()
override void OnSimulationEnd()
override array< InventoryItem > OnDrawOptics2D()
Called when 2D optics are about to be drawn.
override bool IsEyeZoom()
Legacy.
bool m_CameraEyeZoom
DEPRECATED.
bool m_AimingFinisherStarted
bool IsLanded(int pCurrentCommandID)
AnimUpperBodyType GetBodyAttachmentType()
void SendSoundEvent(EPlayerSoundEventID id)
void OverrideSlidePoseAngle(float value)
movement sliding override, originally for FB gestures
void ProcessAttachmentEvent(string pEventType, string pUserString, int pUserInt)
override void CommandHandler(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
This is main command logic.
bool CheckForTakeItem(EntityAI item)
anti-cheat condition
AnimRangedWeaponType GetShoulderAttachmentType()
bool CheckForRespawn(EntityAI item)
Player respawn.
override CachedEquipmentStorage GetCachedEquipment()
int m_PullPlayerOutOfVehicleState
void SwitchOptics(ItemOptics optic, bool state)
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
static const int DEAD_SCREEN_DELAY
bool m_IsUnconsciousFalling
bool m_ProcessFirearmMeleeHit
void ShowWeaponDebug(bool show)
override void OnInputFromServer(ParamsReadContext ctx)
float GetSlidePoseAngle()
override bool IsShootingFromCamera()
float m_fObstructionSmooth
bool m_IsShootingFromCamera
bool m_IsTryingHoldBreath
bool CanPickupHeavyItem(notnull EntityAI item)
-------------— Checks if player can pick up heavy item ----------------------—
SHumanCommandMoveSettings m_MoveSettings
void TriggerPullPlayerOutOfVehicleImpl()
static const float DEFAULT_DYING_TIME
ref DeathEffectTimer m_DeathEffectTimer
float m_DebugDirectionVal
VKOSTIK - tady dat 0 misto -1.
AnimBackType GetBackAttachmentType()
bool m_ProcessLiftWeaponState
bool OnLand(int pCurrentCommandID, FallDamageData fallDamageData)
bool IsTryingHoldBreath()
bool IsWeaponRaiseCompleted()
void SetOptics(bool value)
void SendSoundEventEx(EPlayerSoundEventID id, int param=0)
bool IsAlreadyInFallingCommand(int pCurrentCommandID)
AbstractWave PlaySound(SoundObject so, SoundObjectBuilder sob)
Sounds.
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void SetDeathDarknessLevel(float duration, float tick_time)
static const float DYING_PROGRESSION_TIME
how long does it take to full death screen [s]
ref Timer m_FightEndBlendTimer
bool PlaySoundEventType(ESoundEventType soundType, int soundEventID, int param=0)
Handle sound event by respective sound handler based on its type.
DayZPlayerImplementFallDamage GetFallDamage()
void EOnContact(IEntity other, Contact extra)
Phx contact event.
bool m_PullPlayerOutOfVehicleKeepsInLocalSpace
int GetTypeOfDeath(int pCurrentCommandID)
Transport GetTransportCache()
Get the transport that was cached when entering unconsciousness.
override string GetDebugText()
void ResetDamageHitState(bool resetTimer)
bool m_ShouldBeUnconscious
ref WeaponDebug m_WeaponDebug
bool HandleDeath(int pCurrentCommandID)
void OnParticleEvent(string pEventType, string pUserString, int pUserInt)
void RequestSoundEventStop(EPlayerSoundEventID id, bool from_server_and_client=false, int param=EPlayerSoundEventParam.STOP_PLAYBACK)
float m_DeathDarkeningCurrentTime
void SimulateDeath(bool state)
bool m_CameraOpticsAimOverride
bool m_ProcessWeaponRaiseCompleted
override void EEKilled(Object killer)
void DepleteStaminaEx(EStaminaModifiers modifier, float dT=-1, float coef=1.0)
ref DayZPlayerMeleeFightLogic_LightHeavy m_MeleeFightLogic
int m_DeathAnimType
HandleDeath.
void OverrideShootFromCamera(bool pState)
void SetClimbingLadderType(string value)
bool IsFireWeaponRaised()
bool m_WeaponRaiseCompleted
measures time from the weapon raise start to complete raise (once per)
DayZPlayerInventory GetDayZPlayerInventory()
DayZPlayerImplementAiming GetAimingModel()
void SetIsInThirdPerson(bool state)
void EvaluateDamageHit(int pCurrentCommandID)
Must be ran at the start of CommandHandler before Jump is triggered.
float m_CurrentWaterLevel
void SetHandheldOpticsInUse(bool state)
override void SetCurrentWaterLevel(float pWaterLevel)
bool m_ContinueFirearmMelee
int m_ActionSoundCategoryHash
WeaponManager GetWeaponManager()
float m_fObstructionSmoothVelocity[1]
bool IsFBSymptomPlaying()
bool HandleDamageHit(int pCurrentCommandID)
void ResetWeaponRaiseProgress()
void ShowDeadScreen(bool show, float duration)
float m_SprintedTimePerStanceMin
float m_LastHeadingAngleBlock2
ECameraZoomType m_CameraEyeZoomLevel
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
Transport m_TransportCache
void SetIronsights(bool value)
void OnLadder(float delta_time, HumanMovementState pState)
called every command handler tick when player is on ladder
ref DayZPlayerImplementFallDamage m_FallDamage
void DepleteStamina(EStaminaModifiers modifier, float dT=-1)
void SetReturnToOptics(bool state)
float GetWeaponObstruction()
override int GetEyeZoomLevel()
void OnSoundEvent(string pEventType, string pUserString, int pUserInt)
bool m_TriggerPullPlayerOutOfVehicleSynch
AbstractWave ProcessVoiceEvent(string pEventType, string pUserString, int pUserInt)
void HideClothing(ItemOptics optic, bool state)
int m_LastSurfaceUnderHash
void SyncDeferredEventToRemotes()
override bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
is replayed after correction when 'NetworkRewindType.REPLAY' is used
void SendDeathJuncture(int pAnimTypeDeath, float pAnimHitDirDeath)
void AddNoise(NoiseParams noisePar, float noiseMultiplier=1.0)
ref ReplaceSoundEventHandler m_ReplaceSoundEventHandler
bool CanClimb(int climbType, SHumanCommandClimbResult climbRes)
void HandleADS()
This is main command logic.
ref DayZPlayerImplementJumpClimb m_JumpClimb
void SetFallYDiff(float value)
void RequestSoundEventEx(EPlayerSoundEventID id, bool from_server_and_client=false, int param=0)
void DayZPlayerImplement()
constructor
void OnMovementChanged()
Event, called when HumanMovementState.m_iMovement changes...walk, run, sprint, etc....
bool IsHandheldOpticsInUse()
bool StopSoundEvent(EPlayerSoundEventID id, bool is_from_server=false, int param=0)
float m_ProcessObstructWeapon
void SetSuicide(bool state)
ref HumanMovementState m_MovementState
time step for gradual update of dead screen visibilibty up to full visbility [s]
ref array< AbstractWave > m_PerformedActionSounds
ref Timer m_ADSAutomationTimer
void ~DayZPlayerImplement()
void AttenuateSoundIfNecessary(SoundObject soundObject)
float m_TestDamageCounter
This is Debug functionality.
void RequestSoundEvent(EPlayerSoundEventID id, bool from_server_and_client=false)
ref DayZPlayerImplementThrowing m_Throwing
void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
SyncJunctures.
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
event from damage system
bool m_isFBsymptomPlaying
void OnInputUserDataReceived(ParamsReadContext ctx)
Input userdata.
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
bool IsWeaponDebugEnabled()
void ProcessSoundEvent(string pEventType, string pUserString, int pUserInt)
override void OnItemInHandsChanged()
bool PlaySoundEventEx(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false, int param=0)
override float GetCurrentWaterLevel()
bool CanConsumeStamina(EStaminaConsumers consumer)
void HandleWeapons(float pDt, Entity pInHands, HumanInputController pInputs, out bool pExitIronSights)
HandleWeapons.
void ResetDeathStartTime()
string GetSurfaceType(SurfaceAnimationBone limbType)
bool IsInFBEmoteState()
Checks if fullbody animation or specific locked state is active in emote manager.
ref array< ref SyncHitInfo > m_SyncedHitDataArray
ref PlayerSoundEventHandler m_PlayerSoundEventHandler
bool IsWeaponObstructionBlockingADS()
override void OnInputForRemote(ParamsReadContext ctx)
bool m_DamageHitFullbody
HandleDamageHit.
void ProcessWeaponEvent(string pEventType, string pUserString, int pUserInt)
bool CheckForDropItem(EntityAI item)
ref DayZPlayerImplementAiming m_AimingModel
void ProcessFeetDamageServer(int pUserInt)
float m_LastHeadingAngleBlock
bool EvaluateDeathAnimation(int pDamageType, EntityAI pSource, string pAmmoType, out int pAnimType, out float pAnimHitDir)
selects animation type and direction based on damage system data
void DeathDropHandEntity()
float m_fLastHeadingDiff
This HeadingModel.
int m_DebugWeaponChangeShowSlot
AnimBootsType GetBootsType()
DayZPlayerImplementThrowing GetThrowing()
bool IsInFullbodyDamageAnimation()
override void OnVariablesSynchronized()
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
ModOverrides.
bool m_HandheldOpticsInUse
override bool AimingModel(float pDt, SDayZPlayerAimingModel pModel)
This Aiming Model.
void OnStepEvent(string pEventType, string pUserString, int pUserInt)
Event Processing.
bool CanStartConsumingStamina(EStaminaConsumers consumer)
bool PlaySoundEvent(EPlayerSoundEventID id, bool from_anim_system=false, bool is_from_server=false)
const float HIT_INTERVAL_MIN
override int CameraHandler(int pCameraMode)
This is main camera selection logic.
ref DayZPlayerImplementSwimming m_Swimming
bool CanPickupHeavyItemSwap(notnull EntityAI item1, notnull EntityAI item2)
bool ProcessJumpOrClimb(float pDt, int pCurrentCommandID)
Jump / Climb.
override bool IsInThirdPerson()
void CheckAnimationOverrides()
void OnJumpEnd(int pLandType=0)
void CompleteWeaponRaise()
void SendCompleteWeaponRaiseJuncture()
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
string m_ClimbingLadderType
void HandleOptic(notnull ItemOptics optic, bool inHands, HumanInputController pInputs, out bool pExitOptics)
float m_ObstructWeapon_player
void TriggerPullPlayerOutOfVehicle()
int m_LastCommandBeforeUnconscious
bool m_IsFireWeaponRaised
void SetVariablesLadderSoundObjectBuilder(SoundObjectBuilder soundObjectBuilder)
int m_DebugWeaponChangeStage
override void StopDeathDarkeningEffect()
DayZPlayerMeleeFightLogic_LightHeavy GetMeleeFightLogic()
void CommandHandlerDebug(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
void LockControls(bool state)
DayZPlayerImplementMeleeCombat GetMeleeCombat()
string m_DebugWeaponChangeItem
at which point does the stabilization start to get affected
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
This HeadingModel - Clamps heading.
static bool RotateOrient(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
static bool ReadDeathParams(ParamsReadContext pCtx, out int pType, out float pHitDir)
static bool ReadDamageHitParamsEx(ParamsReadContext pCtx, out SyncHitInfo pData)
static void SendDeath(DayZPlayer pPlayer, int pType, float pHitDir)
Death.
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_DAMAGE_HIT
static const int SJ_DEATH
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.
script counterpart to engine's class Inventory
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)...
void SetVehicleCommand(HumanCommandVehicle hcv)
proto static native bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
debug draws climb heauristics pDebugDrawLevel viz DebugDrawClimb use for performing arbitrary climb t...
proto native void Cancel()
cancels command melee and goes to HumanCommandMove
proto native bool IsFinisher()
proto native bool IsStandingFromBack()
return true if prone on back is chaning to crounch/stand
proto native float GetCurrentMovementSpeed()
0,1,2..3 idle, walk, run, sprint
proto native bool IsChangingStance()
returns true if character is changing stance
proto native bool IsInWater()
proto native bool IsOnLand()
proto native bool IsWakingUp()
proto native Transport GetTransport()
proto native bool IsGettingIn()
proto native void ProcessLeaveEvents()
proto native bool WasGearChange()
proto native bool IsGettingOut()
proto native void LiftWeapon(bool pState)
command for lifting weapon near obstacles (works only when weapon is raised)
proto native int GetRunningAction()
returns -1 when no action is running or RELOAD,MECHANISM, ....
proto native bool IsActionFinished()
proto native bool IsWeaponLifted()
return if lifting weapon is active
proto native float GetWeaponObstruction()
return obstruction value
proto native int IsEvent()
return -1 when there is no event, otherwise it returns pId of event from animation
proto native void SetADS(bool pState)
sets head tilt to optics
proto native bool StartAction(WeaponActions pAction, int pActionType)
start reload,mechanism,chambering,unjam ...
proto native void ObstructWeapon(float pState01)
command for obstruction weapon near obstacles
inventory for plain man/human
proto native EntityAI GetEntityInHands()
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_iStanceIdx
current command's id
int m_iMovement
current stance (DayZPlayerConstants.STANCEIDX_ERECT, ...), only if the command has a stance
Internal ancestor of all Entity implementations.
proto native void SetHands(notnull EntityAI parent, EntityAI e)
provides access to slot configuration
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
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 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)
static bool IsSyncLogEnable()
static void PlayVegetationCollideParticles(Object object, DayZPlayerImplement player)
static float GetNoiseMultiplier(DayZPlayerImplement playerImplement)
static float GetNoiseReduction(Weather weather)
static void SetMultiplayState(bool state)
static const float FULL_SPRINT_DELAY_DEFAULT
static const float WEAPON_RAISE_BLEND_DELAY
static const int CHECK_EVERY_N_STEP
static const float HEAVY_HIT_THRESHOLD
The class that will be instanced (moddable).
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).
SoundObjectBuilder GetSoundObjectBuilder()
TIntArray GetAnimEventIds()
script counterpart to engine's class Weapon
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto float Normalize()
Normalizes vector.
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
DamageType
exposed from C++ (do not change)
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
proto native int GetBoneIndexByName(string pBoneName)
returns bone index for a name (-1 if pBoneName doesn't exist)
proto native void ResetDeathCooldown()
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
ModOverrides.
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
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 ----------------------—
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)
void DayZPlayerMeleeFightLogic_LightHeavy(DayZPlayerImplement player)
void DayZPlayerUtils()
cannot be instantiated
ECachedEquipmentItemCategory
ECachedEquipmentPlacement
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
bool IsProcessing()
returns true when FP is heating or cooling
Serializer ParamsReadContext
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 Acos(float c)
Returns angle in radians from cosinus.
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 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.
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float AbsFloat(float f)
Returns absolute value.
static const float RAD2DEG
static proto int AbsInt(int i)
Returns absolute value.
proto native void SetPosition(vector position)
Note: Sets the position locally if parented, retrieves globally with the sound offset.
vector GetPosition()
Get the world position of the Effect.
proto native void SetKind(WaveKind kind)
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
class SoundObject SoundParams(string name)
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
proto native int Hash()
Returns hash of string.
proto native int Length()
Returns length of string.
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()
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)