Skip to content

Commit

Permalink
Fixed all open issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AdlerSalbei committed Dec 7, 2018
1 parent a746708 commit 13fc4da
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
5 changes: 0 additions & 5 deletions addons/trenches/functions/fnc_getSurfaceTexturePath.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,4 @@ private _result = if !(isNil QGVAR(automaticFileSetup)) then {
[_surfaceType, _basePath, getText(configFile >> "CfgWorlds" >> worldName >> "filePrefix")] call _getTexturePath;
};

if !(_result isEqualType "") then {
diag_log format ["GRAD_Trenches: Type: %1, Position: %2, WorldName: %3, SurfaceType: %4, Texture: %5", (typeof _object), (position _object), worldName, _surfaceType, _result];
_result = DEFAULT_TEXTURE;
};

_result;
14 changes: 7 additions & 7 deletions addons/trenches/functions/fnc_initTrench.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
*/

params [
["_object", objNull, [objNull]]
["_object", objNull, [objNull]]
];
if (isServer) then {
_object setVariable [QGVAR(progress), 1, true];
};

if (is3DEN) exitWith {
[_object] call FUNC(initTrench3DEN);
[_object] call FUNC(initTrench3DEN);
};

if (local _object) then {
// Has to be spawned to ensure MP compatibility
_object spawn {
private _texture = [_this] call FUNC(getSurfaceTexturePath);
_this setObjectTextureGlobal [0, _texture];
};
// Has to be spawned to ensure MP compatibility
[{
private _texture = [_this select 0] call FUNC(getSurfaceTexturePath);
(_this select 0) setObjectTextureGlobal [0, _texture];
}, [_this]] call CBA_fnc_execNextFrame;
};
2 changes: 1 addition & 1 deletion addons/trenches/functions/fnc_placeConfirm.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ _lbfc params ["", "", "_lbfcZ"];
_rtbc params ["", "", "_rtbcZ"];

private _boundingBoxOffset = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> _trenchClass >> QGVAR(boundingBoxOffset)),0];
private _posDiff = (abs(_lbfcZ) + abs(_rtbcZ)) - _boundingBoxOffset;
private _posDiff = abs _lbfcZ + abs _rtbcZ - _boundingBoxOffset;
private _newPos = _trench modelToWorldWorld [0,0, -_posDiff];
_trench setPosWorld _newPos;

Expand Down
12 changes: 6 additions & 6 deletions addons/trenches/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@
<Russian>Убираю камуфляж окопа...</Russian>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeGiantName">
<English>Envelope - Giant</English>
<German>Rund - Sehr groß</German>
<English>Trench (Envelope - Giant)</English>
<German>Schützengraben (Rund - Sehr groß)</German>
<Russian>Огромный окоп</Russian>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeGigantDescription">
Expand All @@ -272,8 +272,8 @@
<Russian>Применить камуфляж к этому окопу</Russian>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeVehicleName">
<English>Envelope - Vehicle</English>
<German>Rund - Fahrzeug</German>
<English>Trench (Envelope - Vehicle)</English>
<German>Schützengraben (Rund - Fahrzeug)</German>
<Russian>Окоп для техники</Russian>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeVehicleDescription">
Expand All @@ -287,8 +287,8 @@
<Russian>Выкопать окоп для техники</Russian>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeShortName">
<English>Envelope - Short</English>
<German>Rund - Kurz</German>
<English>Trench (Envelope - Short)</English>
<German>Schützengraben (Rund - Kurz)</German>
<Russian>Короткий окоп</Russian>
</Key>
<Key ID="STR_ACE_Trenches_EnvelopeShortDescription">
Expand Down

0 comments on commit 13fc4da

Please sign in to comment.