From ce1f43ef3f4c5e57fce487abb97a7e3fba5226b7 Mon Sep 17 00:00:00 2001 From: facoptere Date: Mon, 18 Nov 2013 17:28:38 +0100 Subject: [PATCH 1/7] Configs: antihack for logic and plants --- SQF/dayz_code/Configs/cfgVehicles.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SQF/dayz_code/Configs/cfgVehicles.hpp b/SQF/dayz_code/Configs/cfgVehicles.hpp index 7b98c8a72..fd0ec8431 100644 --- a/SQF/dayz_code/Configs/cfgVehicles.hpp +++ b/SQF/dayz_code/Configs/cfgVehicles.hpp @@ -9,6 +9,8 @@ class CfgVehicles { #include "CfgVehicles\Zeds\NewZeds.hpp" #include "CfgVehicles\Zeds\PlayerZeds.hpp" #include "CfgVehicles\Females\females.hpp" + #include "CfgVehicles\antihack_logic.hpp" + #include "CfgVehicles\antihack_plants.hpp" class All; From b5f148cece756c96047d998caf6f24ddbd6e8fec Mon Sep 17 00:00:00 2001 From: facoptere Date: Mon, 18 Nov 2013 17:43:11 +0100 Subject: [PATCH 2/7] Configs: antihack for logic and plants --- .../Configs/CfgVehicles/antihack_logic.hpp | 43 +++++++++ .../Configs/CfgVehicles/antihack_plants.hpp | 90 +++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 SQF/dayz_code/Configs/CfgVehicles/antihack_logic.hpp create mode 100644 SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp diff --git a/SQF/dayz_code/Configs/CfgVehicles/antihack_logic.hpp b/SQF/dayz_code/Configs/CfgVehicles/antihack_logic.hpp new file mode 100644 index 000000000..f493a68a5 --- /dev/null +++ b/SQF/dayz_code/Configs/CfgVehicles/antihack_logic.hpp @@ -0,0 +1,43 @@ + + //Prevent SVI hack using BattleFieldClearance & al. + class Logic; + class BattleFieldClearance: Logic + { + vehicleClass = "Modules"; + class Eventhandlers + { + init = "if (isServer) then { diag_log(""WARNING, b4ttlefieldclearance attack from player PID#""+str(owner this)); deleteVehicle this;};"; + }; + }; + class HighCommandSubordinate: Logic + { + vehicleClass = "Modules"; + class Eventhandlers + { + init = "if (isServer) then { diag_log(""WARNING, HighCommand5ubordinate attack from player PID#""+str(owner this)); deleteVehicle this;};"; + }; + }; + class FirstAidSystem: Logic + { + vehicleClass = "Modules"; + class Eventhandlers + { + init = "if (isServer) then { diag_log(""WARNING, First4idSystem attack from player PID#""+str(owner this)); deleteVehicle this;};"; + }; + }; + class AlternativeInjurySimulation: Logic + { + vehicleClass = "Modules"; + class Eventhandlers + { + init = "if (isServer) then { diag_log(""WARNING, 4lternativeInjurySimulation attack from player PID#""+str(owner this)); deleteVehicle this;};"; + }; + }; + class FunctionsManager : Logic { + vehicleClass = "Modules"; + class Eventhandlers + { + init = "diag_log format ['PRELOAD_ Functions\init %1', [_this, BIS_functions_mainscope]];if (isnil 'BIS_functions_mainscope') then { BIS_functions_mainscope = _this select 0; if (isServer) then {_this execVM 'ca\modules\functions\main.sqf'};} else {_this spawn { diag_log format ['PRELOAD_ Functions\init ERROR: deleting redundant FM! %1', [_this, (_this select 0), BIS_functions_mainscope]]; _mygrp = group (_this select 0); deleteVehicle (_this select 0); deleteGroup _mygrp;};};if (isnil 'RE') then {diag_log 'MPframework inited';[] execVM '\ca\Modules\MP\data\scripts\MPframework.sqf'};"; + }; + }; + diff --git a/SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp b/SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp new file mode 100644 index 000000000..b8602dd32 --- /dev/null +++ b/SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp @@ -0,0 +1,90 @@ + + // check that plants libs are properly loaded + // thanks to Tansien + class faplants : House {}; + class grass: faplants + { + model = "\ca\data\cl_grass1.p3d"; + displayName = "grass"; + vehicleClass = "grass"; + class AnimationSources {}; + }; + + class prunus: faplants + { + model = "\ca\plants2\bush\b_prunus.p3d"; + displayName = "prunus"; + vehicleClass = "prunus"; + class AnimationSources {}; + }; + + class picea: faplants + { + model = "\ca\plants2\clutter\c_picea.p3d"; + displayName = "picea"; + vehicleClass = "picea"; + class AnimationSources {}; + }; + + class fallentree: faplants + { + model = "\ca\plants2\misc\misc_fallentree1.p3d"; + displayName = "fallentree"; + vehicleClass = "fallentree"; + class AnimationSources {}; + }; + + class phragmites: faplants + { + model = "\ca\plants2\plant\p_phragmites.p3d"; + displayName = "phragmites"; + vehicleClass = "phragmites"; + class AnimationSources {}; + }; + + class acer: faplants + { + model = "\ca\plants2\tree\t_acer2s.p3d"; + displayName = "acer"; + vehicleClass = "acer"; + class AnimationSources {}; + }; + + class amygdalusn: faplants + { + model = "\ca\plants_e\bush\b_amygdalusn1s_ep1.p3d"; + displayName = "amygdalusn"; + vehicleClass = "amygdalusn"; + class AnimationSources {}; + }; + + class Brush: faplants + { + model = "\ca\plants_E\Clutter\c_Brush_Hard_EP1.p3d"; + displayName = "Brush"; + vehicleClass = "Brush"; + class AnimationSources {}; + }; + + class fiberplant: faplants + { + model = "\ca\plants_e\plant\p_fiberplant_ep1.p3d"; + displayName = "fiberplant"; + vehicleClass = "fiberplant"; + class AnimationSources {}; + }; + + class amygdalusc: faplants + { + model = "\ca\plants_e\tree\t_amygdalusc2s_ep1.p3d"; + displayName = "amygdalusc"; + vehicleClass = "amygdalusc"; + class AnimationSources {}; + }; + class boulder: faplants + { + model = "\ca\rocks2\R2_Boulder1.p3d"; + displayName = "boulder"; + vehicleClass = "boulder"; + class AnimationSources {}; + }; From dac02bdb938b69203675fd8753595ea3a2853d25 Mon Sep 17 00:00:00 2001 From: facoptere Date: Mon, 18 Nov 2013 18:23:21 +0100 Subject: [PATCH 3/7] antihack.sqf uptodate --- SQF/dayz_code/system/antihack.sqf | 155 +++++++++++++++++++++++------- 1 file changed, 121 insertions(+), 34 deletions(-) diff --git a/SQF/dayz_code/system/antihack.sqf b/SQF/dayz_code/system/antihack.sqf index c639b99e7..0168ab5bb 100644 --- a/SQF/dayz_code/system/antihack.sqf +++ b/SQF/dayz_code/system/antihack.sqf @@ -4,44 +4,131 @@ Refactored By Alby */ -private ["_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed","_debug"]; +private ["_log","_playerName","_playerUID","_al1veOnce","_debug","_lastpos","_lastheight","_lasttime","_lastVehicle","_v","_h","_topv","_toph","_curpos","_distance","_curtime","_difftime","_plant","_curheight","_speed","_topSpeed","_terrainHeight","_differenceCheck","_lastPosVar","_safetyVehicle","_curPos"]; waitUntil {vehicle player == player}; -_lastpos = getPosATL (vehicle player); -_lastheight = (ATLtoASL _lastpos) select 2; -_lasttime = time; - -while {alive player} do -{ - _curpos = getPosATL (vehicle player); - _curheight = (ATLtoASL _curpos) select 2; - _curtime = time; - _distance = _lastpos distance _curpos; - _difftime = (_curtime - _lasttime) max 0.001; - _speed = _distance / _difftime; - _topSpeed = 10; - - if (vehicle player != player) then { - _topSpeed = getNumber (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "maxSpeed"); +[] spawn { + private ["_playerName","_playerUID"]; + _playerName = name player; + _playerUID = getPlayerUID player; + while {true} do { + if (typeName player != "OBJECT") then { + atp = format["WARNING typename error for player UID#%1", _playerUID]; + publicVariableServer "atp"; + //forceEnd; + endMission "LOSER"; + sleep 10; //Bypass spam + }; }; - - _terrainHeight = getTerrainHeightASL [_curpos select 0, _curpos select 1]; - - //diag_log format["DEBUG: terrain: %1 current: %2", _terrainHeight, _curheight]; - //diag_log format["DEBUG: all: %1 player: %2 fall: %3 terrain: %4", !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1)), (vehicle player == player), (_curheight < _lastheight), (_curheight - _terrainHeight) > 1]; - - _debug = getMarkerPos "respawn_west"; - if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then { - (vehicle player) setpos _lastpos; - atp = [name player, dayz_characterID, _lastpos, _curPos, getPosATL player]; - publicVariableServer "atp"; - } else { +}; - _lastpos = _curpos; - _lastheight = _curheight; +_al1veOnce = false; +while {true} do { + _debug = getMarkerpos "respawn_west"; + _lastpos = getPosATL (vehicle player); + _lastheight = (ATLtoASL _lastpos) select 2; + _lasttime = diag_ticktime; + _lastVehicle = vehicle player; + + // freefall detection: + _v = 0; + _h = 0; + _topv = 0; + _toph = 0; + + while {((typeName player == "OBJECT") AND {((player in playableUnits) AND {(alive player)})})} do { + //[-18697.58,379.53012,25815.256] + /* + if ([getMarkerPos "respawn_west", [0,0,0]] call BIS_fnc_areEqual || !([getMarkerPos "respawn_west", _debug] call BIS_fnc_areEqual)) then { + createMarkerLocal ["respawn_west", _debug]; + "respawn_west" setMarkerType "EMPTY"; + }; + */ + _curpos = getPosATL (vehicle player); + _distance = _lastpos distance _curpos; + _curtime = diag_ticktime; + _difftime = _curtime - _lasttime; + + if ((_distance > 10) OR {(_difftime > 1)}) then { + if (!_al1veOnce) then { + private [ "_loc", "_plant"]; + // check that plants libs are properly loaded + // thanks to Tansien the great + // run only once per character life + { + _plant = _x createVehicleLocal _debug; + sleep 0.1; + if (sizeOf _x == 0) exitWith { + atp = "Plants texture hack for type " + _x; + publicVariableServer "atp"; + endMission "LOSER"; + }; + deleteVehicle _plant; + } forEach ["grass", "prunus", "picea", "fallentree", "phragmites", "acer", "amygdalusn", "Brush", "fiberplant", "amygdalusc", "boulder"]; + diag_log format [ "%1: Plants libs tests done!", __FILE__]; + }; + _al1veOnce = true; + _curheight = (ATLtoASL _curpos) select 2; + _speed = _distance / _difftime; + _topSpeed = 10; + + if (vehicle player != player) then { + _topSpeed = (getNumber (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "maxSpeed")) min 500; + }; + + _terrainHeight = getTerrainHeightASL [_curpos select 0, _curpos select 1]; + + /* + _differenceCheck = false; + _lastPosVar = player getVariable ["lastPos", []]; + if (count _lastPosVar > 0) then { + _differenceCheck = (_lastPosVar distance _lastpos) > _topSpeed; + } else { + diag_log "LASTPOS RESET"; + }; + */ + + _safetyVehicle = vehicle player; + + if (_lastVehicle == vehicle player) then { + if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then { + (vehicle player) setposATL _lastpos; +// atp = format["TELEPORT REVERT for player UID#%1 from %2 to %3, %4 meters, now at %5", getPlayerUID player, _lastpos, _curPos, round(_lastpos distance _curpos), getPosATL player]; + atp = [name player, dayz_characterID, _lastpos, _curPos, getPosATL player]; + publicVariableServer "atp"; + } else { + _lastpos = _curpos; + _lastheight = _curheight; + }; + + _lasttime = _curtime; + }; + + if (_safetyVehicle == vehicle player) then { + _lastVehicle = vehicle player; + }; + + }; + // freefall detection: + _v = -((velocity player) select 2); + _h = (getPosATL player) select 2; + if (_v > 4 AND _h > 3) then { + _topv = _topv max _v; + _toph = _toph max _h; + Dayz_freefall = [ time, _toph, _topv ]; + } + else { + _topv = 0; + _toph = 0; + }; + sleep 0.25; }; - - _lasttime = _curtime; - sleep 0.5; +// if (_al1veOnce) then { +// sleep 5; +// endMission "LOSER"; +// } +// else { + sleep 0.1; +// }; }; \ No newline at end of file From cbe40ab4beaefb087c2d2f5fa17439984031b42a Mon Sep 17 00:00:00 2001 From: facoptere Date: Mon, 18 Nov 2013 19:38:19 +0100 Subject: [PATCH 4/7] BIS lib update --- .../system/BIS_Effects/airdestruction.sqf | 197 ++++++------------ .../BIS_Effects/airdestructionstage2.sqf | 122 +++++------ SQF/dayz_code/system/BIS_Effects/killed.sqf | 47 ++--- 3 files changed, 125 insertions(+), 241 deletions(-) diff --git a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf index eba2ebd58..e49018e1e 100644 --- a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf +++ b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf @@ -1,144 +1,71 @@ - -private ["_fl","_sm","_expl","_dr","_tv","_i","_wave","_splash","_velz","_v","_int","_t","_pos"]; +private["_fl","_sm","_expl","_dr","_tv","_i","_wave","_splash","_velz","_v","_int","_t","_pos"]; _v=_this select 0; -_int = (fuel _v)*(8+random 2); +_int=(fuel _v)*(8+random 2); _t=time; - -if !(isDedicated) then { //dw, particle stuff don't need run on dedicated - -_fl = "#particlesource" createVehicleLocal getpos _v; -_fl attachto [_v,[0,0,0],"destructionEffect2"]; -_fl setParticleRandom [0.3, [1, 1, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0], 0, 0]; -_fl setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 10, 32], "", "Billboard", 1, 2, "destructionEffect2", - [0, 0, 5], 0, 10, 7.9, 0.075, [4,7,9,10], [[1, 1, 1, -1], [1, 1, 1, -1], - [1, 1, 1, -1], [1, 1, 1, -0.5], [1, 1, 1, -0]], [1,0.5], 1, 0, "", "", _v]; -_fl setDropInterval 1; - -_sm = "#particlesource" createVehicleLocal getpos _v; -_sm attachto [_v,[0,0,0],"destructionEffect1"]; -_sm setParticleRandom [2, [2, 2, 0], [0, 0, 0], 0, 0.3, [0, 0, 0, 0.1], 0, 0]; -_sm setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 7, 48], "", "Billboard", 1, 5, "destructionEffect1", - [0, 0, 5], 0, 10, 7.9, 0.075, [4,8,12,14], [[0.3, 0.3, 0.3, 1], - [0.45, 0.45, 0.45, 1],[0.6, 0.6, 0.6, 0.6], [0.7, 0.7, 0.7, 0.25], [1, 1, 1, 0]], [0.8,0.3,0.25], 1, 0, "", "", _v]; -_sm setDropInterval 1; - -}; // end of dedicated check - +if(!isDedicated)then{ + _fl="#particlesource"createVehicleLocal getPosATL _v; + _fl attachto[_v,[0,0,0],"destructionEffect2"]; + _fl setParticleRandom[0.3,[1,1,0],[0,0,0],0,0.3,[0,0,0,0],0,0]; + _fl setParticleParams[["\Ca\Data\ParticleEffects\Universal\Universal",16,10,32],"","Billboard",1,2,"destructionEffect2",[0,0,5],0,10,7.9,0.075,[4,7,9,10],[[1,1,1,-1],[1,1,1,-1],[1,1,1,-1],[1,1,1,-0.5],[1,1,1,-0]],[1,0.5],1,0,"","",_v]; + _fl setDropInterval 1; + _sm="#particlesource"createVehicleLocal getPosATL _v; + _sm attachto[_v,[0,0,0],"destructionEffect1"]; + _sm setParticleRandom[2,[2,2,0],[0,0,0],0,0.3,[0,0,0,0.1],0,0]; + _sm setParticleParams[["\Ca\Data\ParticleEffects\Universal\Universal",16,7,48],"","Billboard",1,5,"destructionEffect1",[0,0,5],0,10,7.9,0.075,[4,8,12,14],[[0.3,0.3,0.3,1],[0.45,0.45,0.45,1],[0.6,0.6,0.6,0.6],[0.7,0.7,0.7,0.25],[1,1,1,0]],[0.8,0.3,0.25],1,0,"","",_v]; + _sm setDropInterval 1; +}; _i=0; _dr=0.2; _tv=11; - - -//Remove weapons/ammo to prevent explosion. Script will create its own explosions (doesnt work?) removeallweapons _v; - -if (local _v) then {_expl="HelicopterExploSmall" createvehicle (getpos _v);}; - -if !(isDedicated) then { //dw, particle stuff don't need run on dedicated -while {_i <1200 && ((velocity _v select 2)<-20 || (getpos _v select 2)>8) && !(alive _v) && !(isnull _v) && (getpos _v select 2)>1} do -{ -_tv=abs(velocity _v select 0)+abs(velocity _v select 1)+abs(velocity _v select 2); -if (_tv>2) then {_dr=1/_tv} else {_dr=1}; -_fl setDropInterval _dr; -_sm setDropInterval _dr; -_i=_i+1; -sleep 0.2; +if(local _v AND{(_v isKindOf"Air")})then{ + _expl=createVehicle["HelicopterExploSmall",(getPosATL _v),[],0,"CAN_COLLIDE"]; }; -}; // end of dedicated check - -_pos=getpos _v; -clearVehicleInit _v; - -if !(isDedicated) then { //dw, particle stuff don't need run on dedicated -deletevehicle _fl;deletevehicle _sm; -}; // end of dedicated check -if (surfaceiswater(_pos) && (_pos select 2)<9 ) then -{ -if !(isDedicated) then { //dw, particle stuff don't need run on dedicated - _wave = "#particlesource" createVehicleLocal getpos _v; - _wave attachto [_v,[0,0,0],"destructionEffect1"]; - _wave setParticleRandom [0.3, [1, 1, 0], [0.5, 0.5, 0], 0, 0.3, [0, 0, 0, 0], 0, 0]; - _wave setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13,0], "", "Billboard", 1, 1.6, "destructionEffect1", - [0, 0, 0], 0, 10, 7.9, 0.075, [3,8], - [[0.7,0.8,1,0.6],[0.85,0.9,1,0.0]], [1000], 1, 0, "", "", _v]; - _wave setparticlecircle [2,[0,16,0]]; - _wave setDropInterval 0.0015; - - _splash = "#particlesource" createVehicleLocal getpos _v; - _splash attachto [_v,[0,0,0],"destructionEffect1"]; - _splash setParticleRandom [2, [2, 2, 0], [2, 2, 7], 0, 0.5, [0, 0, 0, 0], 0, 0]; - _splash setParticleParams [["\Ca\Data\ParticleEffects\Universal\Universal", 16, 13, 6, 0], "", "Billboard", 1, 4, "destructionEffect1", - [0, 0, 0], 0, 30, 7.9, 0.075, [8,15], - [[0.7,0.7,0.7,1],[1,1,1,0]], [1000], 1, 0, "", "", _v]; - _splash setparticlecircle [2,[0,3,15]]; - _splash setDropInterval 0.002; - - sleep 0.2; - deletevehicle _wave;deletevehicle _splash; -}; // end of dedicated check - /* - if (local _v) then - { - _wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck"); - if (_wreck!="") then - { - _pos = getpos _v; - _dir = vectordir _v; - _vecUp = vectorup _v; - _vel = velocity _v; - - clearvehicleinit _v; - _crw= crew _v; - clearvehicleinit _v; - deleteVehicle _v; - _v =(_wreck) createvehicle _pos; - {_x moveincargo _v} foreach _crw; - _v setVectorDirAndUp [_dir,_vecUp]; - _v setFuel 0; - _v setdamage 0; - _v setvelocity _vel; - //Send to garbage collecter so wreck can be deleted later - [_v] call BIS_GC_trashItFunc; - - }; - }; */ -} -else -{ - if (local _v) then - { - //_velx = velocity _v select 0; _velx = _velx / 4; - //_vely = velocity _v select 1; _vely = _vely / 4; - _velz=velocity _v select 2; - if (_velz>1) then {_v setvelocity [velocity _v select 0,velocity _v select 1,0]}; - _expl="HelicopterExploBig" createvehicle [_pos select 0,_pos select 1,(_pos select 2) + 1]; - sleep 0.05; - /* - _wreck=GetText (configFile >> "CfgVehicles" >> (typeof _v) >> "wreck"); - if (_wreck!="") then - { - _pos = getpos _v; - _dir = vectordir _v; - _vecUp = vectorup _v; - _vel = velocity _v; - - _crw= crew _v; - clearvehicleinit _v; - deleteVehicle _v; - _v =(_wreck) createvehicle _pos; - {_x moveincargo _v} foreach _crw; - //sleep 0.05; - _v setvelocity _vel; - //_v setPos _pos; - _v setvectordir (_dir); - _v setvectorup _vecUp; - _v setFuel 0; - _v setdamage 0; - - - }; */ - //_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_AirDestructionStage2",_int, _t]; - //processInitCommands; //ClearvehicleInit done at end of burn script - ["AirDestructionStage2", _v, _int, _t] call BIS_Effects_globalEvent; +if(!isDedicated)then{ + while{_i<1200&&((velocity _v select 2)<-20||(getPosATL _v select 2)>8)&&!(alive _v)&&!(isnull _v)&&(getPosATL _v select 2)>1}do{ + _tv=abs(velocity _v select 0)+abs(velocity _v select 1)+abs(velocity _v select 2); + if(_tv>2)then{ + _dr=1/_tv}else{ + _dr=1}; + _fl setDropInterval _dr; + _sm setDropInterval _dr; + _i=_i+1; + sleep 0.2; + }; +}; +_pos=getPosATL _v; +clearVehicleInit _v; +if(!isDedicated)then{ + deletevehicle _fl; + deletevehicle _sm; +}; +if(surfaceiswater(_pos)&&(_pos select 2)<9)then{ + if(!isDedicated)then{ + _wave="#particlesource"createVehicleLocal getPosATL _v; + _wave attachto[_v,[0,0,0],"destructionEffect1"]; + _wave setParticleRandom[0.3,[1,1,0],[0.5,0.5,0],0,0.3,[0,0,0,0],0,0]; + _wave setParticleParams[["\Ca\Data\ParticleEffects\Universal\Universal",16,12,13,0],"","Billboard",1,1.6,"destructionEffect1",[0,0,0],0,10,7.9,0.075,[3,8],[[0.7,0.8,1,0.6],[0.85,0.9,1,0.0]],[1000],1,0,"","",_v]; + _wave setparticlecircle[2,[0,16,0]]; + _wave setDropInterval 0.0015; + _splash="#particlesource"createVehicleLocal getPosATL _v; + _splash attachto[_v,[0,0,0],"destructionEffect1"]; + _splash setParticleRandom[2,[2,2,0],[2,2,7],0,0.5,[0,0,0,0],0,0]; + _splash setParticleParams[["\Ca\Data\ParticleEffects\Universal\Universal",16,13,6,0],"","Billboard",1,4,"destructionEffect1",[0,0,0],0,30,7.9,0.075,[8,15],[[0.7,0.7,0.7,1],[1,1,1,0]],[1000],1,0,"","",_v]; + _splash setparticlecircle[2,[0,3,15]]; + _splash setDropInterval 0.002; + sleep 0.2; + deletevehicle _wave; + deletevehicle _splash; + }; +} +else{ + if(local _v)then{ + _velz=velocity _v select 2; + if(_velz>1)then{ + _v setvelocity[velocity _v select 0,velocity _v select 1,0] + }; + _expl=createVehicle["HelicopterExploBig",[_pos select 0,_pos select 1,(_pos select 2)+1],[],0,"CAN_COLLIDE"]; + sleep 0.05; + ["AirDestructionStage2",_v,_int,_t]call BIS_Effects_globalEvent; }; }; diff --git a/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf b/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf index 0ffcb3948..321a73e1e 100644 --- a/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf +++ b/SQF/dayz_code/system/BIS_Effects/airdestructionstage2.sqf @@ -1,87 +1,59 @@ - -private ["_dr","_pos","_xv","_yv","_dir","_Crater","_speed","_velz","_tv","_zv","_shards","_i","_smoke","_fire","_dirt","_int","_t","_v"]; -_int = _this select 1; +private ["_v","_pos", "_int","_t","_smoke","_fire","_dirt","_i","_xv","_yv","_zv","_dir","_Crater","_speed","_velz","_tv","_dr"]; +_v=_this select 0; +_int=_this select 1; _t=_this select 2; -_pos=getpos _v; -// Particle effects -if !(isDedicated) then { //dw, particle stuff don't need run on dedicated -_smoke = "#particlesource" createVehicleLocal _pos; -_smoke attachto [_v,[0,0,0],"destructionEffect1"]; -_smoke setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,7,48], - "", "Billboard", 1, 15, [0, 0, 0], [0, 0, 0], 1, 1.275, 1, 0, [8,14], - [[0.1,0.1,0.1,1],[0.1,0.1,0.1,0]], [0.5], 0.1, 0.1, "", "", _v]; -//_smoke setParticleCircle [2,[0,0,0]]; -_smoke setParticleRandom [4, [2, 2, 2], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0]; -_smoke setDropInterval 0.02; - -_fire = "#particlesource" createVehicleLocal _pos; -_fire attachto [_v,[0,0,0],"destructionEffect2"]; -/*_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,32], "", "Billboard", 1, 1, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [10,15], - [[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360]; */ -_fire setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,2,80], - "", "Billboard", 1, 2, [0, 1, 0], [0, 0, 0], 1, 1.275, 1, 0, [7,13], - [[1,1,1,-1],[1,1,1,0]], [0.5], 0.01, 0.01, "", "", _v,360]; -_fire setParticleRandom [0.5, [0.5, 0.5, 0.5], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0]; -_fire setDropInterval 0.01; -/* -_shards = "#particlesource" createVehicleLocal _pos; -//_shards attachto [_v,[0,0,0],"destructionEffect1"]; -_shards setParticleParams [["\CA\Data\ParticleEffects\Shard\shard",1,0,1], "", "SpaceObject", 1, 60, [0, 0, 0], [0, 0, 0], 0, 1.275, 1, 0, [1,1], - [[1,1,1,1]], [0.5], 0, 0, "", "", _v]; - _shards setParticleRandom [30, [1, 1, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 0]; -_shards setParticleCircle [2,[0.001,0.001,-0.001]]; -_shards setDropInterval 0.05; -*/ -_dirt = "#particlesource" createVehicleLocal _pos; -_dirt attachto [_v,[0,0,0],"destructionEffect1"]; -_dirt setParticleParams [["\ca\Data\ParticleEffects\Universal\Universal",16,12,9,0], "", "Billboard", 1, 5, [0, 0, 0], [0, 0, 5], 0, 5, 1, 0, [10,20], - [[0.1,0.1,0.1,1],[0.1,0.1,0.1,0.7],[0.1,0.1,0.1,0]], [1000], 0, 0, "", "", _v,360]; - _dirt setParticleRandom [0, [1, 1, 1], [1, 1, 2.5], 0, 0, [0, 0, 0, 0.5], 0, 0]; -_dirt setDropInterval 0.05; - - //creating ground craters +_pos=getPosATL _v; +if(!isDedicated)then{ + _smoke="#particlesource"createVehicleLocal _pos; + _smoke attachto[_v,[0,0,0],"destructionEffect1"]; + _smoke setParticleParams[["\ca\Data\ParticleEffects\Universal\Universal",16,7,48],"","Billboard",1,15,[0,0,0],[0,0,0],1,1.275,1,0,[8,14],[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0]],[0.5],0.1,0.1,"","",_v]; + _smoke setParticleRandom[4,[2,2,2],[0,0,0],0,0,[0,0,0,0],0,0]; + _smoke setDropInterval 0.02; + _fire="#particlesource"createVehicleLocal _pos; + _fire attachto[_v,[0,0,0],"destructionEffect2"]; + _fire setParticleParams[["\ca\Data\ParticleEffects\Universal\Universal",16,2,80],"","Billboard",1,2,[0,1,0],[0,0,0],1,1.275,1,0,[7,13],[[1,1,1,-1],[1,1,1,0]],[0.5],0.01,0.01,"","",_v,360]; + _fire setParticleRandom[0.5,[0.5,0.5,0.5],[0,0,0],0,0,[0,0,0,0],0,0]; + _fire setDropInterval 0.01; + _dirt="#particlesource"createVehicleLocal _pos; + _dirt attachto[_v,[0,0,0],"destructionEffect1"]; + _dirt setParticleParams[["\ca\Data\ParticleEffects\Universal\Universal",16,12,9,0],"","Billboard",1,5,[0,0,0],[0,0,5],0,5,1,0,[10,20],[[0.1,0.1,0.1,1],[0.1,0.1,0.1,0.7],[0.1,0.1,0.1,0]],[1000],0,0,"","",_v,360]; + _dirt setParticleRandom[0,[1,1,1],[1,1,2.5],0,0,[0,0,0,0.5],0,0]; + _dirt setDropInterval 0.05; _i=0; - while {(speed _v) > 0.1} do - { - _pos=getpos _v; + while{(speed _v)>0.1}do{ + _pos=getPosATL _v; _xv=velocity _v select 0; _yv=velocity _v select 1; - _dir = abs(_xv atan2 _yv); - - _Crater= "CraterLong" createvehiclelocal [_pos select 0, _pos select 1, 0]; - _Crater setdir (_dir + (180 * _i)); - _Crater setpos [_pos select 0, _pos select 1, 0]; - _Crater setPos [_pos select 0, _pos select 1, ((0 - _i)/13)]; //all setpos commands so it is placed correctly on sloped terrain - _speed = (speed _v); + _zv=velocity _v select 2; + _dir=abs(_xv atan2 _yv); + _Crater="CraterLong"createvehiclelocal[_pos select 0,_pos select 1,0]; + _Crater setdir(_dir+(180*_i)); + _Crater setpos[_pos select 0,_pos select 1,0]; + _Crater setPos[_pos select 0,_pos select 1,((0-_i)/13)]; + _speed=(speed _v); _velz=velocity _v select 2; - - if (_velz>1) then {_v setvelocity [_xv/1.3,_yv/1.3,0]} - else {_v setvelocity [_xv/1.2,_yv/1.2,velocity _v select 2]}; - + if(_velz>1)then{ + _v setvelocity[_xv/1.3,_yv/1.3,0] + } + else{ + _v setvelocity[_xv/1.2,_yv/1.2,velocity _v select 2] + }; _tv=abs(_xv)+abs(_yv)+abs(_zv); - if (_tv>2) then {_dr=1/_tv} else {_dr=1}; + _dr=if(_tv>2)then{1/_tv}else{1}; _smoke setDropInterval _dr*1.5; _fire setDropInterval _dr*1.5; _dirt setDropInterval _dr; - _shards setDropInterval _dr; - - sleep (0.25 - (_speed / 1000)); - _i = _i + 1; + sleep(0.25-(_speed/1000)); + _i=_i+1; }; -deleteVehicle _smoke; -deleteVehicle _fire; -deleteVehicle _shards; -deleteVehicle _dirt; - -}; // end of dedicated check - -_v setvelocity [0,0,-0.1]; -if (local _v) then -{ - //_v setVehicleInit format ["[this, %1, %2,false,true]spawn BIS_Effects_Burn",_int, _t]; - //processInitCommands; //ClearvehicleInit done at end of burn script - ["Burn", _v, _int, _t] call BIS_Effects_globalEvent; - [_v,_int,false] spawn BIS_Effects_Secondaries; + deleteVehicle _smoke; + deleteVehicle _fire; + deleteVehicle _dirt; +}; +_v setvelocity[0,0,-0.1]; +if(local _v)then{ + ["Burn",_v,_int,_t]call BIS_Effects_globalEvent; + [_v,_int,false]spawn BIS_Effects_Secondaries; }; sleep 0.5; -_v setvelocity [0,0,-0.01]; +_v setvelocity[0,0,-0.01]; diff --git a/SQF/dayz_code/system/BIS_Effects/killed.sqf b/SQF/dayz_code/system/BIS_Effects/killed.sqf index d17452d11..d481efcae 100644 --- a/SQF/dayz_code/system/BIS_Effects/killed.sqf +++ b/SQF/dayz_code/system/BIS_Effects/killed.sqf @@ -1,34 +1,19 @@ private ["_v","_int","_t","_b"]; + _v=_this select 0; -if (_v iskindof "helicopter" || _v iskindof "plane") - then - { - //_v setVehicleInit "[this] spawn BIS_Effects_AirDestruction"; - //processInitCommands; //ClearvehicleInit done at end of burn script - ["AirDestruction", _v] call BIS_Effects_globalEvent; - }; -if (_v iskindof "tank") - then - { - _int = (fuel _v)*(2+random 2); - _t=time; - //_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn",_int, _t]; - disabled to prepaire for move into engine - //processInitCommands; //ClearvehicleInit done at end of burn script - [_v,_int] spawn BIS_Effects_Secondaries; - }; -if (_v iskindof "car" || _v iskindof "ship") - then - { - _int = (fuel _v)*(2 + random 1); - _t=time; - - //_v setVehicleInit format ["[this, %1, %2]spawn BIS_Effects_Burn; ",_int, _t]; - disabled to prepaire for move into engine - //processInitCommands; //ClearvehicleInit done at end of burn script - [_v,_int] spawn BIS_Effects_Secondaries; - - //Possible initial explosion - if ((random _int)>2.2) then - { - _b="SmallSecondary" createvehicle (getpos _v); - }; +if(_v iskindof"helicopter"||_v iskindof"plane")then{ + ["AirDestruction",_v]call BIS_Effects_globalEvent; +}; +if(_v iskindof"tank")then{ + _int=(fuel _v)*(2+random 2); + _t=time; + [_v,_int]spawn BIS_Effects_Secondaries; +}; +if(_v iskindof"car"||_v iskindof"ship")then{ + _int=(fuel _v)*(2+random 1); + _t=time; + [_v,_int]spawn BIS_Effects_Secondaries; + if((random _int)>2.2)then{ + _b=createVehicle["SmallSecondary",(getPosATL _v),[],0,"CAN_COLLIDE"]; }; +}; From 2136bf0c92d577af58c213a0adff849b7f625767 Mon Sep 17 00:00:00 2001 From: facoptere Date: Mon, 18 Nov 2013 19:46:42 +0100 Subject: [PATCH 5/7] rewrite BIS effect in all mission files --- .../MPMissions/DayZ_Epoch_1.Takistan/init.sqf | 31 ++---------------- .../DayZ_Epoch_10.Mountains_ACR/init.sqf | 31 ++---------------- .../DayZ_Epoch_11.Chernarus/init.sqf | 31 ++---------------- .../DayZ_Epoch_12.isladuala/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_13.Tavi/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_15.namalsk/init.sqf | 31 ++---------------- .../DayZ_Epoch_16.Panthera2/init.sqf | 2 ++ .../DayZ_Epoch_17.Chernarus/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_18.Sara/init.sqf | 3 +- .../DayZ_Epoch_19.FDF_Isle1_a/init.sqf | 32 ++----------------- .../MPMissions/DayZ_Epoch_2.Utes/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_20.fapovo/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_21.Caribou/init.sqf | 32 ++----------------- .../DayZ_Epoch_3.Shapur_BAF/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_4.Zargabad/init.sqf | 31 ++---------------- .../DayZ_Epoch_5.Bootcamp_ACR/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_6.Dingor/init.sqf | 31 ++---------------- .../MPMissions/DayZ_Epoch_7.Lingor/init.sqf | 31 ++---------------- .../DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf | 31 ++---------------- .../DayZ_Epoch_9.Woodland_ACR/init.sqf | 31 ++---------------- Server Files/MPMissions/TEMPLATE/init.sqf | 31 ++---------------- 21 files changed, 42 insertions(+), 554 deletions(-) diff --git a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf index 6fd83186c..8d98869c2 100644 --- a/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_1.Takistan/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { //Compile vehicle configs @@ -110,3 +81,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf index 3e75b47fb..d017fc9c6 100644 --- a/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_10.Mountains_ACR/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -108,3 +79,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf index b21ca88f4..e05f70606 100644 --- a/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_11.Chernarus/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf"; //Compile vehicle configs @@ -109,3 +80,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf index 43a2d0df6..2942b169e 100644 --- a/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_12.isladuala/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -108,3 +79,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf index 2b33276f7..c4e088ce6 100644 --- a/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_13.Tavi/init.sqf @@ -58,35 +58,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -112,3 +83,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf index 393539f4b..fb3170404 100644 --- a/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_15.namalsk/init.sqf @@ -56,35 +56,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -110,3 +81,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf index fe1fd4333..02dbf31b9 100644 --- a/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_16.Panthera2/init.sqf @@ -81,3 +81,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf index 2cda56be7..66d9fd1ea 100644 --- a/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_17.Chernarus/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -108,3 +79,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf b/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf index 66f813b1a..2ab1c50a0 100644 --- a/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_18.Sara/init.sqf @@ -78,4 +78,5 @@ if (!isDedicated) then { }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather -execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; \ No newline at end of file +execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf index b1c04485a..d40534884 100644 --- a/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_19.FDF_Isle1_a/init.sqf @@ -53,35 +53,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -106,4 +77,5 @@ if (!isDedicated) then { }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather -execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; \ No newline at end of file +execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf b/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf index da31f103f..3ca374e5a 100644 --- a/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_2.Utes/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { //Compile vehicle configs @@ -110,3 +81,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf index 63f4a951a..1f7fe181f 100644 --- a/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_20.fapovo/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -108,3 +79,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf index 64f311fac..f157d8b52 100644 --- a/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_21.Caribou/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -107,4 +78,5 @@ if (!isDedicated) then { }; #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather -execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; \ No newline at end of file +execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf index 8e46c6491..af9858b64 100644 --- a/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_3.Shapur_BAF/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { //Compile vehicle configs @@ -110,3 +81,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf index 12f0262cc..7849e2195 100644 --- a/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_4.Zargabad/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { //Compile vehicle configs @@ -110,3 +81,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf index aa5ecad8d..7a1131320 100644 --- a/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_5.Bootcamp_ACR/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -108,3 +79,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf index f1c9833b7..924cde0ba 100644 --- a/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_6.Dingor/init.sqf @@ -55,35 +55,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -109,3 +80,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf index 75edaf302..2dd5053b0 100644 --- a/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_7.Lingor/init.sqf @@ -55,35 +55,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -109,3 +80,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf index d2eb2e7b3..1d1d09fb3 100644 --- a/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_8.ProvingGrounds_PMC/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -108,3 +79,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf index 11326ee7e..7a76d2c81 100644 --- a/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf +++ b/Server Files/MPMissions/DayZ_Epoch_9.Woodland_ACR/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs @@ -108,3 +79,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" diff --git a/Server Files/MPMissions/TEMPLATE/init.sqf b/Server Files/MPMissions/TEMPLATE/init.sqf index b21ca88f4..e05f70606 100644 --- a/Server Files/MPMissions/TEMPLATE/init.sqf +++ b/Server Files/MPMissions/TEMPLATE/init.sqf @@ -54,35 +54,6 @@ progressLoadingScreen 1.0; "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic"; -/* BIS_Effects_* fixes from Dwarden */ -BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; -BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; -BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; - -BIS_Effects_globalEvent = { - BIS_effects_gepv = _this; - publicVariable "BIS_effects_gepv"; - _this call BIS_Effects_startEvent; -}; - -BIS_Effects_startEvent = { - switch (_this select 0) do { - case "AirDestruction": { - [_this select 1] spawn BIS_Effects_AirDestruction; - }; - case "AirDestructionStage2": { - [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; - }; - case "Burn": { - [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; - }; - }; -}; - -"BIS_effects_gepv" addPublicVariableEventHandler { - (_this select 1) call BIS_Effects_startEvent; -}; - if (isServer) then { call compile preprocessFileLineNumbers "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf"; //Compile vehicle configs @@ -109,3 +80,5 @@ if (!isDedicated) then { #include "\z\addons\dayz_code\system\REsec.sqf" //Start Dynamic Weather execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf"; + +#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf" From 6bb661ebf3e8685e8752404413dadc1af3fb31fb Mon Sep 17 00:00:00 2001 From: facoptere Date: Mon, 18 Nov 2013 20:52:54 +0100 Subject: [PATCH 6/7] fix --- SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp | 2 +- SQF/dayz_code/Configs/cfgVehicles.hpp | 3 +-- SQF/dayz_code/system/BIS_Effects/airdestruction.sqf | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp b/SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp index b8602dd32..763d30ca0 100644 --- a/SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp +++ b/SQF/dayz_code/Configs/CfgVehicles/antihack_plants.hpp @@ -1,7 +1,7 @@ // check that plants libs are properly loaded // thanks to Tansien - class faplants : House {}; + class faplants : HouseBase {}; class grass: faplants { model = "\ca\data\cl_grass1.p3d"; diff --git a/SQF/dayz_code/Configs/cfgVehicles.hpp b/SQF/dayz_code/Configs/cfgVehicles.hpp index fd0ec8431..0df4c77f4 100644 --- a/SQF/dayz_code/Configs/cfgVehicles.hpp +++ b/SQF/dayz_code/Configs/cfgVehicles.hpp @@ -10,13 +10,12 @@ class CfgVehicles { #include "CfgVehicles\Zeds\PlayerZeds.hpp" #include "CfgVehicles\Females\females.hpp" #include "CfgVehicles\antihack_logic.hpp" - #include "CfgVehicles\antihack_plants.hpp" class All; class HouseBase; class Ruins: HouseBase {}; - + #include "CfgVehicles\antihack_plants.hpp" #include "CfgVehicles\DZE\Doors.hpp" class AllVehicles; diff --git a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf index e49018e1e..8c62ae2fd 100644 --- a/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf +++ b/SQF/dayz_code/system/BIS_Effects/airdestruction.sqf @@ -24,9 +24,7 @@ if(local _v AND{(_v isKindOf"Air")})then{ if(!isDedicated)then{ while{_i<1200&&((velocity _v select 2)<-20||(getPosATL _v select 2)>8)&&!(alive _v)&&!(isnull _v)&&(getPosATL _v select 2)>1}do{ _tv=abs(velocity _v select 0)+abs(velocity _v select 1)+abs(velocity _v select 2); - if(_tv>2)then{ - _dr=1/_tv}else{ - _dr=1}; + _dr=if(_tv>2)then{1/_tv}else{1}; _fl setDropInterval _dr; _sm setDropInterval _dr; _i=_i+1; From 53ff939d43f76496a46cd7193cf1e64c193a15f7 Mon Sep 17 00:00:00 2001 From: facoptere Date: Tue, 19 Nov 2013 09:57:17 +0100 Subject: [PATCH 7/7] add missing BIS effects files --- SQF/dayz_code/system/BIS_Effects/init.sqf | 40 +++++++++++++++++++ .../system/BIS_Effects/secondaries.sqf | 22 ++++++++++ 2 files changed, 62 insertions(+) create mode 100644 SQF/dayz_code/system/BIS_Effects/init.sqf create mode 100644 SQF/dayz_code/system/BIS_Effects/secondaries.sqf diff --git a/SQF/dayz_code/system/BIS_Effects/init.sqf b/SQF/dayz_code/system/BIS_Effects/init.sqf new file mode 100644 index 000000000..6f3b9a927 --- /dev/null +++ b/SQF/dayz_code/system/BIS_Effects/init.sqf @@ -0,0 +1,40 @@ +[] spawn { + while {true} do { + waitUntil {((isNil "BIS_Effects_Rifle") OR {(count(toArray(str(BIS_Effects_Rifle)))!=7)})}; + diag_log "Res3tting B!S effects..."; + /* BIS_Effects_* fixes from Dwarden */ + BIS_Effects_Rifle = {false}; + BIS_Effects_EH_Fired = {false}; + BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf"; + BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf"; + BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf"; + BIS_Effects_Secondaries = "\z\addons\dayz_code\system\BIS_Effects\secondaries.sqf"; + + BIS_Effects_globalEvent = { + BIS_effects_gepv = _this; + publicVariable "BIS_effects_gepv"; + _this call BIS_Effects_startEvent; + }; + + BIS_Effects_startEvent = { + switch (_this select 0) do { + case "AirDestruction": { + [_this select 1] spawn BIS_Effects_AirDestruction; + }; + case "AirDestructionStage2": { + [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2; + }; + case "Burn": { + [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn; + }; + }; + }; + + "BIS_effects_gepv" addPublicVariableEventHandler { + (_this select 1) call BIS_Effects_startEvent; + }; + + sleep 1; + }; +}; + diff --git a/SQF/dayz_code/system/BIS_Effects/secondaries.sqf b/SQF/dayz_code/system/BIS_Effects/secondaries.sqf new file mode 100644 index 000000000..25eb50d06 --- /dev/null +++ b/SQF/dayz_code/system/BIS_Effects/secondaries.sqf @@ -0,0 +1,22 @@ +private ["_v","_int","_list","_lifecheck","_effect2pos","_t"]; + +_v=_this select 0; +_int=_this select 1; +_list=[]; +_lifecheck=true; +if(count _this>2)then{ + _lifecheck=_this select 2 +}; +_int=_int min 3; +if(!((_v isKindOf"Air")OR{((_v isKindOf"LandVehicle")OR{(_v isKindOf"Ship")})}))exitWith{}; +_effect2pos=_v selectionposition"destructionEffect2"; +while{_int>1}do{ + _int=_int-1; + _t=(random 45)+1; + _list=_list+[_t]; +}; +{ + sleep _x; + if((_lifecheck&&(alive _v))||(isnull _v)||(((getposASL _v)select 2)<0))exitwith{}; + "SmallSecondary"createvehicle(_v modelToWorld _effect2pos); +}foreach(_list);