Advertisement
Guest User

compiles.sqf

a guest
Jul 31st, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 23.59 KB | None | 0 0
  1. /* 
  2.     FUNCTION COMPILES
  3. */
  4. //Player only
  5. if (!isDedicated) then {
  6.     _config =   configFile >> "CfgLoot";
  7.     _config1 =  configFile >> "CfgMagazines" >> "FoodEdible";
  8.     _config2 =  configFile >> "CfgWeapons" >> "Loot";
  9.  
  10.     "filmic" setToneMappingParams [0.07, 0.31, 0.23, 0.37, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
  11.  
  12.     BIS_Effects_Burn =          compile preprocessFile "\ca\Data\ParticleEffects\SCRIPTS\destruction\burn.sqf";
  13.     player_zombieCheck =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"; //Run on a players computer, checks if the player is near a zombie
  14.     player_zombieAttack =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieAttack.sqf";    //Run on a players computer, causes a nearby zombie to attack them
  15.     fnc_usec_damageActions =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageActions.sqf";       //Checks which actions for nearby casualty
  16.     fnc_inAngleSector =         compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_inAngleSector.sqf";       //Checks which actions for nearby casualty
  17.     fnc_usec_selfActions =      compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\fn_selfActions.sqf";       //Checks which actions for self
  18.     fnc_usec_unconscious =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
  19.     player_temp_calculation =   compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\fn_temperatur.sqf";        //Temperatur System //TeeChange
  20.     player_weaponFiredNear =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponFiredNear.sqf";
  21.     player_animalCheck =        compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\player_animalCheck.sqf";
  22.     player_spawnCheck =         compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\player_spawnCheck.sqf";
  23.     player_spawnLootCheck =     compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnlootCheck.sqf";
  24.     player_spawnZedCheck =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnzedCheck.sqf";
  25.     building_spawnLoot =        compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\building_spawnLoot.sqf";
  26.     player_taskHint =           compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_taskHint.sqf";
  27.     building_spawnZombies =     compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\building_spawnZombies.sqf";
  28.     //animal_monitor =          compile preprocessFileLineNumbers "\z\addons\dayz_code\system\animal_monitor.sqf";
  29.     building_monitor =          compile preprocessFileLineNumbers "\z\addons\dayz_code\system\building_monitor.sqf";
  30.     player_fired =              compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf";           //Runs when player fires. Alerts nearby Zeds depending on calibre and audial rating
  31.     player_packTent =           compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf";
  32.     control_zombieAgent =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\control_zombieAgent.sqf";
  33.     player_updateGui =          compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";
  34.     player_crossbowBolt =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_crossbowBolt.sqf";
  35.     spawn_flies =               compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_flies.sqf";
  36.     stream_locationFill =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationFill.sqf";
  37.     stream_locationDel =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationDel.sqf";
  38.     stream_locationCheck =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationCheck.sqf";
  39.     player_music =              compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\player_music.sqf";         //Used to generate ambient music
  40.     player_login =              compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_login.sqf";           //Used to generate ambient music
  41.     player_death =              compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf";
  42.     player_switchModel =        compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\player_switchModel.sqf";
  43.     player_checkStealth =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_checkStealth.sqf";
  44.     world_sunRise =             compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_sunRise.sqf";
  45.     world_surfaceNoise =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_surfaceNoise.sqf";
  46.     player_humanityMorph =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityMorph.sqf";
  47.     player_throwObject =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_throwObject.sqf";
  48.     player_alertZombies =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_alertZombies.sqf";
  49.     player_fireMonitor =        compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
  50.  
  51.     //Objects
  52.     object_roadFlare =          compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_roadFlare.sqf";
  53.     object_setpitchbank =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_setpitchbank.sqf";
  54.    
  55.     //Zombies
  56.     zombie_findTargetAgent =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_findTargetAgent.sqf";
  57.     zombie_loiter =             compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\zombie_loiter.sqf";            //Server compile, used for loiter behaviour
  58.     zombie_generate =           compile preprocessFileLineNumbers "\nst\ns_dayz\code\compile\zombie_generate.sqf";          //Server compile, used for loiter behaviour
  59.    
  60.    
  61.     //
  62.     dog_findTargetAgent =   compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dog_findTargetAgent.sqf";
  63.    
  64.     // Vehicle damage fix
  65.     vehicle_handleDamage    = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleDamage.sqf";
  66.     vehicle_handleKilled    = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleKilled.sqf";
  67.    
  68.     //actions
  69.     player_countmagazines = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_countmagazines.sqf";
  70.     player_addToolbelt =        compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_addToolbelt.sqf";
  71.     player_reloadMag =          compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_reloadMags.sqf";
  72.     player_tentPitch =          compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\tent_pitch.sqf";
  73.     player_drink =              compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_drink.sqf";
  74.     player_eat =                compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_eat.sqf";
  75.     player_useMeds =            compile preprocessFileLineNumbers "\nst\ns_dayz\code\actions\player_useMeds.sqf";
  76.     player_fillWater =          compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\water_fill.sqf";
  77.     player_makeFire =           compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_makefire.sqf";
  78.     player_chopWood =           compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_chopWood.sqf";
  79.     player_build =              compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build.sqf";
  80.     player_wearClothes =        compile preprocessFileLineNumbers "\nst\ns_dayz\code\actions\player_wearClothes.sqf";
  81.     player_dropWeapon =         compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_dropWeapon.sqf";
  82.     player_setTrap =            compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_setTrap.sqf";
  83.     object_pickup =             compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_pickup.sqf";
  84.     player_flipvehicle =        compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_flipvehicle.sqf";
  85.     player_sleep =              compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf";
  86.     player_repairEquipment_dzn = compile preprocessFileLineNumbers "\nst\ns_dayz\code\actions\player_repairEquipment_dzn.sqf";
  87.    
  88.     //ui
  89.     player_selectSlot =         compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
  90.     player_gearSync =           compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSync.sqf";
  91.     player_gearSet  =           compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSet.sqf";
  92.     ui_changeDisplay =          compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_changeDisplay.sqf";
  93.    
  94.     //System
  95.     player_monitor =            compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_monitor.sqf";
  96.     player_spawn_1 =            compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_1.sqf";
  97.     player_spawn_2 =            compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_2.sqf";
  98.     onPreloadStarted            "dayz_preloadFinished = false;";
  99.     onPreloadFinished           "dayz_preloadFinished = true;";
  100.    
  101.     // TODO: need move it in player_monitor.fsm
  102.     // allow player disconnect from server, if loading hang, kicked by BE etc.
  103.     [] spawn {
  104.         private["_timeOut","_display","_control1","_control2"];
  105.         disableSerialization;
  106.         _timeOut = 0;
  107.         dayz_loadScreenMsg = "";
  108.         diag_log "DEBUG: loadscreen guard started.";
  109.         _display = uiNameSpace getVariable "BIS_loadingScreen";
  110.         _control1 = _display displayctrl 8400;
  111.         _control2 = _display displayctrl 102;
  112.     // 40 sec timeout
  113.         while { _timeOut < 400 && !dayz_clientPreload } do {
  114.             if ( isNull _display ) then {
  115.                 waitUntil { !dialog; };
  116.                 startLoadingScreen ["","RscDisplayLoadCustom"];
  117.                 _display = uiNameSpace getVariable "BIS_loadingScreen";
  118.                 _control1 = _display displayctrl 8400;
  119.                 _control2 = _display displayctrl 102;
  120.             };
  121.             if ( dayz_loadScreenMsg != "" ) then {
  122.                 _control1 ctrlSetText dayz_loadScreenMsg;
  123.                 dayz_loadScreenMsg = "";
  124.             };
  125.             _control2 ctrlSetText format["%1",round(_timeOut*0.1)];
  126.             _timeOut = _timeOut + 1;
  127.             sleep 0.1;
  128.         };
  129.  
  130.         endLoadingScreen;
  131.         if ( !dayz_clientPreload ) then {
  132.  
  133.             diag_log "DEBUG: loadscreen guard ended with timeout.";
  134.             disableUserInput false;
  135.             1 cutText ["Something went wrong! disconnect and try again!", "PLAIN"];
  136.             player enableSimulation false;
  137.         } else { diag_log "DEBUG: loadscreen guard ended."; };
  138.     };
  139.     dayz_losChance = {
  140.         private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
  141.         _agent =    _this select 0;
  142.         _dis =      _this select 1;
  143.         _maxDis =   _this select 2;
  144.         //diag_log ("VAL:  " + str(_this));
  145.         _val =      (_maxDis - _dis) max 0;
  146.         _maxExp =   ((exp 2) * _maxDis);
  147.         _myExp =    ((exp 2) * (_val)) / _maxExp;
  148.         _myExp = _myExp * 0.7;
  149.         _myExp
  150.     };
  151.    
  152.     ui_initDisplay = {
  153.         private["_control","_ctrlBleed","_display","_ctrlFracture","_ctrlDogFood","_ctrlDogWater","_ctrlDogWaterBorder", "_ctrlDogFoodBorder"];
  154.         disableSerialization;
  155.         _display = uiNamespace getVariable 'DAYZ_GUI_display';
  156.         _control =  _display displayCtrl 1204;
  157.         _control ctrlShow false;
  158.         if (!r_player_injured) then {
  159.             _ctrlBleed =    _display displayCtrl 1303;
  160.             _ctrlBleed ctrlShow false;
  161.         };
  162.         if (!r_fracture_legs and !r_fracture_arms) then {
  163.             _ctrlFracture =     _display displayCtrl 1203;
  164.             _ctrlFracture ctrlShow false;
  165.         };
  166.         _ctrlDogFoodBorder = _display displayCtrl 1501;
  167.         _ctrlDogFoodBorder ctrlShow false;
  168.         _ctrlDogFood = _display displayCtrl 1701;
  169.         _ctrlDogFood ctrlShow false;
  170.        
  171.         _ctrlDogWaterBorder = _display displayCtrl 1502;
  172.         _ctrlDogWaterBorder ctrlShow false;
  173.         _ctrlDogWater = _display displayCtrl 1702;
  174.         _ctrlDogWater ctrlShow false
  175.     };
  176.    
  177.     dayz_losCheck = {
  178.         private["_target","_agent","_cantSee"];
  179.         _target = _this select 0;
  180.         _agent = _this select 1;
  181.         _cantSee = true;
  182.         if (!isNull _target) then {
  183.             _tPos = eyePos _target; //(getPosASL _target);
  184.             _zPos = eyePos _agent;  //(getPosASL _agent);
  185.             if ((count _tPos > 0) and (count _zPos > 0)) then {
  186.                 _cantSee = terrainIntersectASL [_tPos, _zPos];
  187.                 //diag_log ("terrainIntersectASL: " + str(_cantSee));
  188.                 if (!_cantSee) then {
  189.                     _cantSee = lineIntersects [_tPos, _zPos];
  190.                     //diag_log ("lineIntersects: " + str(_cantSee));
  191.                 };
  192.             };
  193.         };
  194.         _cantSee
  195.     };
  196.    
  197.     eh_zombieInit =     {
  198.         private["_unit","_pos"];
  199.         //_unit =   _this select 0;
  200.         //_pos =        getPosATL _unit;
  201.         //_id = [_pos,_unit] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";
  202.     };
  203.    
  204.     dayz_equipCheck = {
  205.         private ["_empty", "_needed","_diff","_success"];
  206.         _config = _this;
  207.         _empty = [player] call BIS_fnc_invSlotsEmpty;
  208.         _needed = [_config] call BIS_fnc_invSlotType;
  209.         _diff = [_empty,_needed] call BIS_fnc_vectorDiff;
  210.        
  211.         _success = true;
  212.         {
  213.             if (_x > 0) then {_success = false};
  214.         } forEach _diff;
  215.         hint format["Config: %5\nEmpty: %1\nNeeded: %2\nDiff: %3\nSuccess: %4",_empty,_needed,_diff,_success,_config];
  216.         _success
  217.     };
  218.    
  219.     dayz_spaceInterrupt = {
  220.         private ["_dikCode", "_handled"];
  221.         _dikCode =  _this select 1;
  222.         _handled = false;
  223.         if (_dikCode in (actionKeys "GetOver")) then {
  224.             DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",500]) > 1);
  225.             if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
  226.                 canRoll = false;
  227.                 null = [] spawn {
  228.                     if (DoRE) then {
  229.                         [nil, player, rSWITCHMOVE, "ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
  230.                     } else {
  231.                         player switchMove "ActsPercMrunSlowWrflDf_FlipFlopPara";
  232.                     };
  233.                     sleep 0.3;
  234.                     player setVelocity [(velocity player select 0) + 1.5 * sin direction player, (velocity player select 1) + 1.5 * cos direction player, (velocity player select 2) + 4];
  235.                     sleep 1;
  236.                     canRoll = true;
  237.                 };
  238.                 _handled = true;
  239.             };
  240.         };
  241.         //if (_dikCode == 57) then {_handled = true}; // space
  242.         //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
  243.         if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
  244.         if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
  245.         if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
  246.         if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
  247.         if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
  248.         if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
  249.             dayz_lastCheckBit = time;
  250.             [player,50,true,(getPosATL player)] spawn player_alertZombies;
  251.         };
  252.         if (_dikCode in actionKeys "VoiceOverNet" and (time - dayz_lastCheckBit > 10)) then {
  253.             dayz_lastCheckBit = time;
  254.             [player,50,true,(getPosATL player)] spawn player_alertZombies;
  255.         };
  256.         if (_dikCode in actionKeys "PushToTalkDirect" and (time - dayz_lastCheckBit > 10)) then {
  257.             dayz_lastCheckBit = time;
  258.             [player,15,false,(getPosATL player)] spawn player_alertZombies;
  259.         };
  260.         if (_dikCode in actionKeys "Chat" and (time - dayz_lastCheckBit > 10)) then {
  261.             dayz_lastCheckBit = time;
  262.             [player,15,false,(getPosATL player)] spawn player_alertZombies;
  263.         };
  264.         if ((_dikCode == 0x38 or _dikCode == 0xB8) and (time - dayz_lastCheckBit > 10)) then {
  265.             dayz_lastCheckBit = time;
  266.             call dayz_forceSave;
  267.         };
  268.         /*
  269.         if (_dikCode in actionKeys "IngamePause") then {
  270.             _idOnPause = [] spawn dayz_onPause;
  271.         };
  272.         */
  273.         _handled
  274.     };
  275.    
  276.     player_serverModelChange = {
  277.         private["_object","_model"];
  278.         _object = _this select 0;
  279.         _model = _this select 1;
  280.         if (_object == player) then {
  281.             _model call player_switchModel;
  282.         };
  283.     };
  284.    
  285.     player_guiControlFlash =    {
  286.         private["_control"];
  287.         _control = _this;
  288.         if (ctrlShown _control) then {
  289.             _control ctrlShow false;
  290.         } else {
  291.             _control ctrlShow true;
  292.         };
  293.     };
  294.    
  295.     gear_ui_offMenu = {
  296.         private["_control","_parent","_menu"];
  297.         disableSerialization;
  298.         _control =  _this select 0;
  299.         _parent =   findDisplay 106;
  300.         if (!(_this select 3)) then {
  301.             for "_i" from 0 to 9 do {
  302.                 _menu = _parent displayCtrl (1600 + _i);
  303.                 _menu ctrlShow false;
  304.             };
  305.             _grpPos = ctrlPosition _control;
  306.             _grpPos set [3,0];
  307.             _control ctrlSetPosition _grpPos;
  308.             _control ctrlShow false;
  309.             _control ctrlCommit 0;
  310.         };
  311.     };
  312.  
  313.     gear_ui_init = {
  314.         private["_control","_parent","_menu","_dspl","_grpPos"];
  315.         disableSerialization;
  316.         _parent = findDisplay 106;
  317.         _control =  _parent displayCtrl 6902;
  318.         for "_i" from 0 to 9 do {
  319.             _menu = _parent displayCtrl (1600 + _i);
  320.             _menu ctrlShow false;
  321.         };
  322.         _grpPos = ctrlPosition _control;
  323.         _grpPos set [3,0];
  324.         _control ctrlSetPosition _grpPos;
  325.         _control ctrlShow false;
  326.         _control ctrlCommit 0;
  327.     };
  328.    
  329.     dayz_eyeDir = {
  330.         private["_vval","_vdir"];
  331.         _vval = (eyeDirection _this);
  332.         _vdir = (_vval select 0) atan2 (_vval select 1);
  333.         if (_vdir < 0) then {_vdir = 360 + _vdir};
  334.         _vdir
  335.     };
  336.    
  337.     dayz_lowHumanity = {
  338.         private["_unit","_humanity","_delay"];
  339.         _unit = _this;
  340.         if ((_unit distance player) < 15) then {
  341.             _humanity = _unit getVariable["humanity",0];
  342.             dayz_heartBeat = true;
  343.             if (_humanity < -3000) then {
  344.                 _delay = ((10000 + _humanity) / 5500) + 0.3;
  345.                 playSound "heartbeat_1";
  346.                 sleep _delay;
  347.             };
  348.             dayz_heartBeat = false;
  349.         };
  350.     };
  351.     /*
  352.     dayz_meleeMagazineCheck = {
  353.         private["_meleeNum","_magType","_wpnType"];
  354.         _wpnType = _this;
  355.         _magType =  ([] + getArray (configFile >> "CfgWeapons" >> _wpnType >> "magazines")) select 0;
  356.         _meleeNum = ({_x == _magType} count magazines player);
  357.         if (_meleeNum > 1) then {
  358.             if (player hasWeapon _wpnType) then {
  359.                 _meleeNum = _meleeNum - 1;
  360.             };
  361.             for "_i" from 1 to _meleeNum do {
  362.                 player removeMagazine _magType;
  363.             };
  364.         };
  365.     };
  366.     */
  367.     dayz_originalPlayer =       player;
  368. };
  369.     progressLoadingScreen 0.8;
  370.     //Both
  371.     BIS_fnc_selectRandom =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selectRandom.sqf";        //Checks which actions for nearby casualty
  372.     fnc_buildWeightedArray =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf";      //Checks which actions for nearby casualty
  373.     fnc_usec_damageVehicle =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerVehicle.sqf";        //Event handler run on damage
  374.     zombie_initialize =         compile preprocessFileLineNumbers "\z\addons\dayz_code\init\zombie_init.sqf";
  375.     object_vehicleKilled =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_vehicleKilled.sqf";       //Event handler run on damage
  376.     object_setHitServer =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHitServer.sqf";    //process the hit as a NORMAL damage (useful for persistent vehicles)
  377.     object_setFixServer =       compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setFixServer.sqf";    //process the hit as a NORMAL damage (useful for persistent vehicles)
  378.     object_getHit =             compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_getHit.sqf";          //gets the hit value for a HitPoint (i.e. HitLegs) against the selection (i.e. "legs"), returns the value
  379.     object_setHit =             compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHit.sqf";          //process the hit as a NORMAL damage (useful for persistent vehicles)
  380.     object_processHit =         compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_processHit.sqf";      //process the hit in the REVO damage system (records and sets hit)
  381.     object_delLocal =           compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_delLocal.sqf";
  382.     object_cargoCheck =         compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_cargoCheck.sqf";      //Run by the player or server to monitor changes in cargo contents
  383.     fnc_usec_damageHandler =    compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";       //Event handler run on damage
  384.     // Vehicle damage fix
  385.     vehicle_handleDamage    = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleDamage.sqf";
  386.     vehicle_handleKilled    = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleKilled.sqf";
  387.     fnc_vehicleEventHandler =   compile preprocessFileLineNumbers "\z\addons\dayz_code\init\vehicle_init.sqf";          //Initialize vehicle
  388.     fnc_inString =              compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_inString.sqf";   
  389.     fnc_isInsideBuilding =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf";    //_isInside = [_unit,_building] call fnc_isInsideBuilding;
  390.     dayz_zombieSpeak =          compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf";           //Used to generate random speech for a unit
  391.     vehicle_getHitpoints =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf";
  392.     local_gutObject =           compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObject.sqf";        //Generated on the server (or local to unit) when gutting an object
  393.     local_zombieDamage =        compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerZ.sqf";      //Generated by the client who created a zombie to track damage
  394.     local_setFuel =             compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_setFuel.sqf";          //Generated when someone refuels a vehicle
  395.     local_eventKill =           compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_eventKill.sqf";        //Generated when something is killed
  396.     //player_weaponCheck =      compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponCheck.sqf"; //Run by the player or server to monitor whether they have picked up a new weapon
  397.     curTimeStr =                compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_curTimeStr.sqf";
  398.     player_medBandage =         compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
  399.     player_medInject =          compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medInject.sqf";
  400.     player_medEpi =             compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medEpi.sqf";
  401.     player_medTransfuse =       compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medTransfuse.sqf";
  402.     player_medMorphine =        compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
  403.     player_medPainkiller =      compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
  404.     world_isDay =               {if ((daytime < (24 - dayz_sunRise)) and (daytime > dayz_sunRise)) then {true} else {false}};
  405.     player_humanityChange =     compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityChange.sqf";
  406.     spawn_loot =                compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot.sqf";
  407.     player_projectileNear =         compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
  408.    
  409.     player_sumMedical = {
  410.         private["_character","_wounds","_legs","_arms","_medical"];
  411.         _character =    _this;
  412.         _wounds =       [];
  413.         if (_character getVariable["USEC_injured",false]) then {
  414.             {
  415.                 if (_character getVariable[_x,false]) then {
  416.                     _wounds set [count _wounds,_x];
  417.                 };
  418.             } forEach USEC_typeOfWounds;
  419.         };
  420.         _legs = _character getVariable ["hit_legs",0];
  421.         _arms = _character getVariable ["hit_arms",0];
  422.         _medical = [
  423.             _character getVariable["USEC_isDead",false],
  424.             _character getVariable["NORRN_unconscious", false],
  425.             _character getVariable["USEC_infected",false],
  426.             _character getVariable["USEC_injured",false],
  427.             _character getVariable["USEC_inPain",false],
  428.             _character getVariable["USEC_isCardiac",false],
  429.             _character getVariable["USEC_lowBlood",false],
  430.             _character getVariable["USEC_BloodQty",12000],
  431.             _wounds,
  432.             [_legs,_arms],
  433.             _character getVariable["unconsciousTime",0],
  434.             _character getVariable["messing",[0,0]]
  435.         ];
  436.         _medical
  437.     };
  438.    
  439.     //Server Only
  440.     if (isServer) then {
  441.         call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\server_functions.sqf";
  442.     } else {
  443.         eh_localCleanup = {};
  444.     };
  445.    
  446.     //Start Dynamic Weather
  447.     execVM "\nst\ns_dayz\code\external\DynamicWeatherEffects.sqf";      // DayZ: Namalsk
  448.     //execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";  // classic DayZ
  449.     initialized = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement