mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
setVectorDirAndUp after setpos
All uses of setVectorDirAndUp in arma code is after setpos not before.
This commit is contained in:
parent
dd031a6a7e
commit
d318d99a86
@ -72,9 +72,8 @@ if (!isNull _this) then {
|
||||
_class = getText(_cfgBaseBuilding >> _objClass >> "staticClass");
|
||||
if (_class != "") then {
|
||||
_newObj = createVehicle[_class, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
|
||||
_newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
||||
_newObj setposATL(_worldspace select 0);
|
||||
|
||||
_newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
||||
};
|
||||
} else {
|
||||
if (_saveCheck) then {
|
||||
|
@ -80,8 +80,9 @@ if (isText(_simulClassConfig)) then {
|
||||
if (_objSlot != -1) then {
|
||||
_newObj setVariable ["BUILD_SLOT",_objSlot,true];
|
||||
};
|
||||
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
|
||||
|
||||
_newObj setposATL (_worldspace select 0);
|
||||
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
|
||||
|
||||
if (_textureSlot != 0) then {
|
||||
[_newObj, _textureSlot, player, Epoch_personalToken] remoteExec ["EPOCH_server_paintBUILD",2];
|
||||
|
@ -287,8 +287,9 @@ if (_class != "") then {
|
||||
if (surfaceIsWater _snapPosition) then {
|
||||
_snapPosition = ASLtoATL _snapPosition;
|
||||
};
|
||||
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
|
||||
|
||||
_currentTarget setposATL _snapPosition;
|
||||
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
|
||||
|
||||
// Vector + Snapping
|
||||
if(!(_vectorUp select 0 == 0) || !(_vectorUp select 1 == 0) || !(_vectorUp select 2 == 1)) then{
|
||||
@ -408,8 +409,8 @@ if (_class != "") then {
|
||||
deleteVehicle _currentTarget;
|
||||
_currentTarget = createVehicle[_simulClass, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_currentTarget setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
||||
_currentTarget setposATL(_worldspace select 0);
|
||||
_currentTarget setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -89,8 +89,8 @@ for "_i" from 0 to _this do {
|
||||
} foreach _IndestructibleBaseObjects;
|
||||
};
|
||||
};
|
||||
_baseObj setVectorDirAndUp _worldspace;
|
||||
_baseObj setposATL _location;
|
||||
_baseObj setVectorDirAndUp _worldspace;
|
||||
|
||||
// new Dynamicsimulation
|
||||
if(["CfgDynamicSimulation", "baseDynamicSimulationSystem", true] call EPOCH_fnc_returnConfigEntryV2)then
|
||||
|
@ -56,8 +56,6 @@ if (_objSlot != -1) then {
|
||||
if (isText _ammoClass) then {
|
||||
_ammoClass = getText _ammoClass;
|
||||
_ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"];
|
||||
//_ammoObj setVectorDirAndUp [(_worldspace select 1),(_worldspace select 2)];
|
||||
//_ammoObj setposATL (_worldspace select 0);
|
||||
_ammoObj attachTo [_newObj,[0,0,0]];
|
||||
_newObj setVariable ["EPOCH_TRAP_OBJ",_ammoObj];
|
||||
};
|
||||
|
@ -19,8 +19,8 @@ if (!isNull _object && !(_class isEqualTo "")) then {
|
||||
|
||||
switch (_method) do {
|
||||
case 0: {
|
||||
_newObj setVectorDirAndUp [vectordir _object, vectorup _object];
|
||||
_newObj setPosWorld _objectPos;
|
||||
_newObj setVectorDirAndUp [vectordir _object, vectorup _object];
|
||||
};
|
||||
case 1: {
|
||||
_newObj attachTo [_object,[0,0,0]];
|
||||
|
@ -94,11 +94,11 @@ if !(_debugBox isEqualTo "") then {
|
||||
|
||||
_ep allowDamage false;
|
||||
if (_dir isEqualType []) then{
|
||||
_ep setposATL _pos;
|
||||
_ep setVectorDirAndUp _dir;
|
||||
_ep setposATL _pos;
|
||||
} else {
|
||||
_ep setDir _dir;
|
||||
_ep setposATL _pos;
|
||||
_ep setDir _dir;
|
||||
};
|
||||
|
||||
if (_deSimulate) then{
|
||||
|
@ -85,11 +85,11 @@ for "_i" from 1 to _maxStorageLimit do {
|
||||
};
|
||||
|
||||
if (_dir isEqualType []) then {
|
||||
_vehicle setposATL _location;
|
||||
_vehicle setVectorDirAndUp _dir;
|
||||
_vehicle setposATL _location;
|
||||
} else {
|
||||
_vehicle setDir _dir;
|
||||
_vehicle setposATL _location;
|
||||
_vehicle setDir _dir;
|
||||
};
|
||||
|
||||
// temp set damage to mark for maint
|
||||
|
@ -115,8 +115,8 @@ for "_i" from 1 to _maxVehicleLimit do {
|
||||
_vehicle call EPOCH_server_setVToken;
|
||||
_vehicle call EPOCH_server_vehicleInit;
|
||||
// set final direction and postion of vehicle
|
||||
_vehicle setVectorDirAndUp _worldspace;
|
||||
_vehicle setposATL _location;
|
||||
_vehicle setVectorDirAndUp _worldspace;
|
||||
|
||||
// set fuel level
|
||||
_vehicle setFuel _fuel;
|
||||
|
@ -71,8 +71,8 @@ for "_i" from 1 to _maxVehicleLimit do {
|
||||
_vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
_allVehicles pushBack _vehicle;
|
||||
_vehicle call EPOCH_server_setVToken;
|
||||
_vehicle setVectorDirAndUp _worldspace;
|
||||
_vehicle setposATL _location;
|
||||
_vehicle setVectorDirAndUp _worldspace;
|
||||
_vehicle setDamage _damage;
|
||||
|
||||
_allHitpoints = getAllHitPointsDamage _vehicle;
|
||||
|
@ -38,11 +38,11 @@ if !(isNull _vehObj) then{
|
||||
|
||||
// Set Direction and position
|
||||
if (_direction isEqualType []) then{
|
||||
_vehObj setposATL _position;
|
||||
_vehObj setVectorDirAndUp _direction;
|
||||
_vehObj setposATL _position;
|
||||
} else {
|
||||
_vehObj setdir _direction;
|
||||
_vehObj setposATL _position;
|
||||
_vehObj setdir _direction;
|
||||
};
|
||||
// Normalize vehicle inventory
|
||||
clearWeaponCargoGlobal _vehObj;
|
||||
|
@ -115,8 +115,8 @@ if (_status == 1 && _data isEqualType [] && !(_data isEqualTo [])) then {
|
||||
if (_x isEqualType [] && !(_x isEqualTo [])) then {
|
||||
_x params ["_selectedDebris","_posWorld", "_vectorDir", "_vectorUp"];
|
||||
_object = createSimpleObject [_selectedDebris, _posWorld];
|
||||
_object setVectorDirAndUp [_vectorDir,_vectorUp];
|
||||
_object setPosWorld _posWorld;
|
||||
_object setVectorDirAndUp [_vectorDir,_vectorUp];
|
||||
_debrisCounter = _debrisCounter + 1;
|
||||
};
|
||||
} forEach _debrisLocations;
|
||||
|
Loading…
Reference in New Issue
Block a user