mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
tweaks, carry static weapons
This commit is contained in:
parent
ac8ff45d44
commit
c23c0788f6
@ -18,8 +18,8 @@ private "_position";
|
|||||||
_position = getPos _this;
|
_position = getPos _this;
|
||||||
|
|
||||||
// don't place the object below the ground
|
// don't place the object below the ground
|
||||||
if (_position select 2 < 0) then {
|
if (_position select 2 < -0.1) then {
|
||||||
_position set [2, 0];
|
_position set [2, -0.1];
|
||||||
_this setPos _position;
|
_this setPos _position;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,6 +13,16 @@ class Extended_PostInit_EventHandlers {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class Extended_Init_EventHandlers {
|
class Extended_Init_EventHandlers {
|
||||||
|
class StaticWeapon {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(_this call DFUNC(initObject));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class StaticMortar {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(_this call DFUNC(initObject));
|
||||||
|
};
|
||||||
|
};
|
||||||
class ReammoBox_F {
|
class ReammoBox_F {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
init = QUOTE(_this call DFUNC(initObject));
|
init = QUOTE(_this call DFUNC(initObject));
|
||||||
|
@ -1,5 +1,35 @@
|
|||||||
|
|
||||||
class CfgVehicles {
|
class CfgVehicles {
|
||||||
|
// Static weapons
|
||||||
|
class LandVehicle;
|
||||||
|
class StaticWeapon: LandVehicle {
|
||||||
|
GVAR(canCarry) = 1;
|
||||||
|
GVAR(carryPosition[]) = {0,1.2,0};
|
||||||
|
GVAR(carryDirection) = 0;
|
||||||
|
|
||||||
|
GVAR(canDrag) = 1;
|
||||||
|
GVAR(dragPosition[]) = {0,1.2,0};
|
||||||
|
GVAR(dragDirection) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
//remove actions from Taru Pods
|
||||||
|
class Pod_Heli_Transport_04_base_F: StaticWeapon {
|
||||||
|
GVAR(canCarry) = 0;
|
||||||
|
GVAR(canDrag) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class StaticMortar;
|
||||||
|
class Mortar_01_base_F: StaticMortar {
|
||||||
|
GVAR(canCarry) = 1;
|
||||||
|
GVAR(carryPosition[]) = {0,1.2,0};
|
||||||
|
GVAR(carryDirection) = 0;
|
||||||
|
|
||||||
|
GVAR(canDrag) = 1;
|
||||||
|
GVAR(dragPosition[]) = {0,1.2,0};
|
||||||
|
GVAR(dragDirection) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ammo boxes
|
||||||
class ThingX;
|
class ThingX;
|
||||||
class ReammoBox_F: ThingX {
|
class ReammoBox_F: ThingX {
|
||||||
XEH_ENABLED;
|
XEH_ENABLED;
|
||||||
|
@ -31,6 +31,12 @@ private ["_position", "_direction"];
|
|||||||
_position = _target getVariable [QGVAR(carryPosition), [0, 0, 0]];
|
_position = _target getVariable [QGVAR(carryPosition), [0, 0, 0]];
|
||||||
_direction = _target getVariable [QGVAR(carryDirection), 0];
|
_direction = _target getVariable [QGVAR(carryDirection), 0];
|
||||||
|
|
||||||
|
// add height offset of model
|
||||||
|
private "_offset";
|
||||||
|
_offset = (_target modelToWorld [0, 0, 0] select 2) - (_unit modelToWorld [0, 0, 0] select 2);
|
||||||
|
|
||||||
|
_position = _position vectorAdd [0, 0, _offset];
|
||||||
|
|
||||||
// attach object
|
// attach object
|
||||||
_target attachTo [_unit, _position];
|
_target attachTo [_unit, _position];
|
||||||
_target setDir _direction;
|
_target setDir _direction;
|
||||||
|
@ -27,6 +27,7 @@ _inBuilding = [_unit] call FUNC(isObjectOnObject);
|
|||||||
_unit playAction "released";
|
_unit playAction "released";
|
||||||
|
|
||||||
// prevent collision damage
|
// prevent collision damage
|
||||||
|
["fixCollision", _unit, _unit] call EFUNC(common,targetEvent);
|
||||||
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
|
["fixCollision", _target, _target] call EFUNC(common,targetEvent);
|
||||||
|
|
||||||
// release object
|
// release object
|
||||||
|
@ -18,7 +18,7 @@ private ["_objectType","_actionsVarName"];
|
|||||||
_objectType = _target;
|
_objectType = _target;
|
||||||
if (typeName _target == "OBJECT") then {
|
if (typeName _target == "OBJECT") then {
|
||||||
_objectType = typeOf _target;
|
_objectType = typeOf _target;
|
||||||
};systemChat _objectType;
|
};
|
||||||
_actionsVarName = format [QGVAR(Act_%1), _objectType];
|
_actionsVarName = format [QGVAR(Act_%1), _objectType];
|
||||||
|
|
||||||
// Exit if the action menu is already compiled for this class
|
// Exit if the action menu is already compiled for this class
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
EXPLODE_2_PVT(_this,_player,_target);
|
EXPLODE_2_PVT(_this,_player,_target);
|
||||||
|
|
||||||
// Return true for static weapons if they have been fired once
|
// Return true for static weapons if they have been fired once, @todo 1.40 this work-around doesn't work anymore
|
||||||
if (_target isKindOf "StaticWeapon") exitWith {
|
if (_target isKindOf "StaticWeapon") exitWith {
|
||||||
(currentMagazine _target) != ""
|
(currentMagazine _target) != ""
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user