552{
556
558 {
559
560
566
571
574
575 SetEnginePos("0 0.7 1.2");
576 }
577
579 {
580 super.EEInit();
581
583 {
590
593 }
594 }
595
597 {
598 super.OnEngineStart();
599
601 {
603 }
604 }
605
607 {
608 super.OnEngineStop();
609
611 {
613 }
614 }
615
617 {
619 {
621 {
623 }
624 }
625 }
626
628 {
630 }
631
633 {
634 return 3.5;
635 }
636
638 {
639 switch (posIdx)
640 {
641 case 0:
643 case 1:
645 case 2:
647 case 3:
649 }
650
651 return 0;
652
653 }
654
655
657 {
659 }
660
662 {
664 }
665
667 {
668 if (!super.CanReleaseAttachment(attachment))
669 {
670 return false;
671 }
672
674 {
675 string attType = attachment.GetType();
676 if (attType == "CarRadiator" || attType == "CarBattery" || attType == "SparkPlug")
677 {
678 return false;
679 }
680 }
681
682 return true;
683 }
684
686 {
688 }
689
691 {
692 if (!super.CanDisplayAttachmentCategory(category_name))
693 {
694 return false;
695 }
696
698 if (category_name.
Contains(
"engine"))
699 {
701 {
702 return false;
703 }
704 }
705
706 return true;
707 }
708
710 {
711 if (!super.CanDisplayCargo())
712 {
713 return false;
714 }
715
717 {
718 return false;
719 }
720
721 return true;
722 }
723
725 {
727
728 Class.
CastTo(carDoor, FindAttachmentBySlotName(slotType));
729 if (!carDoor)
730 {
732 }
733
734 switch (slotType)
735 {
736 case "NivaDriverDoors":
738
739 case "NivaCoDriverDoors":
741
742 case "NivaHood":
744
745 case "NivaTrunk":
747 }
748
750 }
751
753 {
755 switch (posIdx)
756 {
757 case 0:
759 return false;
760 else if (GetAnimationPhase("SeatDriver") > 0.5)
761 return false;
762
763 return true;
764
765 case 1:
767 return false;
768 else if (GetAnimationPhase("SeatCoDriver") > 0.5)
769 return false;
770
771 return true;
772
773 case 2:
775 return false;
776 else if (GetAnimationPhase("SeatDriver") <= 0.5)
777 return false;
778
779 return true;
780
781 case 3:
783 return false;
784 else if (GetAnimationPhase("SeatCoDriver") <= 0.5)
785 return false;
786
787 return true;
788 }
789
790 return false;
791 }
792
794 {
795 switch (posIdx)
796 {
797 case 0:
798 case 2:
799 return "doors_driver";
800 case 1:
801 case 3:
802 return "doors_codriver";
803 }
804
805 return super.GetDoorSelectionNameFromSeatPos(posIdx);
806 }
807
809 {
810 switch (posIdx)
811 {
812 case 0:
813 case 2:
814 return "NivaDriverDoors";
815 case 1:
816 case 3:
817 return "NivaCoDriverDoors";
818 }
819
820 return super.GetDoorInvSlotNameFromSeatPos(posIdx);
821 }
822
823
824
826 {
827 float tempCap = 0.0;
828
829 switch (ctrl)
830 {
832 float newValue = 0;
834 {
835 newValue += 0.5;
836 }
837
839 {
840 newValue += 0.5;
841 }
842
844 {
845 newValue += 0.3;
846 }
847
849 {
850 newValue -= 0.6;
851 }
852
854 {
855 newValue -= 0.2;
856 }
857
859 {
860 newValue -= 0.2;
861 }
862
864 break;
865 }
866
867 return super.OnSound(ctrl, oldValue);
868 }
869
871 {
872 switch (selection)
873 {
874 case "doors_driver":
875 return "DoorsDriver";
876 case "doors_codriver":
877 return "DoorsCoDriver";
878 case "doors_hood":
879 return "DoorsHood";
880 case "doors_trunk":
881 return "DoorsTrunk";
882 case "seatback_driver":
883 return "SeatDriver";
884 case "seatback_codriver":
885 return "SeatCoDriver";
886 }
887
888 return "";
889 }
890
892 {
893 switch (selection)
894 {
895 case "seat_driver":
896 case "seatback_driver":
897 case "seat_cargo1":
898 return "seat_con_1_1";
899 case "seat_codriver":
900 case "seatback_codriver":
901 case "seat_cargo2":
902 return "seat_con_2_1";
903 }
904
905 return "";
906 }
907
909 {
910 switch (selection)
911 {
912 case "seatback_driver":
913 return 0;
914 case "seatback_codriver":
915 return 1;
916 }
917
918 return -1;
919 }
920
922 {
923 return false;
924 }
925
927 {
928 return false;
929 }
930
932 {
933 if (nextSeat == 0 && GetAnimationPhase("SeatDriver") > 0.5)
934 return false;
935
936 if (nextSeat == 1 && GetAnimationPhase("SeatCoDriver") > 0.5)
937 return false;
938
939 switch (currentSeat)
940 {
941 case 0:
942 return nextSeat == 1;
943
944 case 1:
945 return nextSeat == 0;
946
947 case 2:
948 return nextSeat == 3;
949
950 case 3:
951 return nextSeat == 2;
952 }
953
954 return false;
955 }
956
958 {
959 switch (pCurrentSeat)
960 {
961 case 0:
962 return pDoorsSelection == "DoorsDriver";
963
964 case 1:
965 return pDoorsSelection == "DoorsCoDriver";
966
967 case 2:
968 return pDoorsSelection == "DoorsDriver";
969
970 case 3:
971 return pDoorsSelection == "DoorsCoDriver";
972 }
973
974 return false;
975 }
976
978 {
979 switch (pDoorSelection)
980 {
981 case "DoorsDriver":
982 return 0;
983 case "DoorsCoDriver":
984 return 1;
985 }
986
987 return -1;
988 }
989
991 {
992 super.SetActions();
993
995 }
996
998 {
1002
1003 GetInventory().CreateInInventory("HatchbackWheel");
1004 GetInventory().CreateInInventory("HatchbackWheel");
1005 GetInventory().CreateInInventory("HatchbackWheel" );
1006 GetInventory().CreateInInventory("HatchbackWheel");
1007
1008 GetInventory().CreateInInventory("HatchbackDoors_Driver");
1009 GetInventory().CreateInInventory("HatchbackDoors_CoDriver");
1010 GetInventory().CreateInInventory("HatchbackHood");
1011 GetInventory().CreateInInventory("HatchbackTrunk");
1012
1013
1014 GetInventory().CreateInInventory("HatchbackWheel");
1015 GetInventory().CreateInInventory("HatchbackWheel");
1016 }
1017}
1018
1020{
1022 {
1026
1027 GetInventory().CreateInInventory("HatchbackWheel");
1028 GetInventory().CreateInInventory("HatchbackWheel");
1029 GetInventory().CreateInInventory("HatchbackWheel");
1030 GetInventory().CreateInInventory("HatchbackWheel");
1031
1032 GetInventory().CreateInInventory("HatchbackDoors_Driver_White");
1033 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_White");
1034 GetInventory().CreateInInventory("HatchbackHood_White");
1035 GetInventory().CreateInInventory("HatchbackTrunk_White");
1036
1037
1038 GetInventory().CreateInInventory("HatchbackWheel");
1039 GetInventory().CreateInInventory("HatchbackWheel");
1040 }
1041}
1042
1044{
1046 {
1050
1051 GetInventory().CreateInInventory("HatchbackWheel");
1052 GetInventory().CreateInInventory("HatchbackWheel");
1053 GetInventory().CreateInInventory("HatchbackWheel");
1054 GetInventory().CreateInInventory("HatchbackWheel");
1055
1056 GetInventory().CreateInInventory("HatchbackDoors_Driver_Blue");
1057 GetInventory().CreateInInventory("HatchbackDoors_CoDriver_Blue");
1058 GetInventory().CreateInInventory("HatchbackHood_Blue");
1059 GetInventory().CreateInInventory("HatchbackTrunk_Blue");
1060
1061
1062 GetInventory().CreateInInventory("HatchbackWheel");
1063 GetInventory().CreateInInventory("HatchbackWheel");
1064 }
1065}
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.