mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix in fcs vehicleInit
This commit is contained in:
parent
7360277d09
commit
3568d0d72e
@ -37,3 +37,31 @@ class Extended_Init_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class Tank {
|
||||
class ADDON {
|
||||
clientInit = QUOTE(_this call FUNC(firedEH));
|
||||
};
|
||||
};
|
||||
class Car {
|
||||
class ADDON {
|
||||
clientInit = QUOTE(_this call FUNC(firedEH));
|
||||
};
|
||||
};
|
||||
class Helicopter {
|
||||
class ADDON {
|
||||
clientInit = QUOTE(_this call FUNC(firedEH));
|
||||
};
|
||||
};
|
||||
class Plane {
|
||||
class ADDON {
|
||||
clientInit = QUOTE(_this call FUNC(firedEH));
|
||||
};
|
||||
};
|
||||
class Ship_F {
|
||||
class ADDON {
|
||||
clientInit = QUOTE(_this call FUNC(firedEH));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -17,9 +17,10 @@ private "_vehicle";
|
||||
_vehicle = _this select 0;
|
||||
|
||||
{
|
||||
if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(Enabled)) == 1) then { // @todo for all turrets
|
||||
_vehicle addEventHandler ["Fired", {_this call FUNC(firedEH)}];
|
||||
private "_turretConfig";
|
||||
_turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _x] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) then {
|
||||
_vehicle setVariable [format ["%1_%2", QGVAR(Distance), _x], 0, true];
|
||||
_vehicle setVariable [format ["%1_%2", QGVAR(Magazines), _x], [], true];
|
||||
_vehicle setVariable [format ["%1_%2", QGVAR(Elevation), _x], [], true];
|
||||
@ -27,12 +28,10 @@ _vehicle = _this select 0;
|
||||
|
||||
// calculate offset between gunner camera and muzzle position
|
||||
if !(_vehicle isKindOf "Air") then {
|
||||
private ["_turretConfig", "_gunBeg", "_gunnerView", "_gunBegPos", "_gunnerViewPos", "_viewDiff"];
|
||||
private ["_gunBeg", "_gunnerView", "_gunBegPos", "_gunnerViewPos", "_viewDiff"];
|
||||
|
||||
_turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _x] call EFUNC(common,getTurretConfigPath);
|
||||
|
||||
_gunBeg = getText (_turretConfig >> "gunBeg"); // @todo player turret path
|
||||
_gunnerView = getText (_turretConfig >> "memoryPointGunnerOptics"); // @todo player turret path
|
||||
_gunBeg = getText (_turretConfig >> "gunBeg");
|
||||
_gunnerView = getText (_turretConfig >> "memoryPointGunnerOptics");
|
||||
|
||||
_gunBegPos = (_vehicle selectionPosition _gunBeg) select 0;
|
||||
_gunnerViewPos = (_vehicle selectionPosition _gunnerView) select 0;
|
||||
|
Loading…
Reference in New Issue
Block a user