94{
96 {
98
99 }
100
102 {
104
105 }
106};
107
108#endif
109
111{
112 static const int DEAD_SCREEN_DELAY = 1000;
113 static const float DEFAULT_DYING_TIME = 2.5;
114 static const float DYING_PROGRESSION_TIME = 0.05;
115
116
128 protected float m_FallYDiff;
129 protected float m_SprintedTime;
130 protected float m_SprintedTimePerStanceMin;
131 protected bool m_SprintFull;
132 protected bool m_IsRaised;
133 protected bool m_ShouldReload;
134 protected bool m_Camera3rdPerson;
135 protected bool m_CameraZoomToggle;
136 protected bool m_bADS;
137 private float m_WeaponRaiseTime;
138 protected bool m_WeaponRaiseCompleted;
140 protected bool m_WasIronsight;
141 protected bool m_CameraIronsight;
142 protected bool m_CameraOptics;
143 protected bool m_CameraOpticsAimOverride;
144
145 protected float m_DeathDarkeningCurrentTime;
146 protected bool m_IsTryingHoldBreath;
147 protected bool m_IsShootingFromCamera;
148 protected bool m_PlayerSelected;
149 protected bool m_Suicide;
150 protected bool m_IsUnconscious;
151 protected bool m_ShouldBeUnconscious;
152 protected bool m_IsUnconsciousFalling;
153 bool m_UnconsciousDebug;
154 protected int m_LastCommandBeforeUnconscious;
158 protected bool m_ProcessFirearmMeleeHit;
159 protected bool m_ContinueFirearmMelee;
160 protected bool m_LiftWeapon_player;
161 protected bool m_ProcessLiftWeapon;
162 protected bool m_ProcessLiftWeaponState;
163 protected int m_LastSurfaceUnderHash;
165 protected string m_ClimbingLadderType;
166 bool m_isFBsymptomPlaying;
167 protected bool m_HandheldOpticsInUse;
168 protected bool m_ResetADS;
169 protected int m_StepCounter;
170 protected int m_NextVoNNoiseTime;
173
174
175 protected bool m_RaiseStarted = false;
176 protected bool m_AimingFinisherStarted = false;
177 protected bool m_IsWeapon;
178
179 private float m_CurrentWaterLevel;
180
181 bool m_WasInVehicle;
182 protected bool m_TriggerPullPlayerOutOfVehicleSynch;
183 protected bool m_PullPlayerOutOfVehicleKeepsInLocalSpace = false;
184 protected int m_PullPlayerOutOfVehicleState = -1;
185 int m_ActionSoundCategoryHash;
186
187 protected float m_dT;
188
191 {
192 m_SprintFull = false;
193 m_SprintedTime = 0;
202 m_ADSAutomationTimer =
new Timer();
203 m_bADS = false;
204 m_WeaponRaiseCompleted = false;
205 SetOptics(false);
206 m_IsShootingFromCamera = true;
207 m_ProcessFirearmMeleeHit = false;
208 m_ContinueFirearmMelee = false;
209 m_WasIronsight = true;
210 #ifdef PLATFORM_CONSOLE
211 m_Camera3rdPerson = !
GetGame().GetWorld().Is3rdPersonDisabled();
212 #endif
213 m_LastSurfaceUnderHash = ("cp_gravel").Hash();
214 m_NextVoNNoiseTime = 0;
217 m_CurrentWaterLevel = 0;
218 m_WeaponRaiseTime = 0;
219
220 RegisterNetSyncVariableBoolSignal("m_TriggerPullPlayerOutOfVehicleSynch");
221 }
222
223#ifdef FEATURE_NETWORK_RECONCILIATION
224 protected override event typename GetOwnerStateType()
225 {
227 }
228
229 protected override event typename GetMoveType()
230 {
232 }
233
235 {
237
239
240 state.m_fLastHeadingDiff = m_fLastHeadingDiff;
241 }
242
244 {
246
248
250 {
251 m_fLastHeadingDiff =
state.m_fLastHeadingDiff;
252 }
253 }
254#endif
255
257 {
258 return m_AimingModel;
259 }
260
262 {
264 }
265
267 {
268 return m_MeleeFightLogic;
269 }
270
272 {
273 return m_Throwing;
274 }
275
277 {
278 return m_FallDamage;
279 }
280
282 {
283 }
284
287 {
289 }
290
292 {
293 return m_CameraEyeZoomLevel;
294 }
295
297 {
298 return m_IsShootingFromCamera;
299 }
300
301 void OverrideShootFromCamera(
bool pState)
302 {
303 m_IsShootingFromCamera =
pState;
304 }
305
306 bool IsInIronsights()
307 {
308 return m_CameraIronsight;
309 }
310
311 bool IsInOptics()
312 {
313 return m_CameraOptics;
314 }
315
317 {
318 return m_Camera3rdPerson;
319 }
320
321 void SetIsInThirdPerson(
bool state)
322 {
323 m_Camera3rdPerson =
state;
324 }
325
326 bool IsFireWeaponRaised()
327 {
331
332 return false;
333 }
334
335 bool IsTryingHoldBreath()
336 {
337 return m_IsTryingHoldBreath;
338 }
339
340 bool IsSprintFull()
341 {
342 return m_SprintFull;
343 }
344
345 void ShowWeaponDebug(bool show)
346 {
347 if (show)
348 {
350 }
351 else
352 {
353 m_WeaponDebug =
null;
354 }
355 }
356
357 bool IsWeaponDebugEnabled()
358 {
359 return m_WeaponDebug !=
null;
360 }
361
362 void SetFallYDiff(
float value)
363 {
365 }
366
368 {
369 return m_CurrentWaterLevel;
370 }
371
373 {
375 }
376
377 void SetIronsights(
bool value)
378 {
381 {
382 m_WasIronsight = m_CameraIronsight;
383 }
384
385 m_CameraIronsight =
value;
386
388 {
391 {
393 }
394 }
395 }
396
397 void SetOptics(
bool value)
398 {
399 m_CameraOptics =
value;
400
402 {
405 {
406 hcw.SetADS(!IsHandheldOpticsInUse());
407 }
408 }
409 }
410
411 void ExitSights()
412 {
417 {
419 }
420 else
421 {
423 }
424
425 SetIronsights(false);
426 SetOptics(false);
427
429 {
430 SwitchOptics(
optics,
false);
431 }
432
435 {
437 }
438 }
439
441 {
443 {
445 {
446 if (
optic.HasEnergyManager())
447 optic.GetCompEM().SwitchOn();
449 optic.OnOpticEnter();
450 }
451 else
452 {
455 if (
optic.HasEnergyManager())
456 optic.GetCompEM().SwitchOff();
457 }
458 }
459
460 if (m_CameraOptics !=
state)
461 {
463 }
464 }
465
466 void SetClimbingLadderType(
string value)
467 {
468 m_ClimbingLadderType =
value;
469 }
470
475
476 bool IsInVehicle()
477 {
479 }
480
481 bool IsSwimming()
482 {
484 }
485
486 bool IsClimbingLadder()
487 {
489 }
490
495
496 bool IsFBSymptomPlaying()
497 {
498 return m_isFBsymptomPlaying;
499 }
500
501 float GetDeltaT()
502 {
503 return m_dT;
504 }
505
506
510
511 int m_DeathAnimType = -2;
512 float m_DeathHitDir = 0;
513 bool m_DeathJuctureSent = false;
514
517 {
518 return m_TransportCache;
519 }
520
522 {
525 text +=
"IsSimulationDisabled: " + GetIsSimulationDisabled() +
"\n";
526
527
528
529
530
531
532
534 }
535
536 void TriggerPullPlayerOutOfVehicle()
537 {
539 {
540 return;
541 }
542
545 {
546 return;
547 }
548
551 {
553 {
555 break;
556 }
557 }
558
560 {
561 return;
562 }
563
565 TriggerPullPlayerOutOfVehicleImpl();
566
568 {
570
571#ifdef FEATURE_NETWORK_RECONCILIATION
573
575 {
578 }
579#endif
580 }
581
582 SetSynchDirty();
583 }
584
585 void TriggerPullPlayerOutOfVehicleImpl()
586 {
589
591 DisableSimulation(false);
592
594 {
599 m_PullPlayerOutOfVehicleState = 0;
600 m_TriggerPullPlayerOutOfVehicleSynch = true;
601 break;
602 }
603 }
604
606 {
607 if (m_TriggerPullPlayerOutOfVehicleSynch && !
GetGame().IsDedicatedServer())
608 {
609 TriggerPullPlayerOutOfVehicleImpl();
610 }
611
612 super.OnVariablesSynchronized();
613 }
614
616 {
618 {
619 switch (m_PullPlayerOutOfVehicleState)
620 {
621 case -1:
622 break;
623 case 0:
624 m_PullPlayerOutOfVehicleState = -1;
625
627
632 break;
633 }
634
635 return true;
636 }
637
638 if (m_DeathAnimType != -2 &&
g_Game.GetMissionState() ==
g_Game.MISSION_STATE_GAME)
639 {
640 if (!CommitedSuicide())
641 {
642 int type = m_DeathAnimType;
645
646 m_WasInVehicle = false;
649 {
650 m_TransportCache =
hcv.GetTransport();
651 m_WasInVehicle = !
hcv.IsGettingIn() && !
hcv.IsGettingOut();
652 }
653
655 if (m_TransportCache)
656 {
657 seatIndex = m_TransportCache.CrewMemberIndex(
this);
658 }
659
661 m_ShouldBeUnconscious = false;
662
664 if (m_TransportCache)
665 {
666 if (IsUnconscious() || m_WasInVehicle)
667 {
670 }
671 else
672 {
674 }
675
676 m_TransportCache.MarkCrewMemberDead(
seatIndex);
677
679 {
681
682#ifdef FEATURE_NETWORK_RECONCILIATION
684
686 {
689 }
690#endif
691 }
692 }
693
694 DisableSimulation(false);
696 m_TransportCache =
null;
697
701 }
702 else
703 {
705 }
706
707
708 GetGame().GetWorld().SetVoiceOn(
false,
false);
709
710 return true;
711 }
712
713 return false;
714 }
715
716 void ResetDeathStartTime()
717 {
719 }
720
722 {
724 {
732 {
737 }
738
739 break;
740 }
741
743 }
744
746 {
747 if (m_DeathJuctureSent)
748 return;
749
751 m_DeathJuctureSent = true;
752 }
753
755 {
756 SendDeathJuncture(-1, 0);
757
759 }
760
761 void ShowDeadScreen(
bool show,
float duration)
762 {
763 #ifndef NO_GUI
764 if (show && IsPlayerSelected())
765 {
766 #ifdef PLATFORM_PS4
768 #endif
769
771 if (!
GetGame().GetMission().IsPlayerRespawning())
772 {
773 message =
"#dayz_implement_dead";
774 }
775
776 #ifdef PLATFORM_CONSOLE
778 #else
780 #endif
781 }
782 else
783 {
785
788 else
790 }
791 #endif
792 }
793
794 override void StopDeathDarkeningEffect()
795 {
796 if (m_DeathEffectTimer && m_DeathEffectTimer.IsRunning())
797 {
798 m_DeathEffectTimer.Stop();
799 m_DeathEffectTimer =
null;
800 }
801 }
802
803 void SimulateDeath(
bool state)
804 {
805 if (
g_Game.GetMissionState() != DayZGame.MISSION_STATE_GAME)
806 return;
807
809
811 {
812 float duration = DEFAULT_DYING_TIME;
813 if (m_KilledByHeadshot)
814 {
816 }
817
818 if (
duration > DYING_PROGRESSION_TIME && !m_IsUnconscious)
819 {
820 if (!m_DeathEffectTimer)
822
824 m_DeathEffectTimer.Run(DYING_PROGRESSION_TIME,
this,
"SetDeathDarknessLevel",
par,
true);
825 }
826
828
829 GetGame().GetSoundScene().SetSoundVolume(0,0);
830 GetGame().GetSoundScene().SetSpeechExVolume(0,0);
831 GetGame().GetSoundScene().SetMusicVolume(0,0);
832 GetGame().GetSoundScene().SetVOIPVolume(0,0);
833 GetGame().GetSoundScene().SetRadioVolume(0,0);
834 }
835 else
836 {
837 StopDeathDarkeningEffect();
838 ShowDeadScreen(
state, 0);
839 }
840 }
841
842 void LockControls(
bool state)
843 {
845 {
849
851 {
852 GetGame().GetUIManager().ShowUICursor(
true);
853 if (
GetGame().GetUIManager().IsDialogVisible())
854 GetGame().GetUIManager().CloseDialog();
855 }
856 }
857 else
858 {
862
864 {
865 if (
GetGame().GetUIManager().GetMenu())
866 {
867 GetGame().GetUIManager().ShowUICursor(
true);
868 }
869 else
870 {
871 GetGame().GetUIManager().ShowUICursor(
false);
872 }
873 }
874 }
875 }
876
878
879 void SendCompleteWeaponRaiseJuncture();
880
881 void CompleteWeaponRaise()
882 {
883 m_WeaponRaiseTime = 0;
884 m_WeaponRaiseCompleted = true;
885 }
886
887 void ResetWeaponRaiseProgress()
888 {
889 m_WeaponRaiseTime = 0;
890 m_WeaponRaiseCompleted = false;
891 }
892
893 bool IsWeaponRaiseCompleted()
894 {
895 return m_WeaponRaiseCompleted;
896 }
897
899 {
902 }
903
905 {
908 {
909 Error(
"DayZPlayer: OnInputForRemote - cannot read input type");
910 return;
911 }
912
914 {
916 GetDayZPlayerInventory().OnEventForRemoteWeapon(
ctx);
917 break;
919 GetDayZPlayerInventory().OnHandEventForRemote(
ctx);
920 break;
922 GetDayZPlayerInventory().OnInputUserDataForRemote(
ctx);
923 break;
924 default:
926 break;
927 }
928 }
929
931 {
934 {
935 Error(
"DayZPlayer: OnInputFromServer - cannot read input type");
936 return;
937 }
938
940 {
942 GetDayZPlayerInventory().OnServerInventoryCommand(
ctx);
943 break;
944 default:
946 break;
947 }
948 }
953
955 {
956
957 StopWeaponEvent();
959
960 if (!IsAlive())
961 {
962
964 }
965 }
966
968
969
974 {
977
981
982 CheckLiftWeapon();
983 ProcessLiftWeapon();
984
986
987
989 {
990 m_IsTryingHoldBreath = true;
991 }
992 else
993 {
994 m_IsTryingHoldBreath = false;
995 }
996
997 if (
pInputs.IsFireModeChange())
998 {
999 GetWeaponManager().SetNextMuzzleMode();
1000 }
1002 {
1003 if (
optic && (
optic.IsInOptics() ||
optic.IsUsingWeaponIronsightsOverride()))
1004 {
1005 optic.StepZeroingUp();
1006 }
1007 else
1008 {
1009 weapon.StepZeroingUpAllMuzzles();
1010 }
1011 }
1013 {
1014 if (
optic && (
optic.IsInOptics() ||
optic.IsUsingWeaponIronsightsOverride()))
1015 {
1016 optic.StepZeroingDown();
1017 }
1018 else
1019 {
1020 weapon.StepZeroingDownAllMuzzles();
1021 }
1022 }
1023
1024 if (!m_LiftWeapon_player && (m_CameraIronsight || !
weapon.CanEnterIronsights() || m_CameraOptics))
1025 {
1028 }
1029
1031 {
1032 m_IsFireWeaponRaised = false;
1034 {
1036 }
1037
1038 ResetWeaponRaiseProgress();
1039
1040 return;
1041 }
1042 else
1043 {
1044 m_IsFireWeaponRaised = true;
1045 if (!IsWeaponRaiseCompleted())
1046 {
1047 m_WeaponRaiseTime +=
pDt;
1048 }
1049
1051 {
1052 CompleteWeaponRaise();
1053 }
1054 }
1055
1057 if (GetWeaponManager().CanFire(
weapon))
1058 {
1063 {
1064 if (
pInputs.IsAttackButtonDown() && GetInputInterface().
SyncedValue(
"UAWeaponMeleeAttack") == 0 && GetInputInterface().
SyncedValue(
"UAHeavyMeleeAttack") == 0)
1065 {
1066 GetWeaponManager().Fire(
weapon);
1067 }
1068 }
1070 {
1071#ifdef DIAG_DEVELOPER
1072 int burst_option = GetWeaponManager().GetBurstOption();
1074 {
1075#endif
1076 if (
pInputs.IsAttackButton() && GetInputInterface().
SyncedValue(
"UAWeaponMeleeAttack") == 0 && GetInputInterface().
SyncedValue(
"UAHeavyMeleeAttack") == 0)
1077 {
1079 {
1080 GetWeaponManager().Fire(
weapon);
1081 }
1082 }
1083 else
1084 {
1085 weapon.ResetBurstCount();
1086 }
1087#ifdef DIAG_DEVELOPER
1088 }
1090 {
1092 {
1093 weapon.ResetBurstCount();
1094 }
1096 {
1097 GetWeaponManager().Fire(
weapon);
1098 }
1099 else
1100 {
1101
1103 {
1104 GetWeaponManager().Fire(
weapon);
1105 }
1106 }
1107 }
1108#endif
1109 }
1110 }
1111
1112 #ifdef PLATFORM_CONSOLE
1113 if (
GetGame().GetInput().LocalRelease(
"UAFire",
false) || m_ShouldReload)
1114 {
1115 if (!
weapon.IsWaitingForActionFinish() && !IsFighting())
1116 {
1118
1120 {
1121 if (
weapon.CanProcessWeaponEvents())
1122 {
1123 if (GetWeaponManager().CanEjectBullet(
weapon))
1124 {
1125 GetWeaponManager().EjectBullet();
1127 m_ShouldReload = false;
1128 }
1129 }
1130 }
1131 }
1132 else
1133 {
1134 m_ShouldReload = true;
1135 }
1136 }
1137 #endif
1138 }
1139
1141 {
1144 {
1145 return;
1146 }
1147
1152
1154 {
1158
1159 if (
weapon && m_CameraIronsight && !m_CameraOptics)
1160 {
1161 SetIronsights(false);
1162 SwitchOptics(
optic,
true);
1163 optic.SetStepFOVIndex(0);
1164 }
1165 else if (m_CameraOptics)
1166 {
1168 {
1169 if (!
optic.StepFOVUp())
1170 {
1172 {
1173 optic.SetStepFOVIndex(0);
1174 }
1175
1177 {
1178 SwitchOptics(
optic,
false);
1179 pInputs.ResetFreeLookToggle();
1180 SetIronsights(true);
1181 }
1182 }
1183 }
1184 else
1185 {
1187 }
1188 }
1189 }
1190
1192 {
1196 if (m_CameraOptics)
1197 {
1198 if (!
optic.StepFOVDown())
1199 {
1201 {
1203 {
1205 }
1206 }
1207
1209 {
1210 SwitchOptics(
optic,
false);
1211 pInputs.ResetFreeLookToggle();
1212 SetIronsights(true);
1213 }
1214 }
1215 }
1217 {
1218 SwitchOptics(
optic,
true);
1220 {
1222 }
1223 }
1224 }
1225 }
1226
1227
1231
1232 bool m_DamageHitFullbody = false;
1233 int m_DamageHitAnimType = -1.0;
1234 float m_DamageHitDir = 0.0;
1235 float m_DamageHealth = 0.0;
1236
1237 const float HIT_INTERVAL_MIN = 0.3;
1238 float m_HitElapsedTime = HIT_INTERVAL_MIN;
1239
1240 bool IsInFullbodyDamageAnimation()
1241 {
1243 }
1244
1247 {
1249 m_DamageHitAnimType = -1;
1250
1251 if (!m_SyncedHitDataArray || m_SyncedHitDataArray.Count() == 0)
1252 {
1253 return;
1254 }
1255
1256
1259 for (
int i = 0;
i < m_SyncedHitDataArray.Count();
i++)
1260 {
1261 data = m_SyncedHitDataArray[
i];
1262 m_DamageHitDir =
data.m_HitDir;
1263
1264
1265 #ifndef SERVER
1267 {
1268 m_DamageHealth =
data.m_HealthDamage;
1269 if (m_DamageHealth > 0.0)
1270 {
1272 GetGame().GetMission().GetHud().SpawnHitDirEffect(
this,m_DamageHitDir,
rel);
1273 }
1274 }
1275 #endif
1276
1278 {
1280 }
1281
1282 else if (
data.m_Fullbody)
1283 {
1285 }
1286 }
1287
1288 m_SyncedHitDataArray.Clear();
1289 m_DamageHealth = 0.0;
1290
1293 {
1294 return;
1295 }
1296
1297
1301 }
1302
1304 {
1305
1307 {
1308
1309 if ( m_HitElapsedTime < HIT_INTERVAL_MIN )
1310 {
1311 m_HitElapsedTime += m_dT;
1312 ResetDamageHitState(false);
1313 return false;
1314 }
1315 }
1316
1317
1318 if (m_DamageHitAnimType != -1 && m_TransportCache ==
null && !CommitedSuicide())
1319 {
1322 {
1324 ResetDamageHitState(true);
1325 return true;
1326 }
1327 else
1328 {
1330 ResetDamageHitState(false);
1331 return false;
1332 }
1333 }
1334
1336 }
1337
1339 {
1340 m_DamageHitAnimType = -1;
1341 m_DamageHitFullbody = false;
1342
1344 {
1345 m_HitElapsedTime = 0;
1346 }
1347 }
1348
1351 {
1353
1357
1361
1364
1367
1370
1374
1375 return true;
1376 }
1377
1380 {
1382
1386
1388 {
1392 break;
1393
1396 if (!IsUnconscious() &&
pAnimType == 1 && !m_MeleeFightLogic.IsInBlock())
1398 break;
1399
1402
1403 if (!IsUnconscious() && GetHealth("", "Shock") > 25)
1404 {
1407 {
1413 }
1414 }
1415
1416 break;
1417
1419 break;
1420
1425 else if (
pAmmoType !=
"HeatDamage" || IsSwimming())
1426 return false;
1427
1428 break;
1429 }
1430
1434
1437
1440
1443
1445
1446
1449
1452
1453 return true;
1454 }
1455
1458 {
1460
1461 m_TransportHitRegistered = false;
1462
1463 if (!IsAlive())
1464 {
1468 {
1470 }
1471
1472 if (!m_DeathSyncSent)
1473 {
1475
1476 if (!m_KillerData)
1477 {
1479 m_KillerData.m_Killer =
killer;
1480 m_KillerData.m_MurderWeapon =
source;
1481 }
1482
1484 {
1485
1487 {
1488 m_KilledByHeadshot = true;
1489 if (m_KillerData.m_Killer ==
killer)
1490 m_KillerData.m_KillerHiTheBrain = true;
1491 }
1492 }
1493 }
1494 }
1495 else
1496 {
1502 else
1503 {
1507
1510 }
1511 }
1512
1513
1515 {
1519 }
1520 }
1521
1522
1526 float m_fLastHeadingDiff = 0;
1527
1530 {
1531 if (!IsAlive())
1532 {
1533 return false;
1534 }
1535
1537
1540 {
1541 m_fLastHeadingDiff = 0;
1542 return false;
1543 }
1545 {
1547 if (
hmv.IsGettingOut() ||
hmv.IsGettingIn())
1548 {
1550 }
1551
1552 m_fLastHeadingDiff = 0;
1553 return false;
1554 }
1556 {
1558 if (!
hcu.IsWakingUp())
1559 {
1560 m_fLastHeadingDiff = 0;
1561
1562 return false;
1563 }
1564 }
1565
1567 {
1568 m_fLastHeadingDiff = 0;
1569 return false;
1570 }
1571
1572#ifdef DEVELOPER
1575 {
1578 }
1579#endif
1580
1582 {
1583 m_fLastHeadingDiff = 0;
1584 return false;
1585 }
1586
1589 {
1591 if (
hcm.IsStandingFromBack())
1592 {
1593 m_fLastHeadingDiff = 0;
1594 return false;
1595 }
1596 }
1597
1601 {
1603 }
1605 {
1607 }
1608
1610 }
1611
1612
1613
1618 {
1621 {
1623 if (
hcm.IsFinisher())
1624 {
1625 if (!m_AimingFinisherStarted)
1626 {
1627 m_AimingModel.OnFinisherBegin(
pModel.m_fCurrentAimY);
1628 m_AimingFinisherStarted = true;
1629 }
1630 m_AimingModel.ProcessStealthFilters(
pDt,
pModel);
1631 }
1632
1633 return true;
1634 }
1635
1637 {
1638 if (!m_RaiseStarted)
1639 {
1640 m_AimingModel.OnRaiseBegin(this);
1641 m_RaiseStarted = true;
1642 }
1644
1645 return true;
1646 }
1647
1648 m_RaiseStarted = false;
1649 m_AimingFinisherStarted = false;
1650
1651 return true;
1652 }
1653
1654
1658
1661 {
1663 if (!
hic || !
hic.IsJumpClimb())
1664 {
1665 return false;
1666 }
1667
1668 m_JumpClimb.JumpOrClimb();
1669
1670 if (!m_JumpClimb.WasSuccessful())
1671 {
1672 return false;
1673 }
1674
1675 return true;
1676 }
1677
1679 bool CanJump()
1680 {
1681 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1682 return false;
1683
1685 return false;
1686
1687 if (IsRaised() && GetInputInterface().SyncedPress("UAGetOverControllerHelper"))
1688 {
1689 return false;
1690 }
1691
1693 if (!
hibcfg.m_bJumpAllowed)
1694 return false;
1695
1697 return false;
1698
1701 {
1702 if (
hcm.IsChangingStance())
1703 return false;
1704 }
1705
1708 {
1709 return false;
1710 }
1711
1712 return true;
1713 }
1714
1716 {
1717 if (IsFBSymptomPlaying() || IsRestrained() || IsUnconscious() || IsInFBEmoteState())
1718 return false;
1719
1721 return false;
1722
1723 if (IsRaised() && GetInputInterface().SyncedPress("UAGetOverControllerHelper"))
1724 {
1725 return false;
1726 }
1727
1729 if (!
hibcfg.m_bJumpAllowed)
1730 return false;
1731
1733 {
1736 return false;
1738 return false;
1740 return false;
1741 }
1742
1743 return true;
1744 }
1745
1746
1748 {
1749 }
1750
1752 {
1753 }
1754
1755 void StopHandEvent()
1756 {
1757 GetDayZPlayerInventory().CancelHandEvent();
1758 }
1759
1760 void StopWeaponEvent()
1761 {
1762 GetDayZPlayerInventory().CancelWeaponEvent();
1763 }
1764
1766 {
1767 GetDayZPlayerInventory().AbortWeaponEvent();
1768 }
1769
1770
1774 void HandleADS()
1775 {
1776 if (!IsAlive())
1777 {
1778 if (m_CameraIronsight || m_CameraOptics)
1779 {
1780 ExitSights();
1781 }
1782 return;
1783 }
1784
1792
1794 {
1796 }
1797
1798 if (m_ResetADS || (!
hia.IsItemInHandsWeapon() &&
hic.WeaponADS()))
1799 {
1801 m_ResetADS = false;
1802 }
1803
1805 {
1806 ResetWeaponRaiseProgress();
1808 }
1809 else
1810 {
1811 if (m_bADS !=
hic.WeaponADS())
1812 {
1813 m_bADS =
hic.WeaponADS();
1815 }
1816
1817 if (m_bADS && !m_CameraIronsight && !m_CameraOptics)
1818 {
1820 if (!IsWeaponRaiseCompleted())
1821 {
1824 }
1825 else
1826 {
1828 }
1829 }
1830 }
1831
1833 {
1834 if (
hia.IsItemInHandsWeapon() &&
playerPB.GetItemInHands() &&
playerPB.GetItemInHands().IsWeapon() &&
playerPB.GetWeaponManager() && !
playerPB.GetWeaponManager().IsRunning())
1835 {
1841
1844
1845
1849 {
1851 }
1852
1853
1854 if (IsLiftWeapon() || !IsRaised() || GetDayZPlayerInventory().
IsProcessing() || !IsWeaponRaiseCompleted() || IsFighting())
1855 {
1857 }
1859 {
1860
1862 {
1863 m_WasIronsight = false;
1864 }
1866 {
1867 m_WasIronsight = true;
1868 }
1869
1870 if (m_WasIronsight)
1871 {
1872 hic.ResetFreeLookToggle();
1873 SwitchOptics(
optic,
false);
1874 SetIronsights(true);
1875 }
1877 {
1878 SetIronsights(false);
1879 SwitchOptics(
optic,
true);
1880 }
1881 else
1882 {
1884 }
1885
1886 if (
hcw && (m_CameraOptics))
1887 {
1889 }
1890 }
1891 else
1892 {
1894 }
1895 }
1896 }
1897
1898
1900 {
1901 ExitSights();
1902 }
1903 }
1904
1905 void HandleView()
1906 {
1907 if (!IsAlive())
1908 {
1909 if (m_CameraIronsight || m_CameraOptics)
1910 {
1911 ExitSights();
1912 }
1913 return;
1914 }
1915
1917
1919
1920 if (IsRaised())
1921 {
1922 if (m_IsWeapon)
1923 {
1925 }
1926 }
1927
1929 if (
GetGame().GetWorld().Is3rdPersonDisabled())
1930 {
1931 m_Camera3rdPerson = false;
1932 }
1934 {
1935 m_Camera3rdPerson = !m_Camera3rdPerson;
1936 }
1937
1938
1939 if (m_LiftWeapon_player && (m_CameraOptics || m_CameraIronsight))
1940 ExitSights();
1941
1943 {
1945 m_CameraOpticsAimOverride = true;
1946 }
1947 else if (m_CameraOpticsAimOverride)
1948 {
1950 m_CameraOpticsAimOverride = false;
1951 }
1952
1954 {
1957 {
1959 }
1960 else if (!IsClimbingLadder() && !IsSwimming() && !IsInVehicle())
1961 {
1965
1967 {
1969 }
1970 }
1971 }
1972 else
1973 {
1975 }
1976
1978 {
1983
1985 {
1987 }
1988 else
1989 {
1991 }
1992
1994 {
1996
1998
2000 {
2003 {
2005 }
2007 {
2009 }
2010
2012 if (m_SoundOffset > 0.25)
2013 {
2014 m_SoundOffset = 0.25;
2015 }
2016
2017 string soundSetName =
"Cloth_Body_longmove_TShirt_Soundset";
2018
2022 {
2024 }
2025
2027 {
2028 string path =
"CfgSoundTables CfgAttachmentSoundTables Cloth_Body_Longmove_LookupTable";
2030
2032 {
2035
2037 {
2041
2043 }
2044 }
2045 }
2046
2049
2051 {
2053
2055 {
2057
2059 wave.SetStartOffset(m_SoundOffset);
2061
2062 m_LastBackSoundTime =
GetGame().GetTime();
2064 }
2065 }
2066 }
2067
2069 {
2072 {
2074 }
2075
2077 if (m_SoundOffset < 0.1)
2078 {
2079 m_SoundOffset = 0.1;
2080 }
2081 if (m_SoundOffset > 0.3)
2082 {
2083 m_SoundOffset = 0.3;
2084 }
2085
2086 string soundSetName2 =
"walkProne_noHS_asphalt_ext_Char_SoundSet";
2088
2090 {
2092
2093 string path2 =
"CfgSoundTables CfgStepSoundTables walkProne_noHS_Char_LookupTable";
2095
2097 {
2100
2102 {
2106
2108 }
2109 }
2110 }
2111
2114
2116 {
2118
2120 {
2122
2124 wave2.SetStartOffset(m_SoundOffset);
2126
2127 m_LastBackSoundTime2 =
GetGame().GetTime();
2129 }
2130 }
2131 }
2132
2134 }
2135 }
2136 }
2137
2138 float m_LastHeadingAngleBlock;
2139 float m_LastHeadingAngleBlock2;
2140 float m_LastHeadingAngle;
2141 int m_LastBackSoundTime;
2142 int m_LastBackSoundTime2;
2143 float m_SoundOffset;
2144
2145
2146
2150
2151
2153 {
2154 return false;
2155 }
2156
2158 {
2159 return false;
2160 }
2161
2163 {
2164 return false;
2165 }
2166
2167
2171
2172
2175 {
2177
2179
2181 {
2182 return;
2183 }
2184
2188
2191
2194 {
2197 }
2198
2200 {
2203 }
2204
2206 {
2208 GetUApi().ActivateModificator(
"aiming");
2209 else
2210 GetUApi().DeactivateModificator(
"aiming");
2211 }
2212
2213
2214 HandleADS();
2215
2216
2218 {
2220 if (
isWeapon && (!m_ProcessFirearmMeleeHit || !m_ContinueFirearmMelee))
2221 {
2222 m_ProcessFirearmMeleeHit = false;
2225 }
2226 else if (IsHandheldOpticsInUse() && m_CameraOptics &&
opticInHands)
2227 {
2230 }
2231 }
2232
2234 HandleView();
2235
2237 {
2238 OnMovementChanged();
2240 }
2241
2244 {
2245 return;
2246 }
2247
2251 {
2254 {
2256 if ( m_Swimming.CheckSwimmingStart(
waterLevel ) )
2257 {
2258
2260
2262 return;
2263 }
2264 }
2265 }
2266
2269 {
2271 {
2273 {
2274 int crew_index = m_TransportCache.CrewMemberIndex(
this);
2277 m_TransportCache =
null;
2278 return;
2279 }
2280 }
2281
2282
2283
2285 {
2288 return;
2289 }
2290
2292 if (m_Swimming.m_bWasSwimming)
2293 {
2295 return;
2296 }
2297
2298 StartCommand_Move();
2299
2300 if (GetHumanInventory().GetEntityInHands())
2302
2303 return;
2304 }
2305
2306
2307
2309
2311 {
2312 return;
2313 }
2314
2315
2316
2317
2319 {
2321 if (
hcv.WasGearChange())
2322 {
2324 cb.SetVehicleCommand(
hcv);
2325 }
2326
2327 return;
2328 }
2329
2331
2334 {
2335 m_SprintedTime +=
pDt;
2336 if (m_SprintedTime > m_SprintedTimePerStanceMin)
2337 {
2338 m_SprintFull = true;
2340 }
2341 else
2342 m_SprintFull = false;
2343 }
2344 else
2345 {
2346 m_SprintedTime = 0.0;
2347 m_SprintFull = false;
2348 }
2349
2350
2351
2353 {
2355 {
2356 return;
2357 }
2358
2359 m_JumpClimb.CheckAndFinishJump();
2360 return;
2361 }
2362
2363
2364
2366 {
2368 return;
2369 }
2370
2371
2372
2374 {
2375 return;
2376 }
2377
2378
2379
2380
2382 {
2384 {
2387
2390
2391
2393 {
2396 npar = type.GetNoiseParamsLandLight();
2398 }
2400 {
2403 else
2405
2407 npar = type.GetNoiseParamsLandLight();
2409 }
2411 {
2414 npar = type.GetNoiseParamsLandHeavy();
2416 }
2417 else
2418 {
2421 npar = type.GetNoiseParamsLandHeavy();
2423 }
2424
2426 {
2427 OnPlayerRecievedHit();
2428 }
2429
2432 }
2433
2436 {
2437 return;
2438 }
2439 }
2441 {
2442
2445 return;
2446 }
2447
2448
2449
2450
2451#ifndef NO_GUI
2452#ifdef DEVELOPER
2454
2456 {
2458
2460 hcls.m_fFwMaxDistance = 3;
2461 else
2462 hcls.m_fFwMaxDistance = 1.2;
2463
2465
2468 }
2469
2470#endif
2471#endif
2472
2473
2475 {
2476 return;
2477 }
2478
2480
2482#ifndef NO_GUI
2483#ifdef DEVELOPER
2486#endif
2487#endif
2489
2491 {
2493 ad.SetTalking(
true);
2494
2495
2497 {
2499 if (
now >= m_NextVoNNoiseTime)
2500 {
2501 m_NextVoNNoiseTime =
now + 1000;
2502
2505
2506
2509 {
2511 vonpar =
pt.GetNoiseParamsWhisper();
2512 break;
2515 break;
2518 break;
2519 }
2521 }
2522 }
2523 }
2524 else
2525 {
2527 ad.SetTalking(
false);
2528 }
2529
2530
2531
2532
2534
2536 {
2540
2542 if (m_MeleeFightLogic.CanFight())
2543 {
2545 {
2546 m_ProcessFirearmMeleeHit =
isWeapon && (
hic.IsMeleeWeaponAttack() || m_ProcessFirearmMeleeHit) || m_ContinueFirearmMelee;
2547 return;
2548 }
2549 }
2550 }
2551
2552
2555 {
2556 return;
2557 }
2558 }
2559
2561
2562
2566
2567 float m_TestDamageCounter = -1;
2568 float m_DebugDirectionVal = -180;
2569 bool m_DebugTypeVal = false;
2570
2571 int m_DebugWeaponChangeStage = 0;
2572 string m_DebugWeaponChangeItem;
2573 int m_DebugWeaponChangeShowSlot;
2574
2577 {
2579 {
2582 {
2584
2586 if (m_DebugWeaponChangeStage == 0)
2587 {
2588
2589
2591
2592 if (
playerDebug.IsWeaponChange(m_DebugWeaponChangeItem,
hideSlot, m_DebugWeaponChangeShowSlot))
2593 {
2594
2595
2598
2599 m_DebugWeaponChangeStage = 1;
2600 }
2601 }
2602 else if (m_DebugWeaponChangeStage == 1)
2603 {
2604
2607 {
2609 {
2611
2612
2617 {
2619 }
2620
2621 if (m_DebugWeaponChangeItem != "")
2622 {
2626 }
2627
2630
2631 m_DebugWeaponChangeStage = 2;
2632 }
2633 }
2634 }
2635 else if (m_DebugWeaponChangeStage == 2)
2636 {
2638 if (
w3 &&
w3.IsActionFinished())
2639 {
2640 m_DebugWeaponChangeStage = 0;
2641 }
2642 }
2643 }
2644 }
2645
2646
2648 if (m_TestDamageCounter >= 0)
2649 {
2650 if (m_TestDamageCounter > 3)
2651 {
2652 m_DebugDirectionVal = m_DebugDirectionVal + 90;
2653 m_TestDamageCounter = 0;
2654
2655 if (m_DebugDirectionVal > 90)
2656 {
2657 m_DebugDirectionVal = -180;
2658 m_DebugTypeVal = !m_DebugTypeVal;
2659 }
2660
2661 if (m_DebugTypeVal)
2662 {
2664 }
2665 else
2666 {
2668 }
2669
2670
2671
2672
2673 }
2674
2675 m_TestDamageCounter +=
pDt;
2676 }
2677
2678
2679#ifndef NO_GUI
2680#ifdef DEVELOPER
2681
2682
2683 {
2685
2689 {
2690 ad.SetInjured(
v,
true);
2691 }
2692
2696 {
2697 ad.SetExhaustion(
v,
true);
2698 }
2699 }
2700#endif
2701#endif
2702
2703 }
2704
2705
2706
2707
2712 {
2714 if (!m_LiftWeapon_player)
2715 {
2723
2724 if (m_CameraOptics &&
optics)
2725 {
2727 }
2728 else if (m_CameraIronsight &&
weapon)
2729 {
2731 }
2732 }
2733
2734
2735
2736
2738 if (m_Camera3rdPerson && m_IsWeapon && m_IsRaised &&
hic &&
hic.WeaponADS())
2739 {
2741 }
2742
2743
2745 {
2747 }
2748
2750
2751 if (!m_Camera3rdPerson)
2752 {
2754 {
2756 }
2757
2759 }
2760 else
2761 {
2763 {
2766 {
2767 return transport.Get3rdPersonCameraType();
2768 }
2769 }
2770
2773
2777
2779
2781
2783 {
2785 }
2786
2787 if (m_JumpClimb.m_bIsJumpInProgress)
2788 {
2790 }
2791
2793
2797 {
2799 }
2800
2801
2802
2804 {
2806 }
2808 {
2810 }
2812 {
2814 }
2816 {
2818 }
2819
2821 {
2822 if (m_IsWeapon)
2823 {
2825 }
2826 else
2827 {
2829 }
2830 }
2832 {
2834 }
2835
2836
2838 }
2839
2841 }
2842
2844 void OnMovementChanged()
2845 {
2847 {
2849 {
2850
2851 break;
2852 }
2854 {
2855 OnSprintEnd();
2856 break;
2857 }
2859 {
2860
2861 break;
2862 }
2864 {
2865
2866 break;
2867 }
2869 {
2870
2871 break;
2872 }
2874 {
2875
2876 break;
2877 }
2878 }
2879
2881 {
2883 {
2884
2885 break;
2886 }
2888 {
2889 OnSprintStart();
2890 break;
2891 }
2893 {
2894
2895 break;
2896 }
2898 {
2899
2900 break;
2901 }
2903 {
2904
2905 break;
2906 }
2908 {
2909
2910 break;
2911 }
2912 }
2913 }
2914
2915 void OnSprintStart()
2916 {
2918 {
2921 }
2922 }
2923
2924 void OnSprintEnd()
2925 {
2927 {
2930 }
2931 }
2932
2936
2938 {
2941 {
2942 Error(
"DayZPlayerImplement: cannot read input type");
2943 return;
2944 }
2945
2947 }
2948
2950 {
2955
2957 {
2960 {
2962 }
2963
2966 {
2968 }
2969
2972 {
2974 }
2975
2978 {
2980 }
2981
2982 return true;
2983 }
2984
2985 return false;
2986 }
2987
2988
2993 {
2995 {
2997 if (m_DeathAnimType == -2)
2999 break;
3000
3004 {
3005 m_SyncedHitDataArray.Insert(
data);
3006 }
3007 break;
3008 }
3009 }
3010
3012 {
3015 {
3016 switch (
boots.GetAttachmentSoundType())
3017 {
3018 case "Sneakers":
3020 case "Boots":
3022 }
3023 }
3024
3026 }
3027
3028
3030 {
3033 {
3035 {
3036 case "NylonJacket":
3038 case "TShirt":
3040 case "WoolShirt":
3042 case "HeavyJacket":
3044 case "LeatherJacket":
3046 case "Coat":
3048 case "ChemlonDress":
3050 case "Ghillie":
3052 case "Chainmail":
3054 }
3055 }
3056
3058 }
3059
3061 {
3064 {
3065 switch (
back.GetAttachmentSoundType())
3066 {
3067 case "Small":
3069 case "Military":
3071 case "Outdoor":
3073 case "Ghillie":
3075 }
3076 }
3077
3079 }
3080
3081
3083 {
3086
3089
3091 {
3093 {
3094 case "Shotgun":
3095 {
3097 break;
3098 }
3099 case "Rifle":
3100 {
3102 break;
3103 }
3104 }
3105 }
3107 {
3109 {
3110 case "Shotgun":
3111 {
3113 break;
3114 }
3115 case "Rifle":
3116 {
3118 break;
3119 }
3120 }
3121 }
3122
3125
3128
3130 }
3131
3133 {
3136
3138
3140 }
3141
3142
3146
3148 {
3151
3155 }
3156
3158 {
3161 }
3162
3163
3167
3169 {
3173
3174 #ifndef SERVER
3178 {
3179 string surface;
3181 {
3183 if (surface.
Length() == 0)
3185 }
3186 else
3187 {
3189 if (surface.
Length() == 0)
3191 }
3192
3193 if (surface.
Length() != 0)
3194 m_LastSurfaceUnderHash = surface.
Hash();
3195
3197 {
3199
3201 {
3203 }
3204 }
3205
3207 }
3208 else
3209 {
3210 string surface2 = GetSurfaceType();
3212 m_LastSurfaceUnderHash =
surface2.Hash();
3213
3215 }
3216
3218 {
3223
3225 {
3227 {
3230
3232 {
3233 for (
int j = 0;
j < type.GetVegetationSounds().
Count(); ++
j)
3234 {
3236
3238 {
3241
3243 {
3246 }
3247
3248 break;
3249 }
3250 }
3251
3252 break;
3253 }
3254 }
3255 }
3256
3259 {
3262 }
3263 }
3264 #endif
3265
3267 {
3268 m_StepCounter++;
3269
3271
3279 else
3280 {
3281 Debug.
Log(
string.Format(
"Wrong stance, id: %1 using backup with stand stance (id: 0)",
state.m_iStanceIdx));
3283 }
3284
3286
3288
3290 {
3292 }
3293 }
3294 }
3295
3297 {
3299
3301 {
3303 {
3306 {
3308 return;
3309 }
3310 }
3311
3313 }
3315 {
3317 {
3320 {
3322 return;
3323 }
3324 }
3325
3327 }
3329 {
3331 }
3333 {
3335 {
3338 {
3340 return;
3341 }
3342 }
3344 }
3345 else
3346 {
3348 }
3349 }
3350
3352 {
3353
3354 }
3355
3356
3358 {
3361
3363
3366 {
3369 if (
item.HasQuantity())
3373 }
3374
3376 {
3379 }
3380
3382 {
3383 if (!
GetGame().IsDedicatedServer())
3384 {
3387 {
3389 builder.AddVariable(
"interior", IsSoundInsideBuilding());
3390
3393 {
3396
3398 m_PerformedActionSounds.Insert(
sound);
3399 }
3400 }
3401 else
3402 {
3403
3404 }
3405 }
3406
3408 {
3410 }
3411 }
3412 }
3413
3415 {
3418
3422 {
3430
3432
3434 {
3437 {
3440 }
3441 }
3442 }
3443 }
3444
3446 {
3447 if (m_ClimbingLadderType == "wood")
3448 {
3450 }
3451 else
3452 {
3454 }
3455
3457
3459 {
3463 }
3465 {
3469 }
3471 {
3475 }
3476 }
3477
3479 {
3484 {
3486 }
3487
3489 {
3490 if (!
GetGame().IsDedicatedServer())
3491 {
3494 {
3496 }
3498
3501 {
3504
3506 m_PerformedActionSounds.Insert(
sound);
3507 }
3508 }
3509
3511 {
3514 }
3515 }
3516 }
3517
3518
3519
3521 {
3522 #ifdef SERVER
3524 #endif
3532
3535 {
3538
3541
3543 {
3546 }
3548 {
3551 }
3552
3554 {
3556 }
3557 else
3558 {
3560 }
3561 }
3562
3564 {
3566 }
3567
3569
3571 {
3573
3577 {
3579 }
3580 else
3581 {
3583 }
3584
3587
3588
3591 {
3594 }
3595
3596 }
3597
3599 }
3600
3601 void ProcessFeetDamageServer(
int pUserInt);
3602
3603
3604
3608
3610 {
3613
3616 return true;
3617 return false;
3618 }
3619
3621 {
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631 return CheckForTakeItem(
item);
3632 }
3633
3634
3639 {
3642 return true;
3643
3644 if (!IsAlive() ||
player.IsUnconscious())
3645 return true;
3646 return false;
3647 }
3648
3649#ifdef DEVELOPER
3650
3651
3653 {
3655
3657 {
3658 Print(
"ERPCs.RPC_DAYZPLAYER_DEBUGSERVERWALK");
3659
3662
3663 GetInputController().OverrideMovementSpeed(
rp.param1, 1);
3664 GetInputController().OverrideAimChangeX(
rp.param1, 0.01);
3665
3666 }
3667 }
3668
3669#endif
3670
3672 {
3674 {
3676
3678 {
3679 return fall.PhysicsLanded();
3680 }
3681 }
3682
3683 return false;
3684 }
3685
3687 {
3689 {
3691
3693 {
3695 return true;
3696 }
3697 }
3698
3699 return false;
3700 }
3701
3703 {
3705 }
3706
3708 void OverrideSlidePoseAngle(
float value)
3709 {
3710 if (!m_MoveSettings)
3712 if (m_MoveSettings.m_fSlidingPoseAngle !=
value)
3713 {
3714 m_MoveSettings.m_fSlidingPoseAngle =
value;
3715 StartCommand_Move();
3716 }
3717 }
3718
3719 float GetSlidePoseAngle()
3720 {
3722 }
3723
3724 void CheckAnimationOverrides()
3725 {
3726 }
3727
3728 bool IsPlayerSelected()
3729 {
3730 return m_PlayerSelected;
3731 }
3732
3733 bool IsRestrained();
3734
3736 bool IsInFBEmoteState();
3737
3738 void SetSuicide(
bool state)
3739 {
3741 }
3742
3743 bool CommitedSuicide()
3744 {
3745 return m_Suicide;
3746 }
3747
3750
3751
3755
3757 {
3758 if (!IsAlive())
3759 return;
3760
3762 return;
3763
3766 {
3768 {
3770 }
3771 }
3772 }
3773
3775 {
3777 {
3779 }
3780 else
3781 {
3783 }
3784 }
3785
3786 void CheckLiftWeapon();
3787 void ProcessLiftWeapon();
3788
3789 void SetHandheldOpticsInUse(
bool state)
3790 {
3791 m_HandheldOpticsInUse =
state;
3792 }
3793
3794 bool IsHandheldOpticsInUse()
3795 {
3796 return m_HandheldOpticsInUse;
3797 }
3798
3799 bool IsLiftWeapon();
3800 bool IsRaised()
3801 {
3802 return m_IsRaised;
3803 }
3804
3805 bool IsFighting();
3806
3808
3810 {
3812 }
3813
3815 {
3816 return CanPickupHeavyItem(
item1) && CanPickupHeavyItem(
item2);
3817 }
3818
3819#ifdef DIAG_DEVELOPER
3821 {
3822 return Weapon_Base.Cast(GetHumanInventory().CreateInHands(type));
3823 }
3824#endif
3825
3827
3829
3830 protected bool m_CameraEyeZoom;
3832 protected bool m_ADSTimerLaunched;
3833 protected bool m_ProcessWeaponRaiseCompleted;
3834 protected bool m_IsFireWeaponRaised;
3835 void SetReturnToOptics(
bool state);
3836 void RunADSTimer();
3837 void StopADSTimer();
3838}
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
Definition CentralEconomy.c:36
const int RF_DEFAULT
Definition CentralEconomy.c:65
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DamageType
exposed from C++ (do not change)
Definition DamageSystem.c:11
AnimBootsType
Definition DayZAnimEvents.c:98
bool ModCommandHandlerInside(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZAnimal.c:136
proto native void ResetDeathCooldown()
bool ModCommandHandlerBefore(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZAnimal.c:131
bool ModCommandHandlerAfter(float pDt, int pCurrentCommandID, bool pCurrentCommandFinished)
Definition DayZAnimal.c:141
DayZGame g_Game
Definition DayZGame.c:3815
ref HumanMovementState m_MovementState
movement state
Definition DayZPlayerCamera3rdPerson.c:324
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
Definition DayZPlayerImplementFallDamage.c:73
void DayZPlayerImplementMeleeCombat(DayZPlayerImplement player)
Definition DayZPlayerImplementMeleeCombat.c:90
bool IsProcessing()
Definition DayZPlayerInventory.c:2501
void AbortWeaponEvent()
Definition DayZPlayerInventory.c:282
ref DayZPlayerImplementMeleeCombat m_MeleeCombat
Definition DayZPlayerMeleeFightLogic_LightHeavy.c:20
void DayZPlayerMeleeFightLogic_LightHeavy(DayZPlayerImplement player)
Definition DayZPlayerMeleeFightLogic_LightHeavy.c:31
void DayZPlayerUtils()
cannot be instantiated
Definition DayZPlayerUtils.c:465
ECameraZoomType
Definition ECameraZoomType.c:2
ERPCs
Definition ERPCs.c:2
EStaminaConsumers
Definition EStaminaConsumers.c:2
EStaminaModifiers
Definition EStaminaModifiers.c:2
bool OnInputUserDataProcess(int userDataType, ParamsReadContext ctx)
Definition EmoteManager.c:500
void OnSyncJuncture(int pJunctureID, ParamsReadContext pCtx)
Definition EmoteManager.c:532
override void EEKilled(Object killer)
Definition ExplosivesBase.c:93
void PlaySound()
Definition HungerSoundHandler.c:38
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override void EOnContact(IEntity other, Contact extra)
Definition ItemBase.c:5950
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
Definition ItemBase.c:6269
string GetDebugText()
Definition ModifierBase.c:71
PlayerBase GetPlayer()
Definition ModifierBase.c:51
proto void AddNoise(EntityAI source_entity, NoiseParams noise_params, float external_strenght_multiplier=1.0)
class NoiseSystem NoiseParams()
Definition Noise.c:15
string path
Definition OptionSelectorMultistate.c:142
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition ParticleManager.c:84
void PlayerSoundEventHandler(PlayerBase player)
Definition PlayerSoundEventHandler.c:52
EPlayerSoundEventID
Definition PlayerSoundEventHandler.c:2
override void OnRPC(ParamsReadContext ctx)
Definition PlayerStatBase.c:69
void PluginDayzPlayerDebug()
Definition PluginDayzPlayerDebug.c:275
void CommandHandler()
Definition PluginDayzPlayerDebug.c:1051
PluginManager GetPluginManager()
Returns registred plugin by class type, better is to use global funtion GetPlugin(typename plugin_typ...
Definition PluginManager.c:274
@ Count
Definition RandomGeneratorSyncManager.c:8
void ReplaceSoundEventHandler(PlayerBase player)
Definition ReplaceSoundEventHandler.c:25
ESoundEventType
Definition ReplaceSoundEventHandler.c:2
WaveKind
Definition Sound.c:2
class SoundObjectBuilder SoundObject(SoundParams soundParams)
void SoundObjectBuilder(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition ZombieBase.c:2
Definition DayZPlayerCameras.c:2
static const int DAYZCAMERA_3RD_ERC_RAISED
3rd - standing raised
Definition DayZPlayerCameras.c:6
static const int DAYZCAMERA_3RD_CRO_RAISED
3rd - crouch
Definition DayZPlayerCameras.c:8
static const int DAYZCAMERA_IRONSIGHTS
ironsights camera
Definition DayZPlayerCameras.c:12
static const int DAYZCAMERA_3RD_CRO
3rd - crouch
Definition DayZPlayerCameras.c:7
static const int DAYZCAMERA_3RD_ERC_RAISED_MELEE
3rd - laying raised
Definition DayZPlayerCameras.c:11
static const int DAYZCAMERA_1ST
1st person camera
Definition DayZPlayerCameras.c:3
static const int DAYZCAMERA_1ST_VEHICLE
vehicle 1st person
Definition DayZPlayerCameras.c:18
static const int DAYZCAMERA_3RD_PRO_RAISED
3rd - laying raised
Definition DayZPlayerCameras.c:10
static const int DAYZCAMERA_3RD_PRO
3rd - laying
Definition DayZPlayerCameras.c:9
static const int DAYZCAMERA_3RD_JUMP
jump
Definition DayZPlayerCameras.c:15
static const int DAYZCAMERA_3RD_CLIMB
climb / vault
Definition DayZPlayerCameras.c:16
static const int DAYZCAMERA_3RD_ERC_SPR
3rd - standing sprint
Definition DayZPlayerCameras.c:5
static const int DAYZCAMERA_1ST_UNCONSCIOUS
unconscious
Definition DayZPlayerCameras.c:14
static const int DAYZCAMERA_3RD_ERC
3rd - standing
Definition DayZPlayerCameras.c:4
static const int DAYZCAMERA_OPTICS
optics
Definition DayZPlayerCameras.c:13
Definition DayZPlayerImplement.c:11
Definition DayZPlayerImplement.c:111
Definition DayZPlayerImplementAiming.c:32
Definition DayZPlayerImplementHeading.c:11
static bool NoHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
Definition DayZPlayerImplementHeading.c:187
static bool ClampHeading(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
Definition DayZPlayerImplementHeading.c:19
static bool RotateOrient(float pDt, SDayZPlayerHeadingModel pModel, out float pLastHeadingDiff)
Definition DayZPlayerImplementHeading.c:67
override void OnVariablesSynchronized()
Definition ManBase.c:16
Definition DayZPlayerImplementJumpClimb.c:2
Definition DayZPlayerImplementSwimming.c:3
Definition DayZPlayerImplementThrowing.c:2
Definition DayZPlayerInventory.c:125
Definition DayZPlayerSyncJunctures.c:5
static bool ReadDeathParams(ParamsReadContext pCtx, out int pType, out float pHitDir)
Definition DayZPlayerSyncJunctures.c:74
static bool ReadDamageHitParamsEx(ParamsReadContext pCtx, out SyncHitInfo pData)
Definition DayZPlayerSyncJunctures.c:132
static void SendDeath(DayZPlayer pPlayer, int pType, float pHitDir)
Definition DayZPlayerSyncJunctures.c:65
static void SendDamageHitEx(DayZPlayer pPlayer, int pType, float pHitDir, bool pFullbody, TotalDamageResult pDamageResult, int pDamageType, EntityAI pSource, string pComponent, string pAmmoType, vector pModelPos)
Definition DayZPlayerSyncJunctures.c:99
static const int SJ_DAMAGE_HIT
Definition DayZPlayerSyncJunctures.c:6
static const int SJ_DEATH
Definition DayZPlayerSyncJunctures.c:18
Definition dayzplayer.c:171
Definition dayzplayer.c:147
Definition DayZPlayerCfgSounds.c:168
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.
Definition Debug.c:136
Definition DayZPlayerImplementFallDamage.c:2
Definition DayZPlayerImplementVehicle.c:2
command itself
Definition human.c:773
proto static native bool DoClimbTest(Human pHuman, SHumanCommandClimbResult pResult, int pDebugDrawLevel)
Definition humanitems.c:6
Definition EnEntity.c:165
Definition InventoryItemType.c:2
InventoryLocation.
Definition InventoryLocation.c:29
provides access to slot configuration
Definition InventorySlots.c:6
Definition InventoryItem.c:731
Definition ItemOptics.c:2
Definition KillerData.c:2
Definition SensesAIEvaluate.c:2
static float GetNoiseMultiplier(DayZPlayerImplement playerImplement)
Definition SensesAIEvaluate.c:5
static float GetNoiseReduction(Weather weather)
Definition SensesAIEvaluate.c:18
Definition ObjectTyped.c:2
Definition OnlineServices.c:2
static void SetMultiplayState(bool state)
Definition OnlineServices.c:517
Definition PlayerBaseClient.c:2
Definition PlayerConstants.c:2
static const float FULL_SPRINT_DELAY_DEFAULT
Definition PlayerConstants.c:7
static const float WEAPON_RAISE_BLEND_DELAY
Definition PlayerConstants.c:3
static const int CHECK_EVERY_N_STEP
Definition PlayerConstants.c:16
static const float HEAVY_HIT_THRESHOLD
Definition PlayerConstants.c:5
The class that will be instanced (moddable)
Definition gameplay.c:388
Definition dayzplayer.c:1098
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
static int GetStepsParticleID(string surface_name)
Definition Surface.c:3
Definition SyncedValue.c:2
Definition DayZPlayerImplement.c:63
Definition DamageSystem.c:2
Base native class for all motorized wheeled vehicles.
Definition Boat.c:28
Definition dayzplayer.c:191
shorthand
Definition BoltActionRifle_Base.c:6
Definition WeaponDebug.c:12
script counterpart to engine's class Weapon
Definition InventoryItem.c:49
Definition WeaponManager.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
Definition EnConvert.c:97
Definition EnConvert.c:106
static const vector Zero
Definition EnConvert.c:110
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Definition EnConvert.c:271
int CameraHandler(int pCameraMode)
-------------— camera handling ----------------------—
bool IsInThirdPerson()
return true if player is currently in 3pp, otherwise false
void DayZPlayerType()
Definition dayzplayer.c:512
proto native void SetVerticalMinimumAimLimit(float value)
sets vertical minimum aim limit for a player
void SDayZPlayerHeadingModel()
cannot be created from script
Definition dayzplayer.c:1089
void ForceStandUpForHeavyItems(notnull EntityAI item)
-------------— Forces player to stand up when swapping to heavy item ----------------------—
Definition dayzplayer.c:1361
DayZPlayerInstanceType
defined in C++
Definition dayzplayer.c:1068
proto native DayZPlayerType GetDayZPlayerType()
returns appropriate DayZPlayerType
proto native DayZPlayerInstanceType GetInstanceType()
proto native float IsPlayerSpeaking()
-------------— speaking anim ----------------------—
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602
void OnInputForRemote(ParamsReadContext ctx)
Definition dayzplayer.c:1332
void OnInputFromServer(ParamsReadContext ctx)
Definition dayzplayer.c:1333
float GetCurrentWaterLevel()
void SetCurrentWaterLevel(float pWaterLevel)
bool AimingModel(float pDt, SDayZPlayerAimingModel pModel)
-------------— aiming model ----------------------—
int GetEyeZoomLevel()
returns eye zoom level, uses ECameraZoomType values
bool IsShootingFromCamera()
return true if shots are fired from camere, otherwise false
bool IsPlayerInStance(int pStanceMask)
-------------— camera additiona functions ----------------------—
Definition dayzplayer.c:1323
bool IsEyeZoom()
DEPRICATED(use GetEyeZoomLevel()) returns true if player is using EyeZoom, otherwise false.
bool HeadingModel(float pDt, SDayZPlayerHeadingModel pModel)
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90
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
Definition EnScript.c:685
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 AbsFloat(float f)
Returns absolute value.
static const float RAD2DEG
Definition EnMath.c:16
static proto int AbsInt(int i)
Returns absolute value.
proto native int Hash()
Returns hash of string.
proto native int Length()
Returns length of string.
class HumanCommandLadder HumanCommandSwim()
Definition human.c:673
WeaponActions
actions
Definition human.c:816
WeaponEvents
events
Definition human.c:963
class HumanCommandMelee2 HumanCommandFall()
Definition human.c:574
proto native bool IsLeavingUncon()
return true if character transitions out of uncon
class HumanCommandWeapons HumanCommandAdditives()
Definition human.c:1112
void HumanItemAccessor()
Definition humanitems.c:141
class HumanItemBehaviorCfg OnItemInHandsChanged(bool pInstant=false)
signalization from script to engine that item in hands changed
class SHumanGlobalSettings SHumanCommandMoveSettings()
Definition humansettings.c:12
class SHumanCommandSwimSettings SHumanCommandClimbSettings()
Definition humansettings.c:74