Added eXpochVectorBldg
This commit is contained in:
parent
4abf8c3934
commit
66fd2d6a0f
Binary file not shown.
@ -6,16 +6,6 @@ ExileClient_system_lootmanager_thread_spawn = "EBM\exileclient_system_lootmanage
|
||||
//Persistent Tree
|
||||
ExileServer_object_tree_network_chopTreeRequest="Custom\persistantTree\ExileServer_object_tree_network_chopTreeRequest.sqf";
|
||||
|
||||
//Vector Building
|
||||
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_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";
|
||||
|
||||
//Exile Revive
|
||||
ExileClient_object_player_death_startBleedingOut = "custom\EnigmaRevive\ExileClient_object_player_death_startBleedingOut.sqf"; //Happys Revive
|
||||
ExileClient_object_player_event_onInventoryOpened = "custom\EnigmaRevive\ExileClient_object_player_event_onInventoryOpened.sqf"; //Happys Revive AntiDupe ---NEW with v0.65
|
||||
@ -58,4 +48,14 @@ ExileServer_system_garbageCollector_deleteObject="custom\fixes\ExileServer_syste
|
||||
ExileServer_system_event_ambientFlyOver_start="custom\fixes\ExileServer_system_event_ambientFlyOver_start.sqf";
|
||||
|
||||
//igiload
|
||||
ExileClient_object_player_event_onEnterSafezone="custom\fixes\ExileClient_object_player_event_onEnterSafezone.sqf";
|
||||
ExileClient_object_player_event_onEnterSafezone="custom\fixes\ExileClient_object_player_event_onEnterSafezone.sqf";
|
||||
|
||||
//Vector Building
|
||||
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_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";
|
@ -0,0 +1,49 @@
|
||||
/**
|
||||
* ExileClient_construction_beginExistingObject
|
||||
*
|
||||
* 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/.
|
||||
*
|
||||
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["_previewObjectClassName"];
|
||||
if (ExileClientPlayerIsInCombat) then
|
||||
{
|
||||
["ErrorTitleAndText", ["Construction aborted!", "You cannot build during a combat."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
}
|
||||
else
|
||||
{
|
||||
ExileClientConstructionObject = _this;
|
||||
ExileClientConstructionCanPlaceObject = false;
|
||||
ExileClientConstructionConfig = ("getText(_x >> 'staticObject') == ExileClientConstructionObject" configClasses(configFile >> "CfgConstruction")) select 0;
|
||||
_previewObjectClassName = getText(ExileClientConstructionConfig >> "previewObject");
|
||||
ExileClientConstructionSnapToObjectClassNames = (ExileClientConstructionConfig >> "SnapObjects") call Bis_fnc_getCfgSubClasses;
|
||||
ExileClientConstructionProcess = 2;
|
||||
ExileClientConstructionRotation = 0;
|
||||
ExileClientConstructionObjectDisplayName = getText(configFile >> "CfgVehicles" >> _previewObjectClassName >> "displayName");
|
||||
ExileClientConstructionOffset = [0,5,0];
|
||||
DPBEAClientObjAttachedTo = player;
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
ExileClientConstructionMode = 1;
|
||||
ExileClientConstructionIsInSelectSnapObjectMode = true;
|
||||
ExileClientConstructionSupportSnapMode = count(ExileClientConstructionSnapToObjectClassNames) > 0;
|
||||
ExileClientConstructionCurrentSnapToObject = objNull;
|
||||
{
|
||||
player reveal _x;
|
||||
}
|
||||
forEach (player nearObjects ["Exile_Construction_Abstract_Static", 20]);
|
||||
["buildConstructionRequest", [_previewObjectClassName,ExileClientConstructionPosition]] call ExileClient_system_network_send;
|
||||
};
|
||||
true
|
@ -0,0 +1,59 @@
|
||||
/**
|
||||
* ExileClient_construction_beginNewObject
|
||||
*
|
||||
* 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/.
|
||||
*
|
||||
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["_kitClassName","_previewObjectClassName"];
|
||||
_kitClassName = _this select 0;
|
||||
ExileClientConstructionConfig = ("getText(_x >> 'kitMagazine') == _kitClassName" configClasses(configFile >> "CfgConstruction")) select 0;
|
||||
_previewObjectClassName = getText(ExileClientConstructionConfig >> "previewObject");
|
||||
ExileClientConstructionSnapToObjectClassNames = (ExileClientConstructionConfig >> "SnapObjects") call Bis_fnc_getCfgSubClasses;
|
||||
ExileClientConstructionProcess = 1;
|
||||
ExileClientConstructionOffset = [0, 5, 0];
|
||||
ExileClientConstructionPosition = [0, 0, 0];
|
||||
DPBEAClientObjAttachedTo = player;
|
||||
BuildVecYaw = 0;BuildVecPitch = 0;BuildVecRoll = 0;
|
||||
ExileClientConstructionRotation = 0;
|
||||
ExileClientConstructionKitClassName = _kitClassName;
|
||||
ExileClientConstructionObjectDisplayName = getText(configFile >> "CfgVehicles" >> _previewObjectClassName >> "displayName");
|
||||
if (ExileClientPlayerIsInCombat) then
|
||||
{
|
||||
["ErrorTitleAndText", ["Construction aborted!", "You cannot build during a combat."]] call ExileClient_gui_toaster_addTemplateToast;
|
||||
}
|
||||
else
|
||||
{
|
||||
ExileClientConstructionMode = 1;
|
||||
ExileClientConstructionIsInSelectSnapObjectMode = true;
|
||||
ExileClientConstructionSupportSnapMode = count(ExileClientConstructionSnapToObjectClassNames) > 0;
|
||||
ExileClientConstructionCurrentSnapToObject = objNull;
|
||||
ExileClientConstructionPosition = [getPosATL player, ExileClientConstructionOffset select 1, getDir player] call ExileClient_util_math_getPositionInDirection;
|
||||
ExileClientConstructionPosition set[2, ExileClientConstructionOffset select 2];
|
||||
{
|
||||
player reveal _x;
|
||||
}
|
||||
forEach (player nearObjects ["Exile_Construction_Abstract_Static", 20]);
|
||||
if((count _this) < 2 )then
|
||||
{
|
||||
["buildConstructionRequest", [_previewObjectClassName,ExileClientConstructionPosition]] call ExileClient_system_network_send;
|
||||
}
|
||||
else
|
||||
{
|
||||
["buildTerritoryRequest", [_previewObjectClassName, (ASLtoAGL (ATLtoASL ExileClientConstructionPosition)),_this select 1,_this select 2]] call ExileClient_system_network_send;
|
||||
};
|
||||
};
|
||||
true
|
@ -0,0 +1,279 @@
|
||||
/**
|
||||
* ExileClient_construction_thread
|
||||
*
|
||||
* 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/.
|
||||
*
|
||||
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["_boundingBox","_boundingBoxMinimum","_boundingBoxMaximum","_boundingBoxPointsTop","_boundingBoxPointsBottom","_objectColor","_materialColor","_simulatePhysics","_position","_rotation","_vectorDirection","_isFlag","_vectorUp","_potentionalSnapObject","_snapToClassName","_snapToConfig","_snapPosition","_possibleSnapPosition","_contactThreshold","_isBelowTerrain","_worldPosition","_isInAir","_numberOfContactsBottom","_startPosition","_endPosition","_newDirAndUp"];
|
||||
scriptName 'Exile Construction Thread';
|
||||
("ExileClientConstructionModeLayer" call BIS_fnc_rscLayer) cutRsc ["RscExileConstructionMode", "PLAIN", 1, false];
|
||||
ExileClientIsInConstructionMode = true;
|
||||
ExileClientConstructionResult = 0;
|
||||
ExileClientConstructionStartPosition = getPosASL player;
|
||||
_boundingBox = boundingBoxReal ExileClientConstructionObject;
|
||||
_boundingBoxMinimum = _boundingBox select 0;
|
||||
_boundingBoxMaximum = _boundingBox select 1;
|
||||
_boundingBoxPointsTop =
|
||||
[
|
||||
[_boundingBoxMinimum select 0, _boundingBoxMinimum select 1, _boundingBoxMaximum select 2],
|
||||
[_boundingBoxMinimum select 0, _boundingBoxMaximum select 1, _boundingBoxMaximum select 2],
|
||||
[_boundingBoxMaximum select 0, _boundingBoxMinimum select 1, _boundingBoxMaximum select 2],
|
||||
[_boundingBoxMaximum select 0, _boundingBoxMaximum select 1, _boundingBoxMaximum select 2]
|
||||
];
|
||||
_boundingBoxPointsBottom =
|
||||
[
|
||||
[_boundingBoxMinimum select 0, _boundingBoxMinimum select 1, _boundingBoxMinimum select 2],
|
||||
[_boundingBoxMinimum select 0, _boundingBoxMaximum select 1, _boundingBoxMinimum select 2],
|
||||
[_boundingBoxMaximum select 0, _boundingBoxMinimum select 1, _boundingBoxMinimum select 2],
|
||||
[_boundingBoxMaximum select 0, _boundingBoxMaximum select 1, _boundingBoxMinimum select 2],
|
||||
[0, 0, _boundingBoxMinimum select 2]
|
||||
];
|
||||
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;
|
||||
_position = [0, 0, 0];
|
||||
_rotation = 0;
|
||||
_vectorDirection = [0, 0, 0];
|
||||
_isFlag = ExileClientConstructionKitClassName isEqualTo "Exile_Item_Flag";
|
||||
if (_isFlag) then
|
||||
{
|
||||
ExileClientConstructionModePhysx = false;
|
||||
};
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
while {ExileClientConstructionResult isEqualTo 0} do
|
||||
{
|
||||
if (ExileClientConstructionProcess isEqualTo 1) then
|
||||
{
|
||||
if !(ExileClientConstructionKitClassName in (magazines player)) then
|
||||
{
|
||||
ExileClientConstructionResult = 2;
|
||||
};
|
||||
};
|
||||
if !(ExileClientConstructionLock) then
|
||||
{
|
||||
_vectorUp = [0, 0, 1];
|
||||
ExileClientConstructionCanPlaceObject = false;
|
||||
switch (ExileClientConstructionMode) do
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
if!(_isFlag)then{
|
||||
_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;
|
||||
}else{
|
||||
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
|
||||
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
|
||||
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
};
|
||||
};
|
||||
case 2:
|
||||
{
|
||||
_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;
|
||||
_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))
|
||||
];
|
||||
};
|
||||
case 3:
|
||||
{
|
||||
ExileClientConstructionIsSnapped = false;
|
||||
if (ExileClientConstructionIsInSelectSnapObjectMode) then
|
||||
{
|
||||
ExileClientConstructionPossibleSnapPositions = [];
|
||||
ExileClientConstructionCurrentSnapToObject = objNull;
|
||||
_position = getPosATL player;
|
||||
_position set [2, -500];
|
||||
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
|
||||
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
_potentionalSnapObject = cursorTarget;
|
||||
if !(isNull _potentionalSnapObject) then
|
||||
{
|
||||
if (_potentionalSnapObject distance player < 12) then
|
||||
{
|
||||
_snapToClassName = typeOf _potentionalSnapObject;
|
||||
if (_snapToClassName in ExileClientConstructionSnapToObjectClassNames) then
|
||||
{
|
||||
ExileClientConstructionCurrentSnapToObject = _potentionalSnapObject;
|
||||
_snapToConfig = ("getText(_x >> 'staticObject') == _snapToClassName" configClasses(configFile >> "CfgConstruction")) select 0;
|
||||
{
|
||||
_snapPosition = getArray (_snapToConfig >> "SnapPositions" >> _x);
|
||||
_possibleSnapPosition = ASLtoATL (AGLtoASL (_potentionalSnapObject modelToWorld _snapPosition));
|
||||
ExileClientConstructionPossibleSnapPositions pushBack _possibleSnapPosition;
|
||||
}
|
||||
forEach getArray (ExileClientConstructionConfig >> "SnapObjects" >> _snapToClassName >> "positions");
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_position = ASLtoATL (AGLtoASL (player modelToWorld ExileClientConstructionOffset));
|
||||
_rotation = (ExileClientConstructionRotation + (getDir player) + 360) % 360;
|
||||
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
{
|
||||
if (_x distance _position < 1) exitWith
|
||||
{
|
||||
_position = _x;
|
||||
_rotation = (ExileClientConstructionRotation + (getDir ExileClientConstructionCurrentSnapToObject) + 360) % 360;
|
||||
_vectorDirection = [sin(_rotation), cos(_rotation), 0];
|
||||
_vectorUp = vectorUp ExileClientConstructionCurrentSnapToObject;
|
||||
ExileClientConstructionIsSnapped = true;
|
||||
};
|
||||
}
|
||||
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;
|
||||
};
|
||||
_contactThreshold = 0.1;
|
||||
_isBelowTerrain = true;
|
||||
{
|
||||
_worldPosition = ASLtoATL (AGLtoASL (ExileClientConstructionObject modelToWorld _x));
|
||||
if ((_worldPosition select 2) > _contactThreshold) exitWith {_isBelowTerrain = false};
|
||||
}
|
||||
forEach _boundingBoxPointsTop;
|
||||
_isInAir = true;
|
||||
_numberOfContactsBottom = 0;
|
||||
{
|
||||
_worldPosition = ASLtoATL (AGLtoASL (ExileClientConstructionObject modelToWorld _x));
|
||||
if ((_worldPosition select 2) < _contactThreshold) then
|
||||
{
|
||||
_isInAir = false;
|
||||
};
|
||||
_startPosition = ATLtoASL[_worldPosition select 0, _worldPosition select 1, (_worldPosition select 2) + _contactThreshold];
|
||||
_endPosition = ATLtoASL [_worldPosition select 0, _worldPosition select 1, (_worldPosition select 2) - _contactThreshold];
|
||||
if (count lineIntersectsObjs[_startPosition, _endPosition, ExileClientConstructionObject, objNull, false, 2] > 0) then
|
||||
{
|
||||
_numberOfContactsBottom = _numberOfContactsBottom + 1;
|
||||
};
|
||||
}
|
||||
forEach _boundingBoxPointsBottom;
|
||||
if (_isBelowTerrain) then
|
||||
{
|
||||
ExileClientConstructionCanPlaceObject = false;
|
||||
_simulatePhysics = false;
|
||||
_objectColor = "#(argb,2,2,1)color(0.91,0,0,0.6,ca)";
|
||||
}
|
||||
else
|
||||
{
|
||||
ExileClientConstructionCanPlaceObject = true;
|
||||
if !(ExileClientConstructionModePhysx) then
|
||||
{
|
||||
_objectColor = "#(argb,2,2,1)color(0.7,0.93,0,0.6,ca)";
|
||||
_simulatePhysics = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_isInAir) then
|
||||
{
|
||||
if (_numberOfContactsBottom >= 3) then
|
||||
{
|
||||
_objectColor = "#(argb,2,2,1)color(0.7,0.93,0,0.6,ca)";
|
||||
_simulatePhysics = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
_objectColor = "#(argb,2,2,1)color(1,0.79,0.07,0.6,ca)";
|
||||
_simulatePhysics = true;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_objectColor = "#(argb,2,2,1)color(0.7,0.93,0,0.6,ca)";
|
||||
_simulatePhysics = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (ExileClientConstructionMode isEqualTo 3) then
|
||||
{
|
||||
if (!ExileClientConstructionIsSnapped) then
|
||||
{
|
||||
ExileClientConstructionCanPlaceObject = false;
|
||||
_simulatePhysics = false;
|
||||
_objectColor = "#(argb,2,2,1)color(0.91,0,0,0.6,ca)";
|
||||
};
|
||||
};
|
||||
if !(([configName ExileClientConstructionConfig, ASLtoAGL (getPosASL ExileClientConstructionObject), getPlayerUID player] call ExileClient_util_world_canBuildHere) isEqualTo 0) then
|
||||
{
|
||||
ExileClientConstructionCanPlaceObject = false;
|
||||
_simulatePhysics = false;
|
||||
_objectColor = "#(argb,2,2,1)color(0.91,0,0,0.6,ca)";
|
||||
};
|
||||
if (_isFlag) then
|
||||
{
|
||||
if (((getPos ExileClientConstructionObject) select 2) > 0.2) then
|
||||
{
|
||||
ExileClientConstructionCanPlaceObject = false;
|
||||
_simulatePhysics = false;
|
||||
_objectColor = "#(argb,2,2,1)color(0.91,0,0,0.6,ca)";
|
||||
};
|
||||
};
|
||||
if (_objectColor != _materialColor) then
|
||||
{
|
||||
ExileClientConstructionObject setObjectTextureGlobal[0, _objectColor];
|
||||
ExileClientConstructionObject setObjectTextureGlobal[1, _objectColor];
|
||||
ExileClientConstructionObject setObjectTextureGlobal[2, _objectColor];
|
||||
ExileClientConstructionObject setObjectTextureGlobal[3, _objectColor];
|
||||
_materialColor = _objectColor;
|
||||
};
|
||||
if (ExileClientConstructionStartPosition distance (getPosASL player) > 20) then
|
||||
{
|
||||
if!(ExileClientConstructionMode isEqualTo 4)then
|
||||
{
|
||||
ExileClientConstructionResult = 3;
|
||||
};
|
||||
};
|
||||
if (ExileClientPlayerIsInCombat) then
|
||||
{
|
||||
ExileClientConstructionModePhysx = true;
|
||||
ExileClientConstructionResult = 2;
|
||||
};
|
||||
uiSleep 0.001;
|
||||
};
|
||||
if !(ExileClientConstructionModePhysx) then
|
||||
{
|
||||
_simulatePhysics = false;
|
||||
};
|
||||
_simulatePhysics call ExileClient_construction_handleAbort;
|
||||
ExileClientConstructionObject = objNull;
|
||||
ExileClientIsInConstructionMode = false;
|
||||
ExileClientConstructionResult = 0;
|
||||
ExileClientConstructionProcess = 0;
|
||||
ExileClientConstructionLock = false;
|
||||
("ExileClientConstructionModeLayer" call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
|
||||
true
|
@ -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,311 @@
|
||||
/**
|
||||
* 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
|
||||
{
|
||||
if!(ExileClientConstructionMode isEqualTo 3)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;
|
||||
}
|
||||
else
|
||||
{
|
||||
_step = 45;
|
||||
if (_shiftState) then
|
||||
{
|
||||
_step = 90;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_controlState) then
|
||||
{
|
||||
_step = 22.5;
|
||||
};
|
||||
};
|
||||
ExileClientConstructionRotation = (ExileClientConstructionRotation - _step + 360) % 360;
|
||||
[] call ExileClient_gui_constructionMode_update;
|
||||
_stopPropagation = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
case 0x12:
|
||||
{
|
||||
if (ExileClientIsInConstructionMode) then
|
||||
{
|
||||
if!(ExileClientConstructionMode isEqualTo 3)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;
|
||||
}
|
||||
else
|
||||
{
|
||||
_step = 45;
|
||||
if (_shiftState) then
|
||||
{
|
||||
_step = 90;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_controlState) then
|
||||
{
|
||||
_step = 22.5;
|
||||
};
|
||||
};
|
||||
ExileClientConstructionRotation = (ExileClientConstructionRotation + _step + 360) % 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
|
@ -0,0 +1,113 @@
|
||||
/**
|
||||
* ExileClient_util_world_canBuildHere
|
||||
*
|
||||
* 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["_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,9 +1,20 @@
|
||||
|
||||
//A3XAI Client
|
||||
#include "A3XAI_Client\A3XAI_initclient.sqf";
|
||||
|
||||
if (hasInterface) then {
|
||||
//A3XAI Client
|
||||
#include "A3XAI_Client\A3XAI_initclient.sqf";
|
||||
};
|
||||
|
||||
//R3F Logistics
|
||||
[] execVM "R3F_LOG\init.sqf";
|
||||
|
||||
//igiload
|
||||
[] execVM "IgiLoad\IgiLoadInit.sqf";
|
||||
[] execVM "IgiLoad\IgiLoadInit.sqf";
|
||||
|
||||
//ST Map Gestures Server
|
||||
if (isServer) then {
|
||||
call compile preProcessFileLineNumbers "Custom\st_map_gestures\serverInit.sqf";
|
||||
};
|
||||
|
||||
if (hasInterface) then {
|
||||
call compile preprocessFileLineNumbers "Custom\st_map_gestures\clientInit.sqf";
|
||||
};
|
Loading…
Reference in New Issue
Block a user