Guest User

Untitled

a guest
Feb 7th, 2013
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.68 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 "\z\addons\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 "\z\addons\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 "\z\addons\dayz_code\compile\player_animalCheck.sqf";
  22. player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\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 "\z\addons\dayz_code\compile\building_spawnLoot.sqf";
  26. player_taskHint = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_taskHint.sqf";
  27. building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\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 "\z\addons\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 "\z\addons\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 "\z\addons\dayz_code\compile\zombie_loiter.sqf"; //Server compile, used for loiter behaviour
  58. zombie_generate = compile preprocessFileLineNumbers "\z\addons\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 "\z\addons\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 "\z\addons\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.  
  87. //ui
  88. player_selectSlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
  89. player_gearSync = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSync.sqf";
  90. player_gearSet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSet.sqf";
  91. ui_changeDisplay = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_changeDisplay.sqf";
  92.  
  93. //System
  94. player_monitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_monitor.sqf";
  95. player_spawn_1 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_1.sqf";
  96. player_spawn_2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_2.sqf";
  97. onPreloadStarted "dayz_preloadFinished = false;";
  98. onPreloadFinished "dayz_preloadFinished = true;";
  99.  
  100. // TODO: need move it in player_monitor.fsm
  101. // allow player disconnect from server, if loading hang, kicked by BE etc.
  102. [] spawn {
  103. private["_timeOut","_display","_control1","_control2"];
  104. disableSerialization;
  105. _timeOut = 0;
  106. dayz_loadScreenMsg = "";
  107. diag_log "DEBUG: loadscreen guard started.";
  108. _display = uiNameSpace getVariable "BIS_loadingScreen";
  109. _control1 = _display displayctrl 8400;
  110. _control2 = _display displayctrl 102;
  111. // 40 sec timeout
  112. while { _timeOut < 400 && !dayz_clientPreload } do {
  113. if ( isNull _display ) then {
  114. waitUntil { !dialog; };
  115. startLoadingScreen ["","RscDisplayLoadCustom"];
  116. _display = uiNameSpace getVariable "BIS_loadingScreen";
  117. _control1 = _display displayctrl 8400;
  118. _control2 = _display displayctrl 102;
  119. };
  120. if ( dayz_loadScreenMsg != "" ) then {
  121. _control1 ctrlSetText dayz_loadScreenMsg;
  122. dayz_loadScreenMsg = "";
  123. };
  124. _control2 ctrlSetText format["%1",round(_timeOut*0.1)];
  125. _timeOut = _timeOut + 1;
  126. sleep 0.1;
  127. };
  128. endLoadingScreen;
  129. if ( !dayz_clientPreload ) then {
  130.  
  131. diag_log "DEBUG: loadscreen guard ended with timeout.";
  132. disableUserInput false;
  133. 1 cutText ["Something went wrong! disconnect and try again!", "PLAIN"];
  134. player enableSimulation false;
  135. } else { diag_log "DEBUG: loadscreen guard ended."; };
  136. };
  137. dayz_losChance = {
  138. private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];
  139. _agent = _this select 0;
  140. _dis = _this select 1;
  141. _maxDis = _this select 2;
  142. //diag_log ("VAL: " + str(_this));
  143. _val = (_maxDis - _dis) max 0;
  144. _maxExp = ((exp 2) * _maxDis);
  145. _myExp = ((exp 2) * (_val)) / _maxExp;
  146. _myExp = _myExp * 0.7;
  147. _myExp
  148. };
  149.  
  150. ui_initDisplay = {
  151. private["_control","_ctrlBleed","_display","_ctrlFracture","_ctrlDogFood","_ctrlDogWater","_ctrlDogWaterBorder", "_ctrlDogFoodBorder"];
  152. disableSerialization;
  153. _display = uiNamespace getVariable 'DAYZ_GUI_display';
  154. _control = _display displayCtrl 1204;
  155. _control ctrlShow false;
  156. if (!r_player_injured) then {
  157. _ctrlBleed = _display displayCtrl 1303;
  158. _ctrlBleed ctrlShow false;
  159. };
  160. if (!r_fracture_legs and !r_fracture_arms) then {
  161. _ctrlFracture = _display displayCtrl 1203;
  162. _ctrlFracture ctrlShow false;
  163. };
  164. _ctrlDogFoodBorder = _display displayCtrl 1501;
  165. _ctrlDogFoodBorder ctrlShow false;
  166. _ctrlDogFood = _display displayCtrl 1701;
  167. _ctrlDogFood ctrlShow false;
  168.  
  169. _ctrlDogWaterBorder = _display displayCtrl 1502;
  170. _ctrlDogWaterBorder ctrlShow false;
  171. _ctrlDogWater = _display displayCtrl 1702;
  172. _ctrlDogWater ctrlShow false
  173. };
  174.  
  175. dayz_losCheck = {
  176. private["_target","_agent","_cantSee"];
  177. _target = _this select 0;
  178. _agent = _this select 1;
  179. _cantSee = true;
  180. if (!isNull _target) then {
  181. _tPos = eyePos _target; //(getPosASL _target);
  182. _zPos = eyePos _agent; //(getPosASL _agent);
  183. if ((count _tPos > 0) and (count _zPos > 0)) then {
  184. _cantSee = terrainIntersectASL [_tPos, _zPos];
  185. //diag_log ("terrainIntersectASL: " + str(_cantSee));
  186. if (!_cantSee) then {
  187. _cantSee = lineIntersects [_tPos, _zPos];
  188. //diag_log ("lineIntersects: " + str(_cantSee));
  189. };
  190. };
  191. };
  192. _cantSee
  193. };
  194.  
  195. eh_zombieInit = {
  196. private["_unit","_pos"];
  197. //_unit = _this select 0;
  198. //_pos = getPosATL _unit;
  199. //_id = [_pos,_unit] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";
  200. };
  201.  
  202. dayz_equipCheck = {
  203. private ["_empty", "_needed","_diff","_success"];
  204. _config = _this;
  205. _empty = [player] call BIS_fnc_invSlotsEmpty;
  206. _needed = [_config] call BIS_fnc_invSlotType;
  207. _diff = [_empty,_needed] call BIS_fnc_vectorDiff;
  208.  
  209. _success = true;
  210. {
  211. if (_x > 0) then {_success = false};
  212. } forEach _diff;
  213. hint format["Config: %5\nEmpty: %1\nNeeded: %2\nDiff: %3\nSuccess: %4",_empty,_needed,_diff,_success,_config];
  214. _success
  215. };
  216.  
  217. dayz_spaceInterrupt = {
  218. private ["_dikCode", "_handled"];
  219. _dikCode = _this select 1;
  220. _handled = false;
  221. if (_dikCode in (actionKeys "GetOver")) then {
  222. DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",500]) > 1);
  223. if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
  224. canRoll = false;
  225. null = [] spawn {
  226. if (DoRE) then {
  227. [nil, player, rSWITCHMOVE, "ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
  228. } else {
  229. player switchMove "ActsPercMrunSlowWrflDf_FlipFlopPara";
  230. };
  231. sleep 0.3;
  232. 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];
  233. sleep 1;
  234. canRoll = true;
  235. };
  236. _handled = true;
  237. };
  238. };
  239. //if (_dikCode == 57) then {_handled = true}; // space
  240. //if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
  241. if ("ItemMap_Debug" in items player) then {
  242. if (_dikCode == 88) then //SCROLL LOCK
  243. {
  244. _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
  245. };
  246. } else {
  247. if (_dikCode == 70) then //SCROLL LOCK
  248. {
  249. _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
  250. };
  251. };
  252. if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
  253. if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
  254. if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
  255. if (_dikCode in actionKeys "MoveBack") then {r_interrupt = true};
  256. if (_dikCode in actionKeys "ForceCommandingMode") then {_handled = true};
  257. if (_dikCode in actionKeys "PushToTalk" and (time - dayz_lastCheckBit > 10)) then {
  258. dayz_lastCheckBit = time;
  259. [player,50,true,(getPosATL player)] spawn player_alertZombies;
  260. };
  261. if (_dikCode in actionKeys "VoiceOverNet" and (time - dayz_lastCheckBit > 10)) then {
  262. dayz_lastCheckBit = time;
  263. [player,50,true,(getPosATL player)] spawn player_alertZombies;
  264. };
  265. if (_dikCode in actionKeys "PushToTalkDirect" and (time - dayz_lastCheckBit > 10)) then {
  266. dayz_lastCheckBit = time;
  267. [player,15,false,(getPosATL player)] spawn player_alertZombies;
  268. };
  269. if (_dikCode in actionKeys "Chat" and (time - dayz_lastCheckBit > 10)) then {
  270. dayz_lastCheckBit = time;
  271. [player,15,false,(getPosATL player)] spawn player_alertZombies;
  272. };
  273.  
  274.  
  275. if ((_dikCode == 0x38 or _dikCode == 0xB8) and (time - dayz_lastCheckBit > 10)) then {
  276. dayz_lastCheckBit = time;
  277. call dayz_forceSave;
  278. };
  279. /*
  280. if (_dikCode in actionKeys "IngamePause") then {
  281. _idOnPause = [] spawn dayz_onPause;
  282. };
  283. */
  284. _handled
  285. };
  286.  
  287. player_serverModelChange = {
  288. private["_object","_model"];
  289. _object = _this select 0;
  290. _model = _this select 1;
  291. if (_object == player) then {
  292. _model call player_switchModel;
  293. };
  294. };
  295.  
  296. player_guiControlFlash = {
  297. private["_control"];
  298. _control = _this;
  299. if (ctrlShown _control) then {
  300. _control ctrlShow false;
  301. } else {
  302. _control ctrlShow true;
  303. };
  304. };
  305.  
  306. gear_ui_offMenu = {
  307. private["_control","_parent","_menu"];
  308. disableSerialization;
  309. _control = _this select 0;
  310. _parent = findDisplay 106;
  311. if (!(_this select 3)) then {
  312. for "_i" from 0 to 9 do {
  313. _menu = _parent displayCtrl (1600 + _i);
  314. _menu ctrlShow false;
  315. };
  316. _grpPos = ctrlPosition _control;
  317. _grpPos set [3,0];
  318. _control ctrlSetPosition _grpPos;
  319. _control ctrlShow false;
  320. _control ctrlCommit 0;
  321. };
  322. };
  323.  
  324.  
  325. gear_ui_init = {
  326. private["_control","_parent","_menu","_dspl","_grpPos"];
  327. disableSerialization;
  328. _parent = findDisplay 106;
  329. _control = _parent displayCtrl 6902;
  330. for "_i" from 0 to 9 do {
  331. _menu = _parent displayCtrl (1600 + _i);
  332. _menu ctrlShow false;
  333. };
  334. _grpPos = ctrlPosition _control;
  335. _grpPos set [3,0];
  336. _control ctrlSetPosition _grpPos;
  337. _control ctrlShow false;
  338. _control ctrlCommit 0;
  339. };
  340.  
  341. dayz_eyeDir = {
  342. private["_vval","_vdir"];
  343. _vval = (eyeDirection _this);
  344. _vdir = (_vval select 0) atan2 (_vval select 1);
  345. if (_vdir < 0) then {_vdir = 360 + _vdir};
  346. _vdir
  347. };
  348.  
  349. dayz_lowHumanity = {
  350. private["_unit","_humanity","_delay"];
  351. _unit = _this;
  352. if ((_unit distance player) < 15) then {
  353. _humanity = _unit getVariable["humanity",0];
  354. dayz_heartBeat = true;
  355. if (_humanity < -3000) then {
  356. _delay = ((10000 + _humanity) / 5500) + 0.3;
  357. playSound "heartbeat_1";
  358. sleep _delay;
  359. };
  360. dayz_heartBeat = false;
  361. };
  362. };
  363. /*
  364. dayz_meleeMagazineCheck = {
  365. private["_meleeNum","_magType","_wpnType"];
  366. _wpnType = _this;
  367. _magType = ([] + getArray (configFile >> "CfgWeapons" >> _wpnType >> "magazines")) select 0;
  368. _meleeNum = ({_x == _magType} count magazines player);
  369. if (_meleeNum > 1) then {
  370. if (player hasWeapon _wpnType) then {
  371. _meleeNum = _meleeNum - 1;
  372. };
  373. for "_i" from 1 to _meleeNum do {
  374. player removeMagazine _magType;
  375. };
  376. };
  377. };
  378. */
  379. dayz_originalPlayer = player;
  380. };
  381.  
  382. progressLoadingScreen 0.8;
  383.  
  384. //Both
  385. BIS_fnc_selectRandom = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selectRandom.sqf"; //Checks which actions for nearby casualty
  386. fnc_buildWeightedArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf"; //Checks which actions for nearby casualty
  387. fnc_usec_damageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerVehicle.sqf"; //Event handler run on damage
  388. zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\init\zombie_init.sqf";
  389. object_vehicleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_vehicleKilled.sqf"; //Event handler run on damage
  390. object_setHitServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHitServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
  391. object_setFixServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setFixServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
  392. 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
  393. object_setHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHit.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
  394. object_processHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_processHit.sqf"; //process the hit in the REVO damage system (records and sets hit)
  395. object_delLocal = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_delLocal.sqf";
  396. object_cargoCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_cargoCheck.sqf"; //Run by the player or server to monitor changes in cargo contents
  397. fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; //Event handler run on damage
  398. // Vehicle damage fix
  399. vehicle_handleDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleDamage.sqf";
  400. vehicle_handleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleKilled.sqf";
  401. fnc_vehicleEventHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\init\vehicle_init.sqf"; //Initialize vehicle
  402. fnc_inString = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_inString.sqf";
  403. fnc_isInsideBuilding = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf"; //_isInside = [_unit,_building] call fnc_isInsideBuilding;
  404. dayz_zombieSpeak = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf"; //Used to generate random speech for a unit
  405. vehicle_getHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf";
  406. local_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObject.sqf"; //Generated on the server (or local to unit) when gutting an object
  407. local_zombieDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerZ.sqf"; //Generated by the client who created a zombie to track damage
  408. local_setFuel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_setFuel.sqf"; //Generated when someone refuels a vehicle
  409. local_eventKill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_eventKill.sqf"; //Generated when something is killed
  410. //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
  411. curTimeStr = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_curTimeStr.sqf";
  412. player_medBandage = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
  413. player_medInject = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medInject.sqf";
  414. player_medEpi = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medEpi.sqf";
  415. player_medTransfuse = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medTransfuse.sqf";
  416. player_medMorphine = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
  417. player_medPainkiller = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
  418. world_isDay = {if ((daytime < (24 - dayz_sunRise)) and (daytime > dayz_sunRise)) then {true} else {false}};
  419. player_humanityChange = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityChange.sqf";
  420. spawn_loot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot.sqf";
  421. player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
  422.  
  423. player_sumMedical = {
  424. private["_character","_wounds","_legs","_arms","_medical"];
  425. _character = _this;
  426. _wounds = [];
  427. if (_character getVariable["USEC_injured",false]) then {
  428. {
  429. if (_character getVariable[_x,false]) then {
  430. _wounds set [count _wounds,_x];
  431. };
  432. } forEach USEC_typeOfWounds;
  433. };
  434. _legs = _character getVariable ["hit_legs",0];
  435. _arms = _character getVariable ["hit_arms",0];
  436. _medical = [
  437. _character getVariable["USEC_isDead",false],
  438. _character getVariable["NORRN_unconscious", false],
  439. _character getVariable["USEC_infected",false],
  440. _character getVariable["USEC_injured",false],
  441. _character getVariable["USEC_inPain",false],
  442. _character getVariable["USEC_isCardiac",false],
  443. _character getVariable["USEC_lowBlood",false],
  444. _character getVariable["USEC_BloodQty",12000],
  445. _wounds,
  446. [_legs,_arms],
  447. _character getVariable["unconsciousTime",0],
  448. _character getVariable["messing",[0,0]]
  449. ];
  450. _medical
  451. };
  452.  
  453.  
  454. //Server Only
  455. if (isServer) then {
  456. call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\server_functions.sqf";
  457. } else {
  458. eh_localCleanup = {};
  459. };
  460.  
  461.  
  462. //Start Dynamic Weather
  463. execVM "DynamicWeatherEffects.sqf";
  464. initialized = true;
Advertisement
Add Comment
Please, Sign In to add comment