mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 02:46:29 +03:00
code optimization, bugs, improvements
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//create an object for default build system style
|
||||
private ["_passArray","_classname","_enableGhost","_ghost","_location","_location1","_dir","_object","_position","_objectHelper","_helperColor"];
|
||||
private ["_passArray","_classname","_enableGhost","_ghost","_location1","_dir","_object","_objectHelper","_helperColor"];
|
||||
|
||||
_classname = _this select 0;
|
||||
_ghost = _this select 1;
|
||||
@@ -7,11 +7,10 @@ _offset = _this select 2;
|
||||
_enableGhost = _this select 3; //pass false trough args if not using ghost preview
|
||||
|
||||
_passArray = [];
|
||||
_location = [0,0,0]; //create object in debug zone first
|
||||
_objectHelper = objNull;
|
||||
|
||||
// get inital players position
|
||||
_location1 = getPosATL player;
|
||||
_location1 = [player] call FNC_GetPos;
|
||||
|
||||
// if enabled, use ghost preview where available
|
||||
if (_enableGhost) then {
|
||||
@@ -20,19 +19,19 @@ if (_enableGhost) then {
|
||||
};
|
||||
};
|
||||
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; //object preview, not an actual object that will be built
|
||||
_object = createVehicle [_classname, [0,0,0], [], 0, "CAN_COLLIDE"]; //object preview, not an actual object that will be built
|
||||
|
||||
_objectHelper = "Sign_sphere10cm_EP1" createVehicle _location;
|
||||
_objectHelper = "Sign_sphere10cm_EP1" createVehicle [0,0,0];
|
||||
_helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)";
|
||||
_objectHelper setobjecttexture [0,_helperColor];
|
||||
_objectHelper attachTo [player,_offset];
|
||||
_object attachTo [_objectHelper,[0,0,0]];
|
||||
_position = getPosATL _objectHelper;
|
||||
|
||||
|
||||
if (isClass (configFile >> "SnapBuilding" >> _classname)) then {
|
||||
["","","",["Init",_object,_classname,_objectHelper]] spawn snap_build;
|
||||
};
|
||||
|
||||
_passArray = [_location1,_object,_position,_objectHelper];
|
||||
_passArray = [_location1,_object,_objectHelper];
|
||||
_passArray //[array,obj,array]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user