0.3.9.0541

revert setVectorDirAndUp after setpos and use [0,0,0]
This commit is contained in:
vbawol 2016-06-25 08:35:36 -05:00
parent 05bbb9a14e
commit ed75234adb
43 changed files with 32 additions and 33 deletions

View File

@ -70,8 +70,9 @@ if (!isNull _this) then {
_class = getText(_cfgBaseBuilding >> _objClass >> "staticClass");
if (_class != "") then {
_newObj = createVehicle[_class, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
_newObj setposATL(_worldspace select 0);
_newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
_newObj setposATL(_worldspace select 0);
};
} else {
if (_saveCheck) then {

View File

@ -70,9 +70,9 @@ if (isText(_simulClassConfig)) then {
if (_objSlot != -1) then {
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
};
_newObj setposATL (_worldspace select 0);
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
_newObj setposATL (_worldspace select 0);
if (_textureSlot != 0) then {
[_newObj, _textureSlot, player, Epoch_personalToken] remoteExec ["EPOCH_server_paintBUILD",2];
};
@ -174,7 +174,7 @@ if (isText(_simulClassConfig)) then {
} forEach _snapArrayPerp;
};
if (_isSnap && _distance < 5) then {
_pos2 = AGLToASL _snapPosition;
_pos2 = _snapPosition;
_vel2 = (velocity _nearestObject);
_direction = getDir _nearestObject;
if (_snapType == "perp") then {
@ -201,19 +201,16 @@ if (isText(_simulClassConfig)) then {
};
_dir2 = [vectorDir _nearestObject, _direction] call BIS_fnc_returnVector;
_up2 = (vectorUp _nearestObject);
EP_velocityTransformation = [_pos2,_vel2,_dir2,_up2];
EP_velocityTransformation = [AGLToASL _pos2,_vel2,_dir2,_up2];
};
};
if (!_isSnap) then {
if !(surfaceIsWater _pos2) then {
_pos2 = ATLtoASL _pos2;
};
if (EPOCH_doRotate) then {
_vel2 = (velocity player);
_dir2 = [vectorDir player, EPOCH_buildDirection] call BIS_fnc_returnVector;
_up2 = (vectorUp player);
EPOCH_doRotate = false;
EP_velocityTransformation = [_pos2,_vel2,_dir2,_up2];
EP_velocityTransformation = [AGLToASL _pos2,_vel2,_dir2,_up2];
} else {
EP_velocityTransformation = [];
};

View File

@ -257,9 +257,9 @@ if (_class != "") then {
_snapPosition = ASLtoATL _snapPosition;
};
_currentTarget setposATL _snapPosition;
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
_currentTarget setposATL _snapPosition;
if ((diag_tickTime - _EPOCH_2) > 2) then {
_EPOCH_2 = diag_tickTime;
@ -354,8 +354,9 @@ if (_class != "") then {
deleteVehicle _currentTarget;
_currentTarget = createVehicle[_simulClass, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
_currentTarget setposATL(_worldspace select 0);
_currentTarget setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
_currentTarget setposATL(_worldspace select 0);
};
};
};

View File

@ -1 +1 @@
build=540;
build=541;

View File

@ -1 +1 @@
build=540;
build=541;

View File

@ -74,16 +74,17 @@ for "_i" from 0 to _this do {
if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1) && !(_class isKindOf 'Constructions_lockedstatic_F')) then {
_baseObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
_baseObj setposATL _location;
_baseObj setVectorDirAndUp _worldspace;
_baseObj setposATL _location;
// spawn additional object for trap
_ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass");
if(isText _ammoClass) then {
_ammoClass = getText _ammoClass;
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
_ammoObj setposATL _location;
_ammoObj setVectorDirAndUp _worldspace;
_ammoObj setposATL _location;
_baseObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
};

View File

@ -41,8 +41,8 @@ if (isText _staticClassConfig) then {
deleteVehicle _vehicle;
_storageObj = createVehicle[_staticClass, [0,0,0], [], 0, "CAN_COLLIDE"];
_storageObj setposATL _vehiclePos;
_storageObj setVectorDirAndUp _vectorDirAndUp;
_storageObj setposATL _vehiclePos;
if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{
_storageObj setVariable["EPOCH_Locked", false, true];

View File

@ -29,9 +29,9 @@ _entities = allMissionObjects "Constructions_modular_F";
_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
_newObj call EPOCH_server_buildingInit;
_newObj setposATL (_worldspace select 0);
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
_newObj setposATL (_worldspace select 0);
};
};
};

View File

@ -54,12 +54,12 @@ if (_objSlot != -1) then {
if (isText _ammoClass) then {
_ammoClass = getText _ammoClass;
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
_ammoObj setposATL (_worldspace select 0);
_ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
_ammoObj setposATL (_worldspace select 0);
_newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
};
_newObj setposATL (_worldspace select 0);
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
_newObj setposATL (_worldspace select 0);
_newObj setDamage _damage;
_return = _newObj;
};

View File

@ -4,7 +4,7 @@
Contributors:
Description:
Building - Unsupported building check
Building - Unsupported building check (unused ATM)
Licence:
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
@ -45,8 +45,8 @@ _stableCount = 0;
deleteVehicle _x;
_newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
_newObj setVariable["BUILD_SLOT", _objSlot, true];
_newObj setposASL _objectPos;
_newObj setVectorDirAndUp[_vDir, _vUP];
_newObj setposASL _objectPos;
_newObj setVariable["BUILD_OWNER", _playerUID, true];
_newObj setVariable["EPOCH_secureStorage", _slot];
_newObj setVelocity[0, 0, -1];

View File

@ -31,8 +31,8 @@ if (_objSlot != -1) then {
_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
_newObj call EPOCH_server_buildingInit;
_newObj setposATL _objectPos;
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
_newObj setposATL _objectPos;
_newObj call EPOCH_saveBuilding;
};
} else {
@ -45,8 +45,8 @@ if (_objSlot != -1) then {
deleteVehicle _object;
_class = _upgrade select 0;
_newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
_newObj setposATL(_worldspace select 0);
_newObj setVectorDirAndUp[(_worldspace select 1), (_worldspace select 2)];
_newObj setposATL(_worldspace select 0);
};
};
};

View File

@ -86,14 +86,13 @@ _config = configFile >> "CfgEpoch";
_ep allowDamage false;
if (_dir isEqualType []) then{
_ep setposATL _pos;
_ep setVectorDirAndUp _dir;
_ep setposATL _pos;
} else {
_ep setDir _dir;
_ep setposATL _pos;
};
if (_deSimulate) then{
_ep enableSimulationGlobal false;
};

View File

@ -65,11 +65,11 @@ for "_i" from 1 to _maxStorageLimit do {
_location set [2, 0];
};
_vehicle = createVehicle[_class, _location, [], 0, "CAN_COLLIDE"];
_vehicle = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
if (_dir isEqualType []) then {
_vehicle setposATL _location;
_vehicle setVectorDirAndUp _dir;
_vehicle setposATL _location;
} else {
_vehicle setDir _dir;
_vehicle setposATL _location;

View File

@ -20,8 +20,8 @@ if !(isNull _vehObj) then{
_vehObj call EPOCH_server_setVToken;
// Set Direction and position
if (_direction isEqualType []) then{
_vehObj setVectorDirAndUp _direction;
_vehObj setposATL _position;
_vehObj setVectorDirAndUp _direction;
} else {
_vehObj setdir _direction;
_vehObj setposATL _position;

View File

@ -1 +1 @@
build=540;
build=541;

View File

@ -1 +1 @@
build=540;
build=541;

View File

@ -1 +1 @@
540
541