mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
0.3.9.0541
revert setVectorDirAndUp after setpos and use [0,0,0]
This commit is contained in:
parent
05bbb9a14e
commit
ed75234adb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -70,8 +70,9 @@ if (!isNull _this) then {
|
|||||||
_class = getText(_cfgBaseBuilding >> _objClass >> "staticClass");
|
_class = getText(_cfgBaseBuilding >> _objClass >> "staticClass");
|
||||||
if (_class != "") then {
|
if (_class != "") then {
|
||||||
_newObj = createVehicle[_class, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
|
_newObj = createVehicle[_class, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
|
||||||
_newObj setposATL(_worldspace select 0);
|
|
||||||
_newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
_newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
||||||
|
_newObj setposATL(_worldspace select 0);
|
||||||
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
if (_saveCheck) then {
|
if (_saveCheck) then {
|
||||||
|
@ -70,9 +70,9 @@ if (isText(_simulClassConfig)) then {
|
|||||||
if (_objSlot != -1) then {
|
if (_objSlot != -1) then {
|
||||||
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
|
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
|
||||||
};
|
};
|
||||||
|
|
||||||
_newObj setposATL (_worldspace select 0);
|
|
||||||
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
|
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
|
||||||
|
_newObj setposATL (_worldspace select 0);
|
||||||
|
|
||||||
if (_textureSlot != 0) then {
|
if (_textureSlot != 0) then {
|
||||||
[_newObj, _textureSlot, player, Epoch_personalToken] remoteExec ["EPOCH_server_paintBUILD",2];
|
[_newObj, _textureSlot, player, Epoch_personalToken] remoteExec ["EPOCH_server_paintBUILD",2];
|
||||||
};
|
};
|
||||||
@ -174,7 +174,7 @@ if (isText(_simulClassConfig)) then {
|
|||||||
} forEach _snapArrayPerp;
|
} forEach _snapArrayPerp;
|
||||||
};
|
};
|
||||||
if (_isSnap && _distance < 5) then {
|
if (_isSnap && _distance < 5) then {
|
||||||
_pos2 = AGLToASL _snapPosition;
|
_pos2 = _snapPosition;
|
||||||
_vel2 = (velocity _nearestObject);
|
_vel2 = (velocity _nearestObject);
|
||||||
_direction = getDir _nearestObject;
|
_direction = getDir _nearestObject;
|
||||||
if (_snapType == "perp") then {
|
if (_snapType == "perp") then {
|
||||||
@ -201,19 +201,16 @@ if (isText(_simulClassConfig)) then {
|
|||||||
};
|
};
|
||||||
_dir2 = [vectorDir _nearestObject, _direction] call BIS_fnc_returnVector;
|
_dir2 = [vectorDir _nearestObject, _direction] call BIS_fnc_returnVector;
|
||||||
_up2 = (vectorUp _nearestObject);
|
_up2 = (vectorUp _nearestObject);
|
||||||
EP_velocityTransformation = [_pos2,_vel2,_dir2,_up2];
|
EP_velocityTransformation = [AGLToASL _pos2,_vel2,_dir2,_up2];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (!_isSnap) then {
|
if (!_isSnap) then {
|
||||||
if !(surfaceIsWater _pos2) then {
|
|
||||||
_pos2 = ATLtoASL _pos2;
|
|
||||||
};
|
|
||||||
if (EPOCH_doRotate) then {
|
if (EPOCH_doRotate) then {
|
||||||
_vel2 = (velocity player);
|
_vel2 = (velocity player);
|
||||||
_dir2 = [vectorDir player, EPOCH_buildDirection] call BIS_fnc_returnVector;
|
_dir2 = [vectorDir player, EPOCH_buildDirection] call BIS_fnc_returnVector;
|
||||||
_up2 = (vectorUp player);
|
_up2 = (vectorUp player);
|
||||||
EPOCH_doRotate = false;
|
EPOCH_doRotate = false;
|
||||||
EP_velocityTransformation = [_pos2,_vel2,_dir2,_up2];
|
EP_velocityTransformation = [AGLToASL _pos2,_vel2,_dir2,_up2];
|
||||||
} else {
|
} else {
|
||||||
EP_velocityTransformation = [];
|
EP_velocityTransformation = [];
|
||||||
};
|
};
|
||||||
|
@ -257,9 +257,9 @@ if (_class != "") then {
|
|||||||
_snapPosition = ASLtoATL _snapPosition;
|
_snapPosition = ASLtoATL _snapPosition;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
_currentTarget setposATL _snapPosition;
|
|
||||||
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
|
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
|
||||||
|
_currentTarget setposATL _snapPosition;
|
||||||
|
|
||||||
|
|
||||||
if ((diag_tickTime - _EPOCH_2) > 2) then {
|
if ((diag_tickTime - _EPOCH_2) > 2) then {
|
||||||
_EPOCH_2 = diag_tickTime;
|
_EPOCH_2 = diag_tickTime;
|
||||||
@ -354,8 +354,9 @@ if (_class != "") then {
|
|||||||
deleteVehicle _currentTarget;
|
deleteVehicle _currentTarget;
|
||||||
_currentTarget = createVehicle[_simulClass, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
|
_currentTarget = createVehicle[_simulClass, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
_currentTarget setposATL(_worldspace select 0);
|
|
||||||
_currentTarget setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
_currentTarget setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
||||||
|
_currentTarget setposATL(_worldspace select 0);
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1 +1 @@
|
|||||||
build=540;
|
build=541;
|
||||||
|
@ -1 +1 @@
|
|||||||
build=540;
|
build=541;
|
||||||
|
@ -74,16 +74,17 @@ for "_i" from 0 to _this do {
|
|||||||
if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1) && !(_class isKindOf 'Constructions_lockedstatic_F')) then {
|
if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1) && !(_class isKindOf 'Constructions_lockedstatic_F')) then {
|
||||||
|
|
||||||
_baseObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_baseObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_baseObj setposATL _location;
|
|
||||||
_baseObj setVectorDirAndUp _worldspace;
|
_baseObj setVectorDirAndUp _worldspace;
|
||||||
|
_baseObj setposATL _location;
|
||||||
|
|
||||||
|
|
||||||
// spawn additional object for trap
|
// spawn additional object for trap
|
||||||
_ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass");
|
_ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass");
|
||||||
if(isText _ammoClass) then {
|
if(isText _ammoClass) then {
|
||||||
_ammoClass = getText _ammoClass;
|
_ammoClass = getText _ammoClass;
|
||||||
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_ammoObj setposATL _location;
|
|
||||||
_ammoObj setVectorDirAndUp _worldspace;
|
_ammoObj setVectorDirAndUp _worldspace;
|
||||||
|
_ammoObj setposATL _location;
|
||||||
_baseObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
|
_baseObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ if (isText _staticClassConfig) then {
|
|||||||
deleteVehicle _vehicle;
|
deleteVehicle _vehicle;
|
||||||
|
|
||||||
_storageObj = createVehicle[_staticClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_storageObj = createVehicle[_staticClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_storageObj setposATL _vehiclePos;
|
|
||||||
_storageObj setVectorDirAndUp _vectorDirAndUp;
|
_storageObj setVectorDirAndUp _vectorDirAndUp;
|
||||||
|
_storageObj setposATL _vehiclePos;
|
||||||
|
|
||||||
if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{
|
if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{
|
||||||
_storageObj setVariable["EPOCH_Locked", false, true];
|
_storageObj setVariable["EPOCH_Locked", false, true];
|
||||||
|
@ -29,9 +29,9 @@ _entities = allMissionObjects "Constructions_modular_F";
|
|||||||
_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
|
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
|
||||||
_newObj call EPOCH_server_buildingInit;
|
_newObj call EPOCH_server_buildingInit;
|
||||||
|
|
||||||
_newObj setposATL (_worldspace select 0);
|
|
||||||
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
||||||
|
_newObj setposATL (_worldspace select 0);
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -54,12 +54,12 @@ if (_objSlot != -1) then {
|
|||||||
if (isText _ammoClass) then {
|
if (isText _ammoClass) then {
|
||||||
_ammoClass = getText _ammoClass;
|
_ammoClass = getText _ammoClass;
|
||||||
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_ammoObj setposATL (_worldspace select 0);
|
|
||||||
_ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
_ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
||||||
|
_ammoObj setposATL (_worldspace select 0);
|
||||||
_newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
|
_newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
|
||||||
};
|
};
|
||||||
_newObj setposATL (_worldspace select 0);
|
|
||||||
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
||||||
|
_newObj setposATL (_worldspace select 0);
|
||||||
_newObj setDamage _damage;
|
_newObj setDamage _damage;
|
||||||
_return = _newObj;
|
_return = _newObj;
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Contributors:
|
Contributors:
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
Building - Unsupported building check
|
Building - Unsupported building check (unused ATM)
|
||||||
|
|
||||||
Licence:
|
Licence:
|
||||||
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
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;
|
deleteVehicle _x;
|
||||||
_newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_newObj setVariable["BUILD_SLOT", _objSlot, true];
|
_newObj setVariable["BUILD_SLOT", _objSlot, true];
|
||||||
_newObj setposASL _objectPos;
|
|
||||||
_newObj setVectorDirAndUp[_vDir, _vUP];
|
_newObj setVectorDirAndUp[_vDir, _vUP];
|
||||||
|
_newObj setposASL _objectPos;
|
||||||
_newObj setVariable["BUILD_OWNER", _playerUID, true];
|
_newObj setVariable["BUILD_OWNER", _playerUID, true];
|
||||||
_newObj setVariable["EPOCH_secureStorage", _slot];
|
_newObj setVariable["EPOCH_secureStorage", _slot];
|
||||||
_newObj setVelocity[0, 0, -1];
|
_newObj setVelocity[0, 0, -1];
|
||||||
|
@ -31,8 +31,8 @@ if (_objSlot != -1) then {
|
|||||||
_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_newObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
|
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
|
||||||
_newObj call EPOCH_server_buildingInit;
|
_newObj call EPOCH_server_buildingInit;
|
||||||
_newObj setposATL _objectPos;
|
|
||||||
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
_newObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
||||||
|
_newObj setposATL _objectPos;
|
||||||
_newObj call EPOCH_saveBuilding;
|
_newObj call EPOCH_saveBuilding;
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
@ -45,8 +45,8 @@ if (_objSlot != -1) then {
|
|||||||
deleteVehicle _object;
|
deleteVehicle _object;
|
||||||
_class = _upgrade select 0;
|
_class = _upgrade select 0;
|
||||||
_newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
_newObj = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
_newObj setposATL(_worldspace select 0);
|
|
||||||
_newObj setVectorDirAndUp[(_worldspace select 1), (_worldspace select 2)];
|
_newObj setVectorDirAndUp[(_worldspace select 1), (_worldspace select 2)];
|
||||||
|
_newObj setposATL(_worldspace select 0);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -86,14 +86,13 @@ _config = configFile >> "CfgEpoch";
|
|||||||
|
|
||||||
_ep allowDamage false;
|
_ep allowDamage false;
|
||||||
if (_dir isEqualType []) then{
|
if (_dir isEqualType []) then{
|
||||||
_ep setposATL _pos;
|
|
||||||
_ep setVectorDirAndUp _dir;
|
_ep setVectorDirAndUp _dir;
|
||||||
|
_ep setposATL _pos;
|
||||||
} else {
|
} else {
|
||||||
_ep setDir _dir;
|
_ep setDir _dir;
|
||||||
_ep setposATL _pos;
|
_ep setposATL _pos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (_deSimulate) then{
|
if (_deSimulate) then{
|
||||||
_ep enableSimulationGlobal false;
|
_ep enableSimulationGlobal false;
|
||||||
};
|
};
|
||||||
|
@ -65,11 +65,11 @@ for "_i" from 1 to _maxStorageLimit do {
|
|||||||
_location set [2, 0];
|
_location set [2, 0];
|
||||||
};
|
};
|
||||||
|
|
||||||
_vehicle = createVehicle[_class, _location, [], 0, "CAN_COLLIDE"];
|
_vehicle = createVehicle[_class, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
if (_dir isEqualType []) then {
|
if (_dir isEqualType []) then {
|
||||||
_vehicle setposATL _location;
|
|
||||||
_vehicle setVectorDirAndUp _dir;
|
_vehicle setVectorDirAndUp _dir;
|
||||||
|
_vehicle setposATL _location;
|
||||||
} else {
|
} else {
|
||||||
_vehicle setDir _dir;
|
_vehicle setDir _dir;
|
||||||
_vehicle setposATL _location;
|
_vehicle setposATL _location;
|
||||||
|
@ -20,8 +20,8 @@ if !(isNull _vehObj) then{
|
|||||||
_vehObj call EPOCH_server_setVToken;
|
_vehObj call EPOCH_server_setVToken;
|
||||||
// Set Direction and position
|
// Set Direction and position
|
||||||
if (_direction isEqualType []) then{
|
if (_direction isEqualType []) then{
|
||||||
|
_vehObj setVectorDirAndUp _direction;
|
||||||
_vehObj setposATL _position;
|
_vehObj setposATL _position;
|
||||||
_vehObj setVectorDirAndUp _direction;
|
|
||||||
} else {
|
} else {
|
||||||
_vehObj setdir _direction;
|
_vehObj setdir _direction;
|
||||||
_vehObj setposATL _position;
|
_vehObj setposATL _position;
|
||||||
|
@ -1 +1 @@
|
|||||||
build=540;
|
build=541;
|
||||||
|
@ -1 +1 @@
|
|||||||
build=540;
|
build=541;
|
||||||
|
Loading…
Reference in New Issue
Block a user