547{
551
553 {
554
555
561
566
569
570 SetEnginePos("0 0.7 1.2");
571 }
572
574 {
575 super.EEInit();
576
578 {
585
588 }
589 }
590
592 {
593 super.OnEngineStart();
594
596 {
598 }
599 }
600
602 {
603 super.OnEngineStop();
604
606 {
608 }
609 }
610
612 {
614 {
616 {
618 }
619 }
620 }
621
623 {
625 }
626
628 {
629 return 3.5;
630 }
631
633 {
634 switch (posIdx)
635 {
636 case 0:
638 case 1:
640 case 2:
642 case 3:
644 }
645
646 return 0;
647
648 }
649
650
652 {
654 }
655
657 {
659 }
660
662 {
663 if (!super.CanReleaseAttachment(attachment))
664 {
665 return false;
666 }
667
669 {
670 string attType = attachment.GetType();
671 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
672 {
673 return false;
674 }
675 }
676
677 return true;
678 }
679
681 {
683 }
684
686 {
687 if (!super.CanDisplayAttachmentCategory(category_name))
688 {
689 return false;
690 }
691
693 if (category_name.
Contains(
"engine"))
694 {
696 {
697 return false;
698 }
699 }
700
701 return true;
702 }
703
705 {
706 if (!super.CanDisplayCargo())
707 {
708 return false;
709 }
710
712 {
713 return false;
714 }
715
716 return true;
717 }
718
720 {
722
723 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
724 if (!carDoor)
725 {
727 }
728
729 switch (slotType)
730 {
731 case "NivaDriverDoors":
733
734 case "NivaCoDriverDoors":
736
737 case "NivaHood":
739
740 case "NivaTrunk":
742 }
743
745 }
746
748 {
750 switch (posIdx)
751 {
752 case 0:
754 return false;
755 else if (GetAnimationPhase("SeatDriver") > 0.5)
756 return false;
757
758 return true;
759
760 case 1:
762 return false;
763 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
764 return false;
765
766 return true;
767
768 case 2:
770 return false;
771 else if (GetAnimationPhase("SeatDriver") <= 0.5)
772 return false;
773
774 return true;
775
776 case 3:
778 return false;
779 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
780 return false;
781
782 return true;
783 }
784
785 return false;
786 }
787
789 {
790 switch (posIdx)
791 {
792 case 0:
793 case 2:
794 return "doors_driver";
795 case 1:
796 case 3:
797 return "doors_codriver";
798 }
799
800 return super.GetDoorSelectionNameFromSeatPos(posIdx);
801 }
802
804 {
805 switch (posIdx)
806 {
807 case 0:
808 case 2:
809 return "NivaDriverDoors";
810 case 1:
811 case 3:
812 return "NivaCoDriverDoors";
813 }
814
815 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
816 }
817
818
819
821 {
822 float tempCap = 0.0;
823
824 switch (ctrl)
825 {
827 float newValue = 0;
829 {
830 newValue += 0.5;
831 }
832
834 {
835 newValue += 0.5;
836 }
837
839 {
840 newValue += 0.3;
841 }
842
844 {
845 newValue -= 0.6;
846 }
847
849 {
850 newValue -= 0.2;
851 }
852
854 {
855 newValue -= 0.2;
856 }
857
859 break;
860 }
861
862 return super.OnSound(ctrl, oldValue);
863 }
864
866 {
867 switch (selection)
868 {
869 case "doors_driver":
870 return "DoorsDriver";
871 case "doors_codriver":
872 return "DoorsCoDriver";
873 case "doors_hood":
874 return "DoorsHood";
875 case "doors_trunk":
876 return "DoorsTrunk";
877 case "seatback_driver":
878 return "SeatDriver";
879 case "seatback_codriver":
880 return "SeatCoDriver";
881 }
882
883 return "";
884 }
885
887 {
888 switch (selection)
889 {
890 case "seat_driver":
891 case "seatback_driver":
892 case "seat_cargo1":
893 return "seat_con_1_1";
894 case "seat_codriver":
895 case "seatback_codriver":
896 case "seat_cargo2":
897 return "seat_con_2_1";
898 }
899
900 return "";
901 }
902
904 {
905 switch (selection)
906 {
907 case "seatback_driver":
908 return 0;
909 case "seatback_codriver":
910 return 1;
911 }
912
913 return -1;
914 }
915
917 {
918 return false;
919 }
920
922 {
923 return false;
924 }
925
927 {
928 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
929 return false;
930
931 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
932 return false;
933
934 switch (currentSeat)
935 {
936 case 0:
937 return nextSeat == 1;
938
939 case 1:
940 return nextSeat == 0;
941
942 case 2:
943 return nextSeat == 3;
944
945 case 3:
946 return nextSeat == 2;
947 }
948
949 return false;
950 }
951
953 {
954 switch (pCurrentSeat)
955 {
956 case 0:
957 return pDoorsSelection == "DoorsDriver";
958
959 case 1:
960 return pDoorsSelection == "DoorsCoDriver";
961
962 case 2:
963 return pDoorsSelection == "DoorsDriver";
964
965 case 3:
966 return pDoorsSelection == "DoorsCoDriver";
967 }
968
969 return false;
970 }
971
973 {
974 switch (pDoorSelection)
975 {
976 case "DoorsDriver":
977 return 0;
978 case "DoorsCoDriver":
979 return 1;
980 }
981
982 return -1;
983 }
984
986 {
987 super.SetActions();
988
990 }
991
993 {
997
998 GetInventory().CreateInInventory("HatchbackWheel");
999 GetInventory().CreateInInventory("HatchbackWheel");
1000 GetInventory().CreateInInventory("HatchbackWheel" );
1001 GetInventory().CreateInInventory("HatchbackWheel");
1002
1003 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1004 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1005 GetInventory().CreateInInventory("HatchbackHood");
1006 GetInventory().CreateInInventory("HatchbackTrunk");
1007
1008
1009 GetInventory().CreateInInventory("HatchbackWheel");
1010 GetInventory().CreateInInventory("HatchbackWheel");
1011 }
1012}
1013
1015{
1017 {
1021
1022 GetInventory().CreateInInventory("HatchbackWheel");
1023 GetInventory().CreateInInventory("HatchbackWheel");
1024 GetInventory().CreateInInventory("HatchbackWheel");
1025 GetInventory().CreateInInventory("HatchbackWheel");
1026
1027 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1028 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1029 GetInventory().CreateInInventory("HatchbackHood_White");
1030 GetInventory().CreateInInventory("HatchbackTrunk_White");
1031
1032
1033 GetInventory().CreateInInventory("HatchbackWheel");
1034 GetInventory().CreateInInventory("HatchbackWheel");
1035 }
1036}
1037
1039{
1041 {
1045
1046 GetInventory().CreateInInventory("HatchbackWheel");
1047 GetInventory().CreateInInventory("HatchbackWheel");
1048 GetInventory().CreateInInventory("HatchbackWheel");
1049 GetInventory().CreateInInventory("HatchbackWheel");
1050
1051 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1052 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1053 GetInventory().CreateInInventory("HatchbackHood_Blue");
1054 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1055
1056
1057 GetInventory().CreateInInventory("HatchbackWheel");
1058 GetInventory().CreateInInventory("HatchbackWheel");
1059 }
1060}
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.