mirror of
https://github.com/ravmustang/eXpochVectorBuild4Exile.git
synced 2025-07-25 19:02:18 +00:00
Upgrades/Fixes for DPBEA Compatibility
This commit is contained in:
@ -34,9 +34,12 @@ class CfgExileCustomCode
|
||||
|
||||
ExileClient_util_fusRoDah = "myaddon\myfunction.sqf";
|
||||
*/
|
||||
ExileClient_construction_thread = "eXpochVectorBldg\ExileClient_construction_thread.sqf";
|
||||
ExileClient_object_construction_move = "eXpochVectorBldg\ExileClient_object_construction_move.sqf";
|
||||
ExileClient_gui_hud_event_onKeyDown = "eXpochVectorBldg\ExileClient_gui_hud_event_onKeyDown.sqf";
|
||||
ExileClient_gui_hud_event_onKeyUp = "eXpochVectorBldg\ExileClient_gui_hud_event_onKeyUp.sqf";
|
||||
ExileClient_construction_beginExistingObject = "eXpochVectorBldg\ExileClient_construction_beginExistingObject.sqf";
|
||||
ExileClient_construction_beginNewObject = "eXpochVectorBldg\ExileClient_construction_beginNewObject.sqf";
|
||||
ExileClient_object_construction_network_constructionResponse = "eXpochVectorBldg\ExileClient_object_construction_network_constructionResponse.sqf";
|
||||
ExileClient_construction_handleAbort = "eXpochVectorBldg\ExileClient_construction_handleAbort.sqf";
|
||||
ExileClient_construction_thread = "eXpochVectorBldg\ExileClient_construction_thread.sqf";
|
||||
ExileClient_gui_constructionMode_update = "eXpochVectorBldg\ExileClient_gui_constructionMode_update.sqf";
|
||||
ExileClient_util_world_canBuildHere = "eXpochVectorBldg\ExileClient_util_world_canBuildHere.sqf";
|
||||
};
|
||||
|
@ -33,7 +33,8 @@ else
|
||||
ExileClientConstructionProcess = 2;
|
||||
ExileClientConstructionRotation = 0;
|
||||
ExileClientConstructionObjectDisplayName = getText(configFile >> "CfgVehicles" >> _previewObjectClassName >> "displayName");
|
||||
ExileClientConstructionOffset = [0, 5,0];
|
||||
ExileClientConstructionOffset = [0,5,0];
|
||||
DPBEAClientObjAttachedTo = player;
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
ExileClientConstructionMode = 1;
|
||||
ExileClientConstructionIsInSelectSnapObjectMode = true;
|
||||
|
@ -26,6 +26,7 @@ ExileClientConstructionSnapToObjectClassNames = (ExileClientConstructionConfig >
|
||||
ExileClientConstructionProcess = 1;
|
||||
ExileClientConstructionOffset = [0, 5, 0];
|
||||
ExileClientConstructionPosition = [0, 0, 0];
|
||||
DPBEAClientObjAttachedTo = player;
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
ExileClientConstructionRotation = 0;
|
||||
ExileClientConstructionKitClassName = _kitClassName;
|
||||
|
@ -1,80 +0,0 @@
|
||||
/**
|
||||
* ExileClient_construction_handleAbort
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* <20> 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*
|
||||
eXpochClient_FREE_vectorBuilding
|
||||
|
||||
Made for Anarchy, adapted to eXpoch and ported into Altis Life and Operation BlockHead by DirtySanchez
|
||||
|
||||
and NOW EXILE WILL FEEL THE FREE VECTOR, go get a job sellers of scripts, this is a modding community.
|
||||
Sharing is caring and douchebaggery is a bannable offense
|
||||
|
||||
http://DonkeyPunch.INFO
|
||||
*/
|
||||
|
||||
private["_simulatePhysics"];
|
||||
_simulatePhysics = _this;
|
||||
switch (ExileClientConstructionResult) do
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
if( ExileClientConstructionProcess isEqualTo 1) then
|
||||
{
|
||||
[player, ExileClientConstructionKitClassName] call ExileClient_util_playerCargo_remove;
|
||||
};
|
||||
[ExileClientConstructionObject, getText (ExileClientConstructionConfig >> "staticObject"), _simulatePhysics] spawn ExileClient_construction_simulationCountDown;
|
||||
if (getText (ExileClientConstructionConfig >> "staticObject") isEqualTo "Exile_Container_Safe") then
|
||||
{
|
||||
["SuccessTitleAndText", ["Placed safe!", "The PIN has been set to 0000."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
}
|
||||
else
|
||||
{
|
||||
["SuccessTitleAndText", ["Placed object!", format ["You have successfully placed a %1.", ExileClientConstructionObjectDisplayName]]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
};
|
||||
};
|
||||
case 3:
|
||||
{
|
||||
if (ExileClientConstructionProcess isEqualTo 2) then
|
||||
{
|
||||
[ExileClientConstructionObject, getText (ExileClientConstructionConfig >> "staticObject"), true] spawn ExileClient_construction_simulationCountDown;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteVehicle ExileClientConstructionObject;
|
||||
};
|
||||
["ErrorTitleAndText", ["Construction aborted!", "Do not move more than 20 meters."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
};
|
||||
case 2:
|
||||
{
|
||||
if (ExileClientConstructionProcess isEqualTo 2) then
|
||||
{
|
||||
[ExileClientConstructionObject, getText(ExileClientConstructionConfig >> "staticObject"), _simulatePhysics] spawn ExileClient_construction_simulationCountDown;
|
||||
}
|
||||
else
|
||||
{
|
||||
deleteVehicle ExileClientConstructionObject;
|
||||
};
|
||||
if (ExileClientPlayerIsInCombat) then
|
||||
{
|
||||
["ErrorTitleAndText", ["Construction aborted!", "You cannot build during a combat."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
}
|
||||
else
|
||||
{
|
||||
["ErrorTitleOnly", ["Construction aborted!"]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
};
|
||||
};
|
||||
};
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
(findDisplay 46) displayRemoveEventHandler ["KeyDown", keyDownEHId];
|
||||
ExileClientConstructionObject = objNull;
|
||||
ExileClientIsInConstructionMode = false;
|
||||
ExileClientConstructionResult = 0;
|
||||
ExileClientConstructionProcess = 0;
|
||||
ExileClientConstructionLock = false;
|
||||
true
|
@ -44,6 +44,9 @@ _boundingBoxPointsBottom =
|
||||
];
|
||||
ExileClientConstructionBoundingRadius = 1 + 0.5 * ([_boundingBoxMaximum select 0, _boundingBoxMaximum select 1, 0] distance [_boundingBoxMinimum select 0, _boundingBoxMinimum select 1, 0]);
|
||||
ExileClientConstructionOffset set [1, 5 max ExileClientConstructionBoundingRadius];
|
||||
ExileClientConstructionVectorDirAndUp = [[0,0,0],[0,0,1]];
|
||||
ExileClientConstructionVectorPosASL = [0,0,0];
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
_objectColor = "#(argb,2,2,1)color(0.7,0.93,0,0.6,ca)";
|
||||
_materialColor = _objectColor;
|
||||
_simulatePhysics = false;
|
||||
@ -74,13 +77,10 @@ while {ExileClientConstructionResult isEqualTo 0} do
|
||||
case 1:
|
||||
{
|
||||
if!(_isFlag)then{
|
||||
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
|
||||
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
|
||||
_newDirAndUp = [[sin ((BuildVecYaw + (getDir player) + 360) % 360) * cos BuildVecPitch, cos ((BuildVecYaw + (getDir player) + 360) % 360) * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-((BuildVecYaw + (getDir player) + 360) % 360)] call BIS_fnc_rotateVector2D];
|
||||
_vectorDirection = _newDirAndUp select 0;
|
||||
_vectorUp = _newDirAndUp select 1;
|
||||
ExileClientConstructionObject setVectorDirAndUp [_vectorDirection,_vectorUp];
|
||||
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
|
||||
ExileClientConstructionObject setPosATL _position;
|
||||
ExileClientConstructionObject attachTo [player,ExileClientConstructionOffset];
|
||||
}else{
|
||||
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
|
||||
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
|
||||
@ -89,22 +89,16 @@ while {ExileClientConstructionResult isEqualTo 0} do
|
||||
};
|
||||
case 2:
|
||||
{
|
||||
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
|
||||
_newDirAndUp = [[sin ((BuildVecYaw + (getDir player) + 360) % 360) * cos BuildVecPitch, cos ((BuildVecYaw + (getDir player) + 360) % 360) * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-((BuildVecYaw + (getDir player) + 360) % 360)] call BIS_fnc_rotateVector2D];
|
||||
_vectorDirection = _newDirAndUp select 0;
|
||||
_vectorUp = _newDirAndUp select 1;
|
||||
ExileClientConstructionObject setVectorDirAndUp [_vectorDirection,_vectorUp];
|
||||
|
||||
_vectorUp = _newDirAndUp select 1;
|
||||
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
|
||||
_position =
|
||||
[
|
||||
(_position select 0) - ((_position select 0) % (ExileClientConstructionGrid select 0)),
|
||||
(_position select 1) - ((_position select 1) % (ExileClientConstructionGrid select 1)),
|
||||
(_position select 2) - ((_position select 2) % (ExileClientConstructionGrid select 2))
|
||||
];
|
||||
|
||||
|
||||
//_rotation = (ExileClientConstructionRotation + 360) % 360;
|
||||
//_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
];
|
||||
};
|
||||
case 3:
|
||||
{
|
||||
@ -159,6 +153,13 @@ while {ExileClientConstructionResult isEqualTo 0} do
|
||||
forEach ExileClientConstructionPossibleSnapPositions;
|
||||
};
|
||||
};
|
||||
case 4:
|
||||
{
|
||||
_position = ASLtoATL (AGLtoASL (DPBEAClientObjAttachedTo modelToWorld ExileClientConstructionOffset));
|
||||
_newDirAndUp = [[sin BuildVecYaw * cos BuildVecPitch, cos BuildVecYaw * cos BuildVecPitch, sin BuildVecPitch],[[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
|
||||
_vectorDirection = _newDirAndUp select 0;
|
||||
_vectorUp = _newDirAndUp select 1;
|
||||
};
|
||||
};
|
||||
ExileClientConstructionObject setVectorDirAndUp [_vectorDirection,_vectorUp];
|
||||
ExileClientConstructionObject setPosATL _position;
|
||||
@ -256,7 +257,10 @@ while {ExileClientConstructionResult isEqualTo 0} do
|
||||
};
|
||||
if (ExileClientConstructionStartPosition distance (getPosASL player) > 20) then
|
||||
{
|
||||
ExileClientConstructionResult = 3;
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionResult = 3;
|
||||
};
|
||||
};
|
||||
if (ExileClientPlayerIsInCombat) then
|
||||
{
|
||||
|
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* ExileClient_gui_constructionMode_update
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* © 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_display","_title","_titleControl","_description","_descriptionBackground"];
|
||||
disableSerialization;
|
||||
_display = uiNamespace getVariable "RscExileConstructionMode";
|
||||
if (!isNull _display) then
|
||||
{
|
||||
_title = "";
|
||||
switch (ExileClientConstructionMode) do
|
||||
{
|
||||
case 1: { _title = "FREE VECTOR MODE"; };
|
||||
case 2: { _title = "GRID MODE"; };
|
||||
case 3: { _title = "SNAP MODE"; };
|
||||
case 4: { _title = "OBJECT SNAP MODE"; };
|
||||
};
|
||||
if (ExileClientConstructionModePhysx) then
|
||||
{
|
||||
_title = _title + " + PHYSICS";
|
||||
};
|
||||
_titleControl = _display displayCtrl 1000;
|
||||
_titleControl ctrlSetText _title;
|
||||
_description = _display displayCtrl 1001;
|
||||
_description ctrlShow ExileClientConstructionShowHint;
|
||||
_descriptionBackground = _display displayCtrl 1002;
|
||||
_descriptionBackground ctrlShow ExileClientConstructionShowHint;
|
||||
_pos = ctrlPosition _descriptionBackground;
|
||||
_descriptionBackground ctrlSetPosition [_pos select 0,_pos select 1,_pos select 2,450 * pixelH];
|
||||
_descriptionBackground ctrlCommit 0;
|
||||
_description ctrlSetStructuredText parseText Format["<t align='left'>Free Vector Mode</t><t align='right' color='#3fd4fc'>1</t><br/> <t align='left'>Grid Mode</t><t align='right' color='#3fd4fc'>2</t><br/><t align='left'>Snap Mode</t><t align='right' color='#3fd4fc'>3</t><br/><t align='left'>Toggle Physics</t><t align='right' color='#3fd4fc'>4</t><br/><t color='#3fd4fc' align='center'>ORIGINAL</t><br/><t align='left'>Rotation</t><t align='right' color='#3fd4fc'>Q/E</t><br/><t align='left'>Elevation</t><t align='right' color='#3fd4fc'>PAGE UP/DOWN</t><br/><t align='left'>Distance</t><t align='right' color='#3fd4fc'>HOME/END</t><br/><t color='#33FF11' align='center'>DP CUSTOM</t><br/><t align='left'>Tilt and Pitch</t><t align='right' color='#3fd4fc'>Arrow Keys</t><br/><t align='left'>Rotate/Yaw</t><t align='right' color='#3fd4fc'>NUM7/NUM9</t><br/><t align='left'>Move Away/Back</t><t align='right' color='#3fd4fc'>NUM8/NUM2</t><br/><t align='left'>Move Left/Right</t><t align='right' color='#3fd4fc'>NUM4/NUM6</t><br/><t align='left'>Reset Object</t><t align='right' color='#3fd4fc'>NUM5</t><br/><t align='left'>Object Snapping</t><t align='right' color='#3fd4fc'>NUM0</t><br/><t color='#33FF11' align='center'>CUSTOM STEPPING</t><br/><t align='left'>Larger</t><t align='right' color='#3fd4fc'>SHIFT</t><br/><t align='left'>Smaller</t><t align='right' color='#3fd4fc'>CONTROL</t><br/><t align='left'>Precision</t><t align='right' color='#3fd4fc'>ALT</t><br/><t color='#33FF11' align='center'>FINISH UP</t><br/><t align='left'>Place</t><t align='right' color='#3fd4fc'>SPACE</t><br/><t align='left'>Abort</t><t align='right' color='#3fd4fc'>ESCAPE</t>"];
|
||||
};
|
||||
true
|
@ -0,0 +1,269 @@
|
||||
/**
|
||||
* ExileClient_gui_hud_event_onKeyDown
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* © 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_stopPropagation","_caller","_keyCode","_shiftState","_controlState","_altState","_grenadeName"];
|
||||
_stopPropagation = false;
|
||||
_caller = _this select 0;
|
||||
_keyCode = _this select 1;
|
||||
_shiftState = _this select 2;
|
||||
_controlState = _this select 3;
|
||||
_altState = _this select 4;
|
||||
if ((_keyCode in (actionKeys "nightVision")) && ExileClientGasMaskVisible) exitWith {true};
|
||||
if (_keyCode in (actionKeys "TacticalView")) exitWith {true};
|
||||
if (!(_controlState) && (_keyCode in (actionKeys "Throw"))) exitWith
|
||||
{
|
||||
_stopPropagation = false;
|
||||
_grenadeName = (currentThrowable player) select 0;
|
||||
if (_grenadeName isEqualTo "Exile_Item_ZipTie") then
|
||||
{
|
||||
call ExileClient_object_handcuffs_use;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
_stopPropagation
|
||||
};
|
||||
switch (_keyCode) do
|
||||
{
|
||||
case 0x29: { _stopPropagation = true; };
|
||||
case 0x0B: { _stopPropagation = true; };
|
||||
case 0x06: { _stopPropagation = true; };
|
||||
case 0x07: { _stopPropagation = true; };
|
||||
case 0x08: { _stopPropagation = true; };
|
||||
case 0x09: { _stopPropagation = true; };
|
||||
case 0x0A: { _stopPropagation = true; };
|
||||
case 0x3B: { _stopPropagation = true; };
|
||||
case 0x3C: { _stopPropagation = true; };
|
||||
case 0x3D: { _stopPropagation = true; };
|
||||
case 0x3E: { _stopPropagation = true; };
|
||||
case 0x3F: { _stopPropagation = true; };
|
||||
case 0x40: { _stopPropagation = true; };
|
||||
case 0x41: { _stopPropagation = true; };
|
||||
case 0x42: { _stopPropagation = true; };
|
||||
case 0x43: { _stopPropagation = true; };
|
||||
case 0x44: { _stopPropagation = true; };
|
||||
case 0x57: { _stopPropagation = true; };
|
||||
case 0x58: { _stopPropagation = true; };
|
||||
case 0x0E: { _stopPropagation = true; };
|
||||
case 0x02:
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x03:
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x04:
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x05:
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0xD2:
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x10:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 1;
|
||||
if(_shiftState)then{_step = 3;};
|
||||
if(_controlState)then{_step = 0.5;};
|
||||
if(_altState)then{ _step = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw - _step)min 360) max -360);
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x12:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 1;
|
||||
if(_shiftState)then{_step = 3;};
|
||||
if(_controlState)then{_step = 0.5;};
|
||||
if(_altState)then{ _step = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw + _step)min 360) max -360);
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x47:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 1;
|
||||
if(_shiftState)then{_step = 3;};
|
||||
if(_controlState)then{_step = 0.5;};
|
||||
if(_altState)then{ _step = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw - _step)min 360) max -360);
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x49:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 1;
|
||||
if(_shiftState)then{_step = 3;};
|
||||
if(_controlState)then{_step = 0.5;};
|
||||
if(_altState)then{ _step = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw + _step)min 360) max -360);
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xC9:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xD1:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x39:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xCF:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x48:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x50:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x4B:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x4D:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x4C:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x52:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xC7:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xCB:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
BuildVecRoll = (((BuildVecRoll - _step)min 360) max -360);
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xCD:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
BuildVecRoll = (((BuildVecRoll + _step)min 360) max -360);
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xC8:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
BuildVecPitch =(((BuildVecPitch - _step)min 360) max -360);
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xD0:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
BuildVecPitch = (((BuildVecPitch + _step)min 360) max -360);
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x01:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
ExileClientConstructionResult = 2;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
if (ExileIsPlayingRussianRoulette) then
|
||||
{
|
||||
if (ExileRussianRouletteCanEscape) then
|
||||
{
|
||||
["leaveRussianRouletteRequest", []] call ExileClient_system_network_send;
|
||||
ExileRussianRouletteCanEscape = false;
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
_stopPropagation
|
@ -0,0 +1,572 @@
|
||||
/**
|
||||
* ExileClient_gui_hud_event_onKeyUp
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* © 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_stopPropagation","_caller","_keyCode","_shiftState","_controlState","_altState","_posObject","_step"];
|
||||
_stopPropagation = false;
|
||||
_caller = _this select 0;
|
||||
_keyCode = _this select 1;
|
||||
_shiftState = _this select 2;
|
||||
_controlState = _this select 3;
|
||||
_altState = _this select 4;
|
||||
if (_keyCode in (actionKeys "TacticalView")) exitWith {true};
|
||||
if (_keyCode in (actionKeys "User1") && !(_keyCode isEqualTo 0x02)) exitWith
|
||||
{
|
||||
if !(ExileClientIsHandcuffed) then
|
||||
{
|
||||
call ExileClient_object_vehicle_interaction_keyLock;
|
||||
};
|
||||
true
|
||||
};
|
||||
if (_keyCode in (actionKeys "User2")) exitWith
|
||||
{
|
||||
if (ExileClientAllowPartyMarkers) then
|
||||
{
|
||||
if !(ExileClientPartyID isEqualTo -1) then
|
||||
{
|
||||
if !(ExileClientIsHandcuffed) then
|
||||
{
|
||||
call ExileClient_system_party_updateMyMarker;
|
||||
};
|
||||
};
|
||||
};
|
||||
true
|
||||
};
|
||||
switch (_keyCode) do
|
||||
{
|
||||
case 0x29:
|
||||
{
|
||||
call ExileClient_gui_hud_toggleStatsBar;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x11,
|
||||
case 0x1E,
|
||||
case 0x1F,
|
||||
case 0x20:
|
||||
{
|
||||
if (ExileClientIsAutoRunning) then
|
||||
{
|
||||
call ExileClient_system_autoRun_stop;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x0B:
|
||||
{
|
||||
if !(ExileClientIsHandcuffed) then
|
||||
{
|
||||
call ExileClient_system_autoRun_toggle;
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x08: { _stopPropagation = true; };
|
||||
case 0x09: { _stopPropagation = true; };
|
||||
case 0x0A: { _stopPropagation = true; };
|
||||
case 0x3B: { _stopPropagation = true; };
|
||||
case 0x3C: { _stopPropagation = true; };
|
||||
case 0x3D: { _stopPropagation = true; };
|
||||
case 0x3E: { _stopPropagation = true; };
|
||||
case 0x41: { _stopPropagation = true; };
|
||||
case 0x42: { _stopPropagation = true; };
|
||||
case 0x43: { _stopPropagation = true; };
|
||||
case 0x44: { _stopPropagation = true; };
|
||||
case 0x57: { _stopPropagation = true; };
|
||||
case 0x58: { _stopPropagation = true; };
|
||||
case 0x0E: { _stopPropagation = true; };
|
||||
case 0x02:
|
||||
{
|
||||
if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
ExileClientConstructionObject setObjectTextureGlobal [0, "#(argb,2,2,1)color(0.7,0.93,0,0.6,ca)"];
|
||||
ExileClientConstructionCurrentSnapToObject = objNull;
|
||||
ExileClientConstructionIsInSelectSnapObjectMode = false;
|
||||
ExileClientConstructionPossibleSnapPositions = [];
|
||||
ExileClientConstructionMode = 1;
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (primaryWeapon player != "") then
|
||||
{
|
||||
if (primaryWeapon player != currentWeapon player) then
|
||||
{
|
||||
player selectWeapon (primaryWeapon player);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x03:
|
||||
{
|
||||
if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
ExileClientConstructionObject setObjectTextureGlobal [0, "#(argb,2,2,1)color(0.7,0.93,0,0.6,ca)"];
|
||||
ExileClientConstructionCurrentSnapToObject = objNull;
|
||||
ExileClientConstructionIsInSelectSnapObjectMode = false;
|
||||
ExileClientConstructionPossibleSnapPositions = [];
|
||||
ExileClientConstructionMode = 2;
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (handgunWeapon player != "") then
|
||||
{
|
||||
if (handgunWeapon player != currentWeapon player) then
|
||||
{
|
||||
player selectWeapon (handgunWeapon player);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x04:
|
||||
{
|
||||
if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
if (ExileClientConstructionSupportSnapMode) then
|
||||
{
|
||||
if (ExileClientConstructionMode != 3) then
|
||||
{
|
||||
ExileClientConstructionCurrentSnapToObject = objNull;
|
||||
ExileClientConstructionPossibleSnapPositions = [];
|
||||
["InfoTitleAndText", ["Snap Mode", "Look at the object you want to snap to, press SPACE to lock on it and then move your object next to a snap point. Press SPACE again to place the object."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
};
|
||||
ExileClientConstructionMode = 3;
|
||||
ExileClientConstructionIsInSelectSnapObjectMode = true;
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (secondaryWeapon player != "") then
|
||||
{
|
||||
if (secondaryWeapon player != currentWeapon player) then
|
||||
{
|
||||
player selectWeapon (secondaryWeapon player);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x05:
|
||||
{
|
||||
if !(ExileClientIsHandcuffed || ExileIsPlayingRussianRoulette) then
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
if !(ExileClientConstructionKitClassName isEqualTo "Exile_Item_Flag") then
|
||||
{
|
||||
ExileClientConstructionModePhysx = !ExileClientConstructionModePhysx;
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (currentWeapon player != "") then
|
||||
{
|
||||
ExileClientPlayerHolsteredWeapon = currentWeapon player;
|
||||
player action["switchWeapon", player, player, 100];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ExileClientPlayerHolsteredWeapon != "") then
|
||||
{
|
||||
player selectWeapon ExileClientPlayerHolsteredWeapon;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x06:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
ExileClientConstructionShowHint = !ExileClientConstructionShowHint;
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
}
|
||||
else
|
||||
{
|
||||
call ExileClient_system_music_earplugs_toggle;
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x07:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
if(ExileClientConstructionLock)then
|
||||
{
|
||||
ExileClientConstructionLock = false;
|
||||
_posObject = position ExileClientConstructionObject;
|
||||
ExileClientConstructionOffset = player worldToModel _posObject;
|
||||
ExileClientConstructionRotation = (getDir ExileClientConstructionObject) - (getDir player);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExileClientConstructionLock = true;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ExileClientXM8IsVisible) then
|
||||
{
|
||||
if ("Exile_Item_XM8" in (assignedItems player)) then
|
||||
{
|
||||
if (alive player) then
|
||||
{
|
||||
[] call ExileClient_gui_xm8_show;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
case 0x39:
|
||||
{
|
||||
if (ExileIsPlayingRussianRoulette) then
|
||||
{
|
||||
if (ExileRussianRouletteCanFire) then
|
||||
{
|
||||
[] spawn ExileClient_system_russianRoulette_fire;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
if (ExileClientConstructionMode == 3) then
|
||||
{
|
||||
if (ExileClientConstructionIsInSelectSnapObjectMode) then
|
||||
{
|
||||
if !(isNull ExileClientConstructionCurrentSnapToObject) then
|
||||
{
|
||||
ExileClientConstructionIsInSelectSnapObjectMode = false;
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ExileClientConstructionCanPlaceObject) then
|
||||
{
|
||||
ExileClientConstructionResult = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ExileClientConstructionCanPlaceObject) then
|
||||
{
|
||||
ExileClientConstructionResult = 1;
|
||||
};
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
case 0x01:
|
||||
{
|
||||
if (ExileIsPlayingRussianRoulette) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
case 0x10:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x12:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x47:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x49:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x19:
|
||||
{
|
||||
if (ExileClientIsInBush) then
|
||||
{
|
||||
call ExileClient_object_bush_detach;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x31:
|
||||
{
|
||||
if!(isNull ExileClientCameraParentObject)then
|
||||
{
|
||||
if(ExileClientCameraNVG)then
|
||||
{
|
||||
camUseNVG false;
|
||||
}
|
||||
else
|
||||
{
|
||||
camUseNVG true;
|
||||
};
|
||||
ExileClientCameraNVG = !ExileClientCameraNVG;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xC9:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [2, ((((ExileClientConstructionOffset select 2) + _step) min 6) max -3) ];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [2,((ExileClientConstructionOffset select 2) + _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xD1:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [2, ((((ExileClientConstructionOffset select 2) - _step) min 6) max -3) ];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [2,((ExileClientConstructionOffset select 2) - _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xC7:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [1, (((ExileClientConstructionOffset select 1) + _step) min 6) max ExileClientConstructionBoundingRadius ];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [1,((ExileClientConstructionOffset select 1) + _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xCF:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [1, (((ExileClientConstructionOffset select 1) - _step) min 6) max ExileClientConstructionBoundingRadius ];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [1,((ExileClientConstructionOffset select 1) - _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x48:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [1, (((ExileClientConstructionOffset select 1) + _step) min 6) max ExileClientConstructionBoundingRadius ];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [1,((ExileClientConstructionOffset select 1) + _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x50:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [1, (((ExileClientConstructionOffset select 1) - _step) min 6) max ExileClientConstructionBoundingRadius ];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [1,((ExileClientConstructionOffset select 1) - _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x4B:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [0,((((ExileClientConstructionOffset select 0) - _step)min 10) max -10)];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [0,((ExileClientConstructionOffset select 0) - _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x4D:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_step = 0.5;
|
||||
if(_shiftState)then{_step = 1.5;};
|
||||
if(_controlState)then{_step = 0.1;};
|
||||
if(_altState)then{_step = 0.01;};
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionOffset set [0,((((ExileClientConstructionOffset select 0) + _step)min 10) max -10)];
|
||||
}else{
|
||||
ExileClientConstructionOffset set [0,((ExileClientConstructionOffset select 0) + _step)];
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x4C:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
ExileClientConstructionOffset = [0,5,0];
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0x52:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
if(DPBEAClientObjAttachedTo isEqualTo player)then
|
||||
{
|
||||
private _isClass = isClass(configFile >> "CfgVehicles" >> (typeOf ExileClientInteractionObject));
|
||||
private _returnItem = isText(configFile >> "CfgVehicles" >> (typeOf ExileClientInteractionObject) >> "returnItem");
|
||||
private _exileBuildable = (ExileClientInteractionObject isKindOf "Exile_Construction_Abstract_Static");
|
||||
if((_returnItem)||(_exileBuildable))then
|
||||
{
|
||||
[]spawn
|
||||
{
|
||||
disableSerialization;
|
||||
private _result = ["Do you really want to snap to this object?", "Confirm", "Yes", "Nah"] call BIS_fnc_guiMessage;
|
||||
waitUntil { !isNil "_result" };
|
||||
if (_result) then
|
||||
{
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
DPBEAClientObjAttachedTo = ExileClientInteractionObject;
|
||||
ExileClientConstructionMode = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
}else{
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
DPBEAClientObjAttachedTo = player;
|
||||
ExileClientConstructionMode = 1;
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xCB:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xCD:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xC8:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xD0:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
case 0xDB:
|
||||
{
|
||||
switch (ExilePartyEspMode) do
|
||||
{
|
||||
case 0: { ExilePartyEspMode = 1; };
|
||||
case 1: { ExilePartyEspMode = 2; };
|
||||
case 2: { ExilePartyEspMode = 0; };
|
||||
};
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
_stopPropagation
|
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* ExileClient_object_construction_move
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* © 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_object","_result"];
|
||||
disableSerialization;
|
||||
_object = _this select 0;
|
||||
setMousePosition [0.5,0.5];
|
||||
_result = ["Do you really want to move this object?", "Move?", "Yes", "Nah"] call BIS_fnc_guiMessage;
|
||||
waitUntil {uiSleep 0.05; !isNil "_result" };
|
||||
if (_result) then
|
||||
{
|
||||
if (ExileClientPlayerIsInCombat) then
|
||||
{
|
||||
["ErrorTitleAndText", ["Construction aborted!", "You cannot build during a combat."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_object isKindOf "Exile_Construction_Flag_Static") then
|
||||
{
|
||||
["ErrorTitleAndText", ["Construction aborted!", "You cannot move a Flag."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
}
|
||||
else
|
||||
{
|
||||
ExileClientConstructionPosition = getPosATL _object;
|
||||
["moveConstructionRequest", [netId _object]] call ExileClient_system_network_send;
|
||||
};
|
||||
};
|
||||
};
|
||||
true
|
@ -1,28 +0,0 @@
|
||||
/**
|
||||
* ExileClient_object_construction_network_constructionResponse
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* <20> 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*
|
||||
eXpochClient_FREE_vectorBuilding
|
||||
|
||||
Made for Anarchy, adapted to eXpoch and ported into Altis Life and Operation BlockHead by DirtySanchez
|
||||
|
||||
and NOW EXILE WILL FEEL THE FREE VECTOR, go get a job sellers of scripts, this is a modding community.
|
||||
Sharing is caring and douchebaggery is a bannable offense
|
||||
|
||||
http://DonkeyPunch.INFO
|
||||
*/
|
||||
|
||||
private["_objectNetID","_object"];
|
||||
_objectNetID = _this select 0;
|
||||
_object = objectFromNetId _objectNetID;
|
||||
ExileClientConstructionObject = _object;
|
||||
ExileClientConstructionCanPlaceObject = false;
|
||||
[] spawn ExileClient_construction_thread;
|
||||
[] call freeVectorBuilding;
|
||||
true
|
@ -0,0 +1,113 @@
|
||||
/**
|
||||
* ExileClient_util_world_canBuildHere
|
||||
*
|
||||
* Exile Mod
|
||||
* www.exilemod.com
|
||||
* <20> 2015 Exile Mod Team
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
*/
|
||||
|
||||
private["_constructionConfigName","_position","_playerUID","_result","_requiresTerritory","_canBePlacedOnRoad","_allowDuplicateSnap","_minimumDistanceToTraderZones","_minimumDistanceToSpawnZones","_minimumDistanceToOtherTerritories","_maximumTerritoryRadius","_positionObject","_nearestFlags","_radius","_buildRights","_territoryLevelConfigs","_territoryLevelConfig","_numberOfConstructionsAllowed","_numberOfObjects"];
|
||||
_constructionConfigName = _this select 0;
|
||||
_position = _this select 1;
|
||||
_playerUID = _this select 2;
|
||||
_result = 0;
|
||||
_requiresTerritory = getNumber (configFile >> "CfgConstruction" >> _constructionConfigName >> "requiresTerritory") isEqualTo 1;
|
||||
_canBePlacedOnRoad = getNumber (configFile >> "CfgConstruction" >> _constructionConfigName >> "canBePlacedOnRoad") isEqualTo 1;
|
||||
_allowDuplicateSnap = getNumber (configFile >> "CfgConstruction" >> _constructionConfigName >> "allowDuplicateSnap") isEqualTo 1;
|
||||
_minimumDistanceToTraderZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToTraderZones");
|
||||
_minimumDistanceToSpawnZones = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToSpawnZones");
|
||||
_minimumDistanceToOtherTerritories = getNumber (missionConfigFile >> "CfgTerritories" >> "minimumDistanceToOtherTerritories");
|
||||
_maximumTerritoryRadius = getNumber (missionConfigFile >> "CfgTerritories" >> "maximumRadius");
|
||||
try
|
||||
{
|
||||
if ([_position, _minimumDistanceToTraderZones] call ExileClient_util_world_isTraderZoneInRange) then
|
||||
{
|
||||
throw 4;
|
||||
};
|
||||
if ([_position, _minimumDistanceToSpawnZones] call ExileClient_util_world_isSpawnZoneInRange) then
|
||||
{
|
||||
throw 5;
|
||||
};
|
||||
if ((AGLtoASL _position) call ExileClient_util_world_isInConcreteMixerZone) then
|
||||
{
|
||||
throw 11;
|
||||
};
|
||||
if ((AGLtoASL _position) call ExileClient_util_world_isInNonConstructionZone) then
|
||||
{
|
||||
throw 10;
|
||||
};
|
||||
if ((AGLtoASL _position) call ExileClient_util_world_isInRadiatedZone) then
|
||||
{
|
||||
throw 8;
|
||||
};
|
||||
if !(_canBePlacedOnRoad) then
|
||||
{
|
||||
if (isOnRoad [_position select 0, _position select 1, 0]) then
|
||||
{
|
||||
throw 3;
|
||||
};
|
||||
};
|
||||
_numberOfObjects = 0;
|
||||
if !(_allowDuplicateSnap) then
|
||||
{
|
||||
{
|
||||
_positionObject = (ASLtoAGL (getPosASL _x));
|
||||
if (_position isEqualTo _positionObject) then
|
||||
{
|
||||
_numberOfObjects = _numberOfObjects + 1;
|
||||
if(_numberOfObjects >= 2)then{throw 7;};
|
||||
};
|
||||
}
|
||||
forEach (_position nearObjects ["Exile_Construction_Abstract_Static", 3]);
|
||||
};
|
||||
if (_constructionConfigName isEqualTo "Flag") then
|
||||
{
|
||||
if ([_position, _minimumDistanceToOtherTerritories] call ExileClient_util_world_isTerritoryInRange) then
|
||||
{
|
||||
throw 2;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_nearestFlags = (nearestObjects [_position, ["Exile_Construction_Flag_Static"], _maximumTerritoryRadius]);
|
||||
if !(_nearestFlags isEqualTo []) then
|
||||
{
|
||||
{
|
||||
_radius = _x getVariable ["ExileTerritorySize", -1];
|
||||
if (((AGLtoASL _position) distance (getPosASL _x)) < _radius) then
|
||||
{
|
||||
_buildRights = _x getVariable ["ExileTerritoryBuildRights", []];
|
||||
if (_playerUID in _buildRights) then
|
||||
{
|
||||
_territoryLevelConfigs = getArray (missionConfigFile >> "CfgTerritories" >> "prices");
|
||||
_territoryLevelConfig = _territoryLevelConfigs select ((_x getVariable ["ExileTerritoryLevel", 0]) - 1);
|
||||
_numberOfConstructionsAllowed = _territoryLevelConfig select 2;
|
||||
if ((_x getVariable ["ExileFlagStolen", 0]) isEqualTo 1) then
|
||||
{
|
||||
throw 9;
|
||||
};
|
||||
if ((_x getVariable ["ExileTerritoryNumberOfConstructions", 0]) >= _numberOfConstructionsAllowed) then
|
||||
{
|
||||
throw 6;
|
||||
};
|
||||
throw 0;
|
||||
};
|
||||
};
|
||||
throw 2;
|
||||
}
|
||||
forEach _nearestFlags;
|
||||
};
|
||||
if (_requiresTerritory) then
|
||||
{
|
||||
throw 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
catch
|
||||
{
|
||||
_result = _exception;
|
||||
};
|
||||
_result
|
@ -1,132 +0,0 @@
|
||||
/*
|
||||
eXpochClient_FREE_vectorBuilding
|
||||
|
||||
Made for Anarchy, adapted to eXpoch and ported into Altis Life and Operation BlockHead by DirtySanchez
|
||||
|
||||
and NOW EXILE WILL FEEL THE FREE VECTOR, go get a job sellers of scripts, this is a modding community.
|
||||
Sharing is caring and douchebaggery is a bannable offense
|
||||
|
||||
http://DonkeyPunch.INFO
|
||||
|
||||
The contents of this file are under the following license:
|
||||
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License
|
||||
http://creativecommons.org/licenses/by-nc-nd/4.0/
|
||||
*/
|
||||
|
||||
keyDownEHId = (findDisplay 46) displayAddEventHandler ["KeyDown", {
|
||||
params ["_dikCodeKey", "_dikCode", "_shift", "_ctrl", "_alt"];
|
||||
private _handled = false;
|
||||
private _newDirAndUp = [[ sin BuildVecYaw * cos BuildVecPitch,cos BuildVecYaw * cos BuildVecPitch,sin BuildVecPitch], [[ sin BuildVecRoll,-sin BuildVecPitch,cos BuildVecRoll * cos BuildVecPitch],-BuildVecYaw] call BIS_fnc_rotateVector2D];
|
||||
private _adjust = 1;
|
||||
|
||||
switch(_dikCode)do
|
||||
{
|
||||
case 71: {
|
||||
_adjust = 1;
|
||||
if(_shift)then{_adjust = 3;};
|
||||
if(_ctrl)then{_adjust = 0.5;};
|
||||
if(_alt)then{ _adjust = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw - _adjust)min 360) max -360);
|
||||
_handled = true;
|
||||
};
|
||||
case 73: {
|
||||
_adjust = 1;
|
||||
if(_shift)then{_adjust = 3;};
|
||||
if(_ctrl)then{_adjust = 0.5;};
|
||||
if(_alt)then{ _adjust = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw + _adjust)min 360) max -360);
|
||||
_handled = true;
|
||||
};
|
||||
case 16: {
|
||||
_adjust = 1;
|
||||
if(_shift)then{_adjust = 3;};
|
||||
if(_ctrl)then{_adjust = 0.5;};
|
||||
if(_alt)then{ _adjust = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw - _adjust)min 360) max -360);
|
||||
_handled = true;
|
||||
};
|
||||
case 18: {
|
||||
_adjust = 1;
|
||||
if(_shift)then{_adjust = 3;};
|
||||
if(_ctrl)then{_adjust = 0.5;};
|
||||
if(_alt)then{ _adjust = 0.25;};
|
||||
BuildVecYaw = (((BuildVecYaw + _adjust)min 360) max -360);
|
||||
_handled = true;
|
||||
};
|
||||
case 72: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
ExileClientConstructionOffset set [1,((((ExileClientConstructionOffset select 1) + _adjust)min 10) max -10)];
|
||||
_handled = true;
|
||||
};
|
||||
case 80: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
ExileClientConstructionOffset set [1,((((ExileClientConstructionOffset select 1) - _adjust)min 10) max -10)];
|
||||
_handled = true;
|
||||
};
|
||||
case 75: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
ExileClientConstructionOffset set [0,((((ExileClientConstructionOffset select 0) - _adjust)min 10) max -10)];
|
||||
_handled = true;
|
||||
};
|
||||
case 77: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
ExileClientConstructionOffset set [0,((((ExileClientConstructionOffset select 0) + _adjust)min 10) max -10)];
|
||||
_handled = true;
|
||||
};
|
||||
case 76: {
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
ExileClientConstructionOffset = [0,5,0];
|
||||
_handled = true;
|
||||
};
|
||||
case 14: {
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
ExileClientConstructionOffset = [0,5,0];
|
||||
_handled = true;
|
||||
};
|
||||
case 208: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
BuildVecPitch = (((BuildVecPitch + _adjust)min 360) max -360);
|
||||
_handled = true;
|
||||
};
|
||||
case 200: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
BuildVecPitch =(((BuildVecPitch - _adjust)min 360) max -360);
|
||||
_handled = true;
|
||||
};
|
||||
case 203: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
BuildVecRoll = (((BuildVecRoll - _adjust)min 360) max -360);
|
||||
_handled = true;
|
||||
};
|
||||
case 205: {
|
||||
_adjust = 0.5;
|
||||
if(_shift)then{_adjust = 1.5;};
|
||||
if(_ctrl)then{_adjust = 0.1;};
|
||||
if(_alt)then{ _adjust = 0.01;};
|
||||
BuildVecRoll = (((BuildVecRoll + _adjust)min 360) max -360);;
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
_handled;
|
||||
}];
|
@ -1,3 +0,0 @@
|
||||
if (!hasInterface || isServer) exitWith {};
|
||||
|
||||
missionNamespace setVariable ["freeVectorBuilding",(compileFinal preprocessFile "eXpochVectorBldg\eXpochClient_FREE_vectorbuilding.sqf")];
|
Reference in New Issue
Block a user