From 55fa2af283000031a1904debaaa92d732e9b0445 Mon Sep 17 00:00:00 2001 From: Salbei Date: Sat, 17 Aug 2019 18:19:38 +0200 Subject: [PATCH] fixed remaining issues --- addons/trenches/CfgWorldTexture.hpp | 8 ++++++- addons/trenches/functions/fnc_addDigger.sqf | 2 -- .../functions/fnc_continueDiggingTrench.sqf | 24 +------------------ .../functions/fnc_getSurfaceTexturePath.sqf | 2 +- addons/trenches/functions/fnc_placeTrench.sqf | 5 ++-- .../trenches/functions/fnc_removeTrench.sqf | 1 - 6 files changed, 11 insertions(+), 31 deletions(-) diff --git a/addons/trenches/CfgWorldTexture.hpp b/addons/trenches/CfgWorldTexture.hpp index dfd7086444d..f826fa3b660 100644 --- a/addons/trenches/CfgWorldTexture.hpp +++ b/addons/trenches/CfgWorldTexture.hpp @@ -99,6 +99,12 @@ class CfgWorldTexture: CfgWorlds { camouflageObjects[] = {"ca\plants_E\Clutter\c_Brush_Hard_EP1.p3d"}; }; + //Livonia + class Enoch { + surfaceTextureBasePath = "A3\Map_Enoch\Data\"; + suffix = "_co.paa"; + }; + //G.O.S Al Rayak class pja310 { surfaceTextureBasePath = "mak\projetA3-10\Data"; @@ -371,7 +377,7 @@ class CfgWorldTexture: CfgWorlds { //Isla Duala class isladuala3 { surfaceTextureBasePath = "ibr\isladuala3\data"; - suffix = "detail_co.paa"; + suffix = "_co.paa"; camouflageObjects[] = {}; }; diff --git a/addons/trenches/functions/fnc_addDigger.sqf b/addons/trenches/functions/fnc_addDigger.sqf index 08f1f4c5646..93d115b7d7a 100644 --- a/addons/trenches/functions/fnc_addDigger.sqf +++ b/addons/trenches/functions/fnc_addDigger.sqf @@ -75,8 +75,6 @@ private _fnc_onFailure = { private _fnc_condition = { (_this select 0) params ["", "_trench", "_handle"]; - diag_log str (_this select 0); - if (isNil "_handle") exitWith {false}; if (count (_trench getVariable [QGVAR(diggingPlayers),[]]) <= 1) exitWith {false}; if (GVAR(stopBuildingAtFatigueMax) && {QEGVAR(advanced_fatigue,anReserve) <= 0}) exitWith {false}; diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index 7b24e99a76f..a5280165462 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -48,45 +48,24 @@ if (isNil "_vecDirAndUp") then { // Create progress bar private _fnc_onFinish = { - systemChat str (_this select 0); - diag_log str (_this select 0); (_this select 0) params ["_unit", "_trench"]; _trench setVariable [QGVAR(digging), false, true]; _trench setVariable [QGVAR(diggingType), nil, true]; _trench setVariable [QGVAR(diggingPlayers), [], true]; [QGVAR(handleDiggingServer), [_trench, _unit, false, true]] call CBA_fnc_serverEvent; - systemChat "Finish."; // Save progress global _trench setVariable [QGVAR(progress), 1, true]; // Reset animation [_unit, "", 1] call EFUNC(common,doAnimation); - - systemChat format [ - "dig: %1, Typ: %2, Players: %3, progress: %4", - _trench getVariable [QGVAR(digging), false, true], - _trench getVariable [QGVAR(diggingType), nil, true], - _trench getVariable [QGVAR(diggingPlayers), [], true], - _trench getVariable [QGVAR(progress), 1, true] - ]; - - diag_log format [ - "dig: %1, Typ: %2, Players: %3, progress: %4", - _trench getVariable [QGVAR(digging), false, true], - _trench getVariable [QGVAR(diggingType), nil, true], - _trench getVariable [QGVAR(diggingPlayers), [], true], - _trench getVariable [QGVAR(progress), 1, true] -]; - - }; + private _fnc_onFailure = { (_this select 0) params ["_unit", "_trench"]; _trench setVariable [QGVAR(digging), false, true]; _trench setVariable [QGVAR(diggingType), nil, true]; _trench setVariable [QGVAR(diggingPlayers), _trench getVariable [QGVAR(diggingPlayers),[]] - [_unit], true]; - systemChat "Failure"; // Save progress global private _progress = _trench getVariable [QGVAR(progress), 0]; @@ -134,7 +113,6 @@ if (_actualProgress == 0) then { }; if (_actualProgress >= 1) exitWith { - systemChat "PFH"; [_handle] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/trenches/functions/fnc_getSurfaceTexturePath.sqf b/addons/trenches/functions/fnc_getSurfaceTexturePath.sqf index 0753de8656b..6c79bdb3f57 100644 --- a/addons/trenches/functions/fnc_getSurfaceTexturePath.sqf +++ b/addons/trenches/functions/fnc_getSurfaceTexturePath.sqf @@ -51,7 +51,7 @@ private _result = if !(isNil QGVAR(automaticFileSetup)) then { [_surfaceType, _basePath, _suffix] call _getTexturePath; } else { private _basePath = getText (configFile >> "CfgWorldTexture" >> "Altis" >> "surfaceTextureBasePath"); - if ((_surfaceType find "#Gdt" == -1) || {worldName == "Tanoa"}) then { + if ((_surfaceType find "#Gdt" == -1) || {worldName == "Tanoa"} || {worldName == "Enoch"}) then { _basePath = getText (configFile >> "CfgWorldTexture" >> worldName >> "surfaceTextureBasePath") }; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index a9af4177da0..6906c6863cb 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -58,7 +58,6 @@ GVAR(digPFH) = [{ // Update trench position GVAR(trenchPlacementData) params ["_dx", "_dy", "_offset"]; private _basePos = _unit modelToWorld [0,2,0]; - private _angle = GVAR(digDirection) + getDir _unit; // _v1 forward from the player, _v2 to the right, _v3 points away from the ground @@ -84,8 +83,8 @@ GVAR(digPFH) = [{ #endif }; }; -// _basePos set [2, (_basePos select 2) + _minzoffset + _offset - 0.1]; - _basePos set [2, (_basePos select 2) + _minzoffset - 0.1]; + + _basePos set [2, (_basePos select 2) + _minzoffset + _offset - 0.1]; TRACE_2("",_minzoffset,_offset); _trench setPosASL _basePos; _trench setVectorDirAndUp [_v1, _v3]; diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf index 611dc5ffd3e..11364d4f529 100644 --- a/addons/trenches/functions/fnc_removeTrench.sqf +++ b/addons/trenches/functions/fnc_removeTrench.sqf @@ -17,7 +17,6 @@ * Public: No */ -systemChat str _this; params ["_trench", "_unit", ["_switchingDigger", false, [true]]]; TRACE_2("removeTrench", _trench, _unit, _switchingDigger);