Skip to content

Commit

Permalink
Snap Helper + BE kicks
Browse files Browse the repository at this point in the history
- Helper 3D-Icon + Line on the part, where element is snapped on (while
Base-Building)
- "PLAYER_REJECT_ServerVersion" kick, if connecting with older version
  • Loading branch information
He-Man authored and He-Man committed Feb 1, 2018
1 parent 03985c4 commit 12e5746
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 42 deletions.
2 changes: 1 addition & 1 deletion Server_Install_Pack/sc/battleye/publicvariable.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5 "" !="EPAH_[a-z]{5,10}" !="BIS_fnc_objectVar_obj2_[0-9]{1,10}" !="bis_fnc_sharedObjectives_serverUpdate"
5 "" !="EPAH_[a-z]{5,10}" !="BIS_fnc_objectVar_obj2_[0-9]{1,10}" !="bis_fnc_sharedObjectives_serverUpdate" !="PLAYER_REJECT_ServerVersion"
4 changes: 2 additions & 2 deletions Server_Install_Pack/sc/battleye/scripts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
5 removeEventHandler !="displayRemoveEventHandler" !="player removeEventHandler ['Fired', 0];" !="_currentTarget removeEventHandler[\"EpeContactStart\", _onContactEH]" !=" [_adminVar,objnull];\npublicvariable _adminVar;\nplayer removeeventhandler [\"respawn\",_respawn];" !="_plyr removeEventHandler [\"FiredNear\", _smokeEH];" !="player removeEventHandler [_ehKey, 0];" !="player removeEventHandler [_x, 0];" !="\"CBA_fnc_removeEventHandler\"" !="\\fnc_removeEventHandler" !="\"removeEventHandler"
5 switchCamera !="vehicle player switchCamera" !="_antagonist switchCamera \"Internal\";"
5 remoteControl !="fn_moduleRemoteControl.sqf" !="\"BIS_fnc_moduleRemoteControl\""
5 drawIcon3D !="EPOCH_drawIcon3dStability" !="EPOCH_drawIcon3d" !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !="if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\"" !="drawIcon3D\n[\n(_x getVariable [\"bis_fnc_reviveGet3dIcons_textures" !="drawIcon3D[\"x\addons\a3_epoch_code\Data\UI\snap_ca.paa\""
5 drawLine3D !="{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari"
5 drawIcon3D !="EPOCH_drawIcon3dStability" !="EPOCH_drawIcon3d" !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !="drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !="if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\"" !="drawIcon3D\n[\n(_x getVariable [\"bis_fnc_reviveGet3dIcons_textures" !="drawIcon3D[\"x\addons\a3_epoch_code\Data\UI\snap_ca.paa\"" !="drawIcon3D [\"\a3\ui_f\data\map\diary\icons\unitgroup_ca.paa\""
5 drawLine3D !="{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari" !="drawLine3D [ASLToAGL (getposasl _SnapObj1),ASLToAGL (getposasl _SnapObj2), [1,0,0,1]];"
5 ctrlCreate !="_parent ctrlcreate [\"RscMessageBox\",2351];" !="_c = _dsp ctrlCreate [\"rmx_drag_RscActivePicture\", call epoch_getIDC];" !="_c = _dsp ctrlCreate [\"rmx_t1\", call epoch_getIDC];" !="ctrlCreate [\"RscProgress\",_idc + 1];" !="ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\"" !="ctrlCreate [_x,call _getIDC];" !="_mainGrp = _display ctrlCreate [\"Epoch_main_config_group\",_value];" !="ctrlCreate !="_prevButton = _display ctrlCreate [\"RscButtonMenu\", 90110, _dbg];" [\"RscControlsGroupNoScrollbars\",call epoch_getIDC];" !="ctrlCreate [\"rmx_rscPicture\",(66600 + _e)];" !="ctrlCreate [\"RscStructuredText\",call epoch_getIDC];" !="_bar = _display ctrlCreate [\"RscCustomProgress\"" !="_group = _dsp ctrlCreate [\"rmx_rscControlsGroup\", call Epoch_getIDC]" !="_control = _display ctrlCreate [\"RscControlsGroupNoScrollbars\", 5678910];"
5 ctrlClassName
5 ctrlModel
Expand Down
83 changes: 45 additions & 38 deletions Sources/epoch_code/compile/EPOCH_onEachFrame.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,6 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_onEachFrame.sqf
*/
if (EPOCH_velTransform) then {
if (EPOCH_playerEnergy > 0) then {
_pos1 = getPosASL EPOCH_target;
_vel1 = velocity EPOCH_target;
_dir1 = vectorDir EPOCH_target;
_up1 = vectorUp EPOCH_target;
_interval = 0.1;

if !(EP_velocityTransformation isEqualTo []) then {
EPOCH_target setvelocitytransformation[_pos1, (EP_velocityTransformation select 0), _vel1, (EP_velocityTransformation select 1), _dir1, (EP_velocityTransformation select 2), _up1, (EP_velocityTransformation select 3), _interval];
} else {
_pos2 = player modelToWorld[EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
if !(EPOCH_maxBuildingHeight == 0) then {
if (_pos2 select 2 > EPOCH_maxBuildingHeight) then {
_pos2 set[2, EPOCH_maxBuildingHeight];
};
};
if ((_pos2 select 2) < 0) then { _pos2 set[2, 0] };
if ((_pos1 distance _pos2) > 0) then {
_newpos = AGLtoASL _pos2;
if (surfaceiswater _pos2) then {
_newpos = _pos2;
};
EPOCH_target setvelocitytransformation[_pos1, _newpos, _vel1, _vel1, _dir1, _dir1, _up1, _up1, _interval];
};
};
} else {
EPOCH_velTransform = false;
};
};
if (!isNull EPOCH_currentTarget && vehicle player == player) then {
_currentTarget = EPOCH_currentTarget;

Expand Down Expand Up @@ -137,15 +107,52 @@ if (EPOCH_drawIcon3d) then {
}forEach EPOCH_arr_countdown;
};

{
_distance = player distance _x;
if (_distance < 9) then {
_pos = _x;
_color = [1, 1, 0, 0.7];
_size = 1;
drawIcon3D["x\addons\a3_epoch_code\Data\UI\snap_ca.paa", _color, _pos, _size, _size, 0, "", 1, _size / 60, "PuristaMedium"];
if !(isnull EPOCH_target) then {
if (EPOCH_velTransform) then {
if (EPOCH_playerEnergy > 0) then {
_pos1 = getPosASL EPOCH_target;
_vel1 = velocity EPOCH_target;
_dir1 = vectorDir EPOCH_target;
_up1 = vectorUp EPOCH_target;
_interval = 0.1;

if !(EP_velocityTransformation isEqualTo []) then {
EPOCH_target setvelocitytransformation[_pos1, (EP_velocityTransformation select 0), _vel1, (EP_velocityTransformation select 1), _dir1, (EP_velocityTransformation select 2), _up1, (EP_velocityTransformation select 3), _interval];
} else {
_pos2 = player modelToWorld[EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
if !(EPOCH_maxBuildingHeight == 0) then {
if (_pos2 select 2 > EPOCH_maxBuildingHeight) then {
_pos2 set[2, EPOCH_maxBuildingHeight];
};
};
if ((_pos2 select 2) < 0) then { _pos2 set[2, 0] };
if ((_pos1 distance _pos2) > 0) then {
_newpos = AGLtoASL _pos2;
if (surfaceiswater _pos2) then {
_newpos = _pos2;
};
EPOCH_target setvelocitytransformation[_pos1, _newpos, _vel1, _vel1, _dir1, _dir1, _up1, _up1, _interval];
};
};
} else {
EPOCH_velTransform = false;
};
};
{
_distance = player distance _x;
if (_distance < 9) then {
_pos = _x;
_color = [1, 1, 0, 0.7];
_size = 1;
drawIcon3D["x\addons\a3_epoch_code\Data\UI\snap_ca.paa", _color, _pos, _size, _size, 0, "", 1, _size / 60, "PuristaMedium"];
};
}forEach EPOCH_arr_snapPoints;
if !(EPOCH_arr_snapObjects isequalto []) then {
EPOCH_arr_snapObjects params [["_SnapObj1",objNull],["_SnapObj2",objNull]];
drawIcon3D ["\a3\ui_f\data\map\diary\icons\unitgroup_ca.paa", [1,0,0,1], ASLtoATL (getposASL _SnapObj1), 1.5, 1.5,0];
drawLine3D [ASLToAGL (getposasl _SnapObj1),ASLToAGL (getposasl _SnapObj2), [1,0,0,1]];
};
}forEach EPOCH_arr_snapPoints;
};

{
if (!isNull _x) then {
Expand Down
3 changes: 3 additions & 0 deletions Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ if (isText(_simulClassConfig)) then {
_dir2 = [vectorDir _nearestObject, _direction] call BIS_fnc_returnVector;
_up2 = (vectorUp _nearestObject);
EP_velocityTransformation = [AGLToASL _pos2,_vel2,_dir2,_up2];
EPOCH_arr_snapObjects = [_nearestObject, _currentTarget];
};
};
if (!_isSnap) then {
Expand All @@ -230,13 +231,15 @@ if (isText(_simulClassConfig)) then {
} else {
EP_velocityTransformation = [];
};
EPOCH_arr_snapObjects = [];
};
};
[_playerEnergyKeyFinal, -_energyCost, 2500 , 0] call EPOCH_fnc_setVariableLimited;
uiSleep 0.1;
};
_currentTarget removeEventHandler["EpeContactStart", _onContactEH];
EPOCH_velTransform = false;
EPOCH_arr_snapObjects = [];
_disallowed = ["Tarp_SIM_EPOCH", "Freezer_SIM_EPOCH", "Fridge_SIM_EPOCH", "Shelf_SIM_EPOCH", "Pelican_SIM_EPOCH", "Wardrobe_SIM_EPOCH", "Bed_SIM_EPOCH", "Couch_SIM_EPOCH", "Cooker_SIM_EPOCH", "Chair_SIM_EPOCH", "Filing_SIM_EPOCH", "Table_SIM_EPOCH", "Locker_SIM_EPOCH", "ToolRack_SIM_EPOCH", "Shoebox_SIM_EPOCH", "Bunk_SIM_EPOCH", "Jack_SIM_EPOCH", "toilet_SIM_EPOCH", "KitchenSink_SIM_EPOCH"];
if !(_class in _disallowed) then {
_currentTarget spawn EPOCH_countdown;
Expand Down
3 changes: 3 additions & 0 deletions Sources/epoch_code/compile/building/EPOCH_staticMove.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ if (_class != "") then {
_currentOffSet = _offSet;
EPOCH_doRotate = false;
EPOCH_arr_snapPoints = [];
EPOCH_arr_snapObjects = [];
EP_snap = objnull;
_pos2ATL = _pos2;
if (surfaceIsWater _pos2ATL) then {
Expand Down Expand Up @@ -359,6 +360,7 @@ if (_class != "") then {
};
if (count _arr_snapPoints >= 2) exitWith { EPOCH_arr_snapPoints = _arr_snapPoints; }
} forEach _snapChecks;
EPOCH_arr_snapObjects = [_nearestObject, _currentTarget];
};
};
if (_snapped) exitwith {};
Expand All @@ -378,6 +380,7 @@ if (_class != "") then {
};

EPOCH_arr_snapPoints = [];
EPOCH_arr_snapObjects = [];

{
detach _x;
Expand Down
1 change: 1 addition & 0 deletions Sources/epoch_code/compile/setup/EPOCH_clientInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ EPOCH_Z_OFFSET = 0;
EPOCH_X_OFFSET = 0;
EPOCH_Y_OFFSET = 5;
EPOCH_arr_snapPoints = [];
EPOCH_arr_snapObjects = [];
EPOCH_prevTarget = objNull;
EPOCH_interactOption = 0;
EPOCH_playerStaminaMax = 100;
Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) a
- If your legs are broken, you get a hint "can not autorun - legs are broken"
- If the terrain is too steep, you only walk in AutoRun
- Inside Water, you can not Autorun
- Helper 3D-Icon + Line on the part, where element is snapped on (while Base-Building) @He-Man
### Fixed
- False BE kicks since Arma 3 1.80 update.
- Nightlight now also follow players inside Vehicles @He-Man
Expand All @@ -41,7 +42,7 @@ All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) a
- Garden Plot had no physical ground @Helion4
### Changed
- RCon Port is now set to 2307 by default since changes in A3 1.78 prevent use of 2306. @AWOL
- SnapPoints for Building objects (especially half / quarter Floors) @He-Man
- SnapPoints for Building objects (especially full / half / quarter Floors) @He-Man
- Some performance tweaks
- Inventory will be opened automatically, if "you found something" @AWOL
- EPOCH Events reworked (Markers will change if players near / event looted) @DirtySanchez
Expand All @@ -52,6 +53,7 @@ All changes for [Arma 3](https://arma3.com/) [Epoch Mod](https://epochmod.com) a
- Not full magazines are colored: Yellow (nearly full) -> Red (nearly empty)
- You also get a Tooltip, how much bullets left in magazine
- The prices are calculated by the left bullets in the magazine
- Increased snap-distance for Foundations (much easier to find snap positions) @He-Man

## [1.0.0.1077] - 2017-11-05
### Added
Expand Down

0 comments on commit 12e5746

Please sign in to comment.