644{
648
650 {
651
652
658
663
666
667 SetEnginePos("0 0.7 1.2");
668 }
669
671 {
672 super.EEInit();
673
675 {
682
685 }
686 }
687
689 {
690 super.OnEngineStart();
691
693 {
695 }
696 }
697
699 {
700 super.OnEngineStop();
701
703 {
705 }
706 }
707
709 {
711 {
713 {
715 }
716 }
717 }
718
720 {
722 }
723
725 {
726 return 3.5;
727 }
728
730 {
731 switch (posIdx)
732 {
733 case 0:
735 case 1:
737 case 2:
739 case 3:
741 }
742
743 return 0;
744
745 }
746
747
749 {
751 }
752
754 {
756 }
757
759 {
760 if (!super.CanReleaseAttachment(attachment))
761 {
762 return false;
763 }
764
766 {
767 string attType = attachment.GetType();
768 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
769 {
770 return false;
771 }
772 }
773
774 return true;
775 }
776
778 {
780 }
781
783 {
784 if (!super.CanDisplayAttachmentCategory(category_name))
785 {
786 return false;
787 }
788
790 if (category_name.
Contains(
"engine"))
791 {
793 {
794 return false;
795 }
796 }
797
798 return true;
799 }
800
802 {
803 if (!super.CanDisplayCargo())
804 {
805 return false;
806 }
807
809 {
810 return false;
811 }
812
813 return true;
814 }
815
817 {
819
820 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
821 if (!carDoor)
822 {
824 }
825
826 switch (slotType)
827 {
828 case "NivaDriverDoors":
830
831 case "NivaCoDriverDoors":
833
834 case "NivaHood":
836
837 case "NivaTrunk":
839 }
840
842 }
843
845 {
847 switch (posIdx)
848 {
849 case 0:
851 return false;
852 else if (GetAnimationPhase("SeatDriver") > 0.5)
853 return false;
854
855 return true;
856
857 case 1:
859 return false;
860 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
861 return false;
862
863 return true;
864
865 case 2:
867 return false;
868 else if (GetAnimationPhase("SeatDriver") <= 0.5)
869 return false;
870
871 return true;
872
873 case 3:
875 return false;
876 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
877 return false;
878
879 return true;
880 }
881
882 return false;
883 }
884
886 {
887 switch (posIdx)
888 {
889 case 0:
890 case 2:
891 return "doors_driver";
892 case 1:
893 case 3:
894 return "doors_codriver";
895 }
896
897 return super.GetDoorSelectionNameFromSeatPos(posIdx);
898 }
899
901 {
902 switch (posIdx)
903 {
904 case 0:
905 case 2:
906 return "NivaDriverDoors";
907 case 1:
908 case 3:
909 return "NivaCoDriverDoors";
910 }
911
912 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
913 }
914
915
916
918 {
919 float tempCap = 0.0;
920
921 switch (ctrl)
922 {
924 float newValue = 0;
926 {
927 newValue += 0.5;
928 }
929
931 {
932 newValue += 0.5;
933 }
934
936 {
937 newValue += 0.3;
938 }
939
941 {
942 newValue -= 0.6;
943 }
944
946 {
947 newValue -= 0.2;
948 }
949
951 {
952 newValue -= 0.2;
953 }
954
956 break;
957 }
958
959 return super.OnSound(ctrl, oldValue);
960 }
961
963 {
964 switch (selection)
965 {
966 case "doors_driver":
967 return "DoorsDriver";
968 case "doors_codriver":
969 return "DoorsCoDriver";
970 case "doors_hood":
971 return "DoorsHood";
972 case "doors_trunk":
973 return "DoorsTrunk";
974 case "seatback_driver":
975 return "SeatDriver";
976 case "seatback_codriver":
977 return "SeatCoDriver";
978 }
979
980 return "";
981 }
982
984 {
985 switch (selection)
986 {
987 case "seat_driver":
988 case "seatback_driver":
989 case "seat_cargo1":
990 return "seat_con_1_1";
991 case "seat_codriver":
992 case "seatback_codriver":
993 case "seat_cargo2":
994 return "seat_con_2_1";
995 }
996
997 return "";
998 }
999
1001 {
1002 switch (selection)
1003 {
1004 case "seatback_driver":
1005 return 0;
1006 case "seatback_codriver":
1007 return 1;
1008 }
1009
1010 return -1;
1011 }
1012
1014 {
1015 return false;
1016 }
1017
1019 {
1020 return false;
1021 }
1022
1024 {
1025 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
1026 return false;
1027
1028 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
1029 return false;
1030
1031 switch (currentSeat)
1032 {
1033 case 0:
1034 return nextSeat == 1;
1035
1036 case 1:
1037 return nextSeat == 0;
1038
1039 case 2:
1040 return nextSeat == 3;
1041
1042 case 3:
1043 return nextSeat == 2;
1044 }
1045
1046 return false;
1047 }
1048
1050 {
1051 switch (pCurrentSeat)
1052 {
1053 case 0:
1054 return pDoorsSelection == "DoorsDriver";
1055
1056 case 1:
1057 return pDoorsSelection == "DoorsCoDriver";
1058
1059 case 2:
1060 return pDoorsSelection == "DoorsDriver";
1061
1062 case 3:
1063 return pDoorsSelection == "DoorsCoDriver";
1064 }
1065
1066 return false;
1067 }
1068
1070 {
1071 switch (pDoorSelection)
1072 {
1073 case "DoorsDriver":
1074 return 0;
1075 case "DoorsCoDriver":
1076 return 1;
1077 }
1078
1079 return -1;
1080 }
1081
1083 {
1084 super.SetActions();
1085
1087 }
1088
1090 {
1094
1095 GetInventory().CreateInInventory("HatchbackWheel");
1096 GetInventory().CreateInInventory("HatchbackWheel");
1097 GetInventory().CreateInInventory("HatchbackWheel" );
1098 GetInventory().CreateInInventory("HatchbackWheel");
1099
1100 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1101 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1102 GetInventory().CreateInInventory("HatchbackHood");
1103 GetInventory().CreateInInventory("HatchbackTrunk");
1104
1105
1106 GetInventory().CreateInInventory("HatchbackWheel");
1107 GetInventory().CreateInInventory("HatchbackWheel");
1108 }
1109}
1110
1112{
1114 {
1118
1119 GetInventory().CreateInInventory("HatchbackWheel");
1120 GetInventory().CreateInInventory("HatchbackWheel");
1121 GetInventory().CreateInInventory("HatchbackWheel");
1122 GetInventory().CreateInInventory("HatchbackWheel");
1123
1124 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1125 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1126 GetInventory().CreateInInventory("HatchbackHood_White");
1127 GetInventory().CreateInInventory("HatchbackTrunk_White");
1128
1129
1130 GetInventory().CreateInInventory("HatchbackWheel");
1131 GetInventory().CreateInInventory("HatchbackWheel");
1132 }
1133}
1134
1136{
1138 {
1142
1143 GetInventory().CreateInInventory("HatchbackWheel");
1144 GetInventory().CreateInInventory("HatchbackWheel");
1145 GetInventory().CreateInInventory("HatchbackWheel");
1146 GetInventory().CreateInInventory("HatchbackWheel");
1147
1148 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1149 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1150 GetInventory().CreateInInventory("HatchbackHood_Blue");
1151 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1152
1153
1154 GetInventory().CreateInInventory("HatchbackWheel");
1155 GetInventory().CreateInInventory("HatchbackWheel");
1156 }
1157}
void AddAction(typename actionName)
CarSoundCtrl
Car's sound controller list. (native, do not change or extend)
void SpawnUniversalParts()
string m_CarSeatShiftInSound
CarDoorState TranslateAnimationPhaseToCarDoorState(string animation)
void SpawnAdditionalItems()
string m_EngineStartOK
Sounds.
string m_CarDoorCloseSound
string m_EngineStartBattery
string m_CarHornShortSoundName
string m_CarHornLongSoundName
string m_CarSeatShiftOutSound
string m_CarDoorOpenSound
ref UniversalTemperatureSourceLambdaEngine m_UTSLEngine
ref UniversalTemperatureSourceSettings m_UTSSettings
ref UniversalTemperatureSource m_UTSource
override void SetActions()
override bool CanReachSeatFromSeat(int currentSeat, int nextSeat)
override string GetAnimSourceFromSelection(string selection)
override int GetSeatAnimationType(int posIdx)
override string GetDoorConditionPointFromSelection(string selection)
override float OnSound(CarSoundCtrl ctrl, float oldValue)
override string GetDoorInvSlotNameFromSeatPos(int posIdx)
override void EOnPostSimulate(IEntity other, float timeSlice)
override void OnEngineStop()
override float GetTransportCameraDistance()
override bool CanReleaseAttachment(EntityAI attachment)
override bool CanDisplayCargo()
override void OnEngineStart()
override CarLightBase CreateFrontLight()
override int GetAnimInstance()
override bool CrewCanGetThrough(int posIdx)
override bool CanReachDoorsFromSeat(string pDoorsSelection, int pCurrentSeat)
bool CanManipulateSpareWheel(string slotSelectionName)
override bool IsVitalGlowPlug()
override CarRearLightBase CreateRearLight()
class OffroadHatchback extends CarScript OnDebugSpawn()
override int GetSeatIndexFromDoor(string pDoorSelection)
override bool IsVitalTruckBattery()
override string GetDoorSelectionNameFromSeatPos(int posIdx)
override int GetCarDoorsState(string slotType)
override int GetCrewIndex(string selection)
override bool CanDisplayAttachmentCategory(string category_name)
UniversalTemperatureSourceLambdaBaseImpl UniversalTemperatureSourceLambdaBase UniversalTemperatureSourceLambdaEngine()
Super root of all classes in Enforce script.
override void OnDebugSpawn()
original Timer deletes m_params which is unwanted
DayZPlayerConstants
defined in C++
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static const float ITEM_TEMPERATURE_NEUTRAL_ZONE_MIDDLE
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'.
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.