mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
make use of underwater command
This commit is contained in:
parent
ffa4ad32fd
commit
aaf7b215c9
@ -28,7 +28,7 @@
|
||||
private ["_ins","_target"];
|
||||
//[[[end]]]
|
||||
params [["_distance",10], ["_lod1", "VIEW"], ["_lod2","FIRE"], ["_sort",true]];
|
||||
if (EPOCH_playerIsSwimming) then {
|
||||
if (underwater player) then {
|
||||
_ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,_distance],player,objNull,_sort,1,_lod1,_lod2];
|
||||
if (_ins isEqualTo []) exitWith { objNull };
|
||||
(_ins select 0 param [3,objNull])
|
||||
|
@ -135,7 +135,7 @@ if (_forceBloodRise) then {
|
||||
_isOnFoot = isNull objectParent player;
|
||||
if (_isOnFoot) then {
|
||||
_val = log(abs(speed player));
|
||||
_staminaThreshold = [0.7,0.3] select EPOCH_playerIsSwimming;
|
||||
_staminaThreshold = [0.7,0.3] select (underwater player);
|
||||
if (_val > _staminaThreshold) then {
|
||||
_forceStaminaDrop = true;
|
||||
};
|
||||
@ -370,7 +370,7 @@ if(_markerName in allMapMarkers)then{
|
||||
['DeathMarker'] call EPOCH_fnc_deleteLocalMarkerSet;
|
||||
};
|
||||
}else{
|
||||
{
|
||||
{
|
||||
(_x select 0) setMarkerPosLocal (position player);
|
||||
if(count(_x) >= 8)then{(_x select 0) setMarkerTextLocal (call compile (_x select 7))};
|
||||
}forEach _markerArray;
|
||||
|
@ -106,7 +106,7 @@ _increaseWet = 0;
|
||||
_wetsuit = (getText(configfile >> "cfgweapons" >> uniform player >> "itemInfo" >> "uniformType") == "Neopren");
|
||||
|
||||
if (_isOnFoot) then {
|
||||
if (EPOCH_playerIsSwimming) then {
|
||||
if (underwater player) then {
|
||||
// do nothing if player is wearing a wetsuit
|
||||
if (!_wetsuit) then {
|
||||
if (_waterTemp <= 50) then {
|
||||
|
@ -24,9 +24,6 @@ if (_outOfBounds) then {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
EPOCH_playerIsSwimming = false;
|
||||
|
||||
if !(surfaceIsWater _position) then {
|
||||
if (_nearestLocations isEqualTo []) then{
|
||||
if (count(player nearEntities["Animal_Base_F", 800]) < 2) then {
|
||||
@ -37,7 +34,6 @@ if !(surfaceIsWater _position) then {
|
||||
// spawn shark if player is deep water and not in vehicle
|
||||
if !(_isOnFoot) then{
|
||||
_offsetZ = ((_position vectorDiff getPosASL player) select 2);
|
||||
EPOCH_playerIsSwimming = (_offsetZ > 1.7);
|
||||
if (_offsetZ > 50) then {
|
||||
["GreatWhite_F", player, true] call EPOCH_unitSpawn;
|
||||
};
|
||||
|
@ -124,7 +124,6 @@ _hudConfigs = ["CfgEpochClient", "hudConfigs", []] call EPOCH_fnc_returnConfigEn
|
||||
_radioactiveLocations = ["CfgEpochClient", "radioactiveLocations", ["NameCityCapital", "NameCity", "Airport"]] call EPOCH_fnc_returnConfigEntryV2;
|
||||
|
||||
_chargeRate = 0;
|
||||
EPOCH_playerIsSwimming = false;
|
||||
|
||||
_antagonistChanceDefaults = [
|
||||
"Epoch_Cloak_F",0.07,
|
||||
|
@ -25,7 +25,6 @@ EPOCH_group_level_img = ["x\addons\a3_epoch_code\data\owner.paa", "x\addons\a3_e
|
||||
if (isNil 'EPOCH_diag_fps') then {
|
||||
EPOCH_diag_fps = 0;
|
||||
};
|
||||
EPOCH_playerIsSwimming = false;
|
||||
EPOCH_lastTrash = diag_tickTime;
|
||||
EPOCH_tradeDone = false;
|
||||
EPOCH_bankBalance = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user