From 67b3442d17dda3bfbff7d27c2c9a9496228a746c Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 11 Feb 2015 23:49:41 +0100 Subject: [PATCH] getting the fcs to work in MP --- addons/fcs/CfgEventHandlers.hpp | 38 ++++++++++++++++++++++++---- addons/fcs/functions/fnc_firedEH.sqf | 2 +- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/addons/fcs/CfgEventHandlers.hpp b/addons/fcs/CfgEventHandlers.hpp index 409267a8c8..961a05b27d 100644 --- a/addons/fcs/CfgEventHandlers.hpp +++ b/addons/fcs/CfgEventHandlers.hpp @@ -13,27 +13,55 @@ class Extended_PostInit_EventHandlers { class Extended_Init_EventHandlers { class Tank { class ADDON { - clientInit = QUOTE(_this call FUNC(vehicleInit)); + serverInit = QUOTE(_this call FUNC(vehicleInit)); }; }; class Car { class ADDON { - clientInit = QUOTE(_this call FUNC(vehicleInit)); + serverInit = QUOTE(_this call FUNC(vehicleInit)); }; }; class Helicopter { class ADDON { - clientInit = QUOTE(_this call FUNC(vehicleInit)); + serverInit = QUOTE(_this call FUNC(vehicleInit)); }; }; class Plane { class ADDON { - clientInit = QUOTE(_this call FUNC(vehicleInit)); + serverInit = QUOTE(_this call FUNC(vehicleInit)); }; }; class Ship_F { class ADDON { - clientInit = QUOTE(_this call FUNC(vehicleInit)); + serverInit = QUOTE(_this call FUNC(vehicleInit)); + }; + }; +}; + +class Extended_Respawn_EventHandlers { + class Tank { + class ADDON { + respawn = QUOTE(_this call FUNC(vehicleInit)); + }; + }; + class Car { + class ADDON { + respawn = QUOTE(_this call FUNC(vehicleInit)); + }; + }; + class Helicopter { + class ADDON { + respawn = QUOTE(_this call FUNC(vehicleInit)); + }; + }; + class Plane { + class ADDON { + respawn = QUOTE(_this call FUNC(vehicleInit)); + }; + }; + class Ship_F { + class ADDON { + respawn = QUOTE(_this call FUNC(vehicleInit)); }; }; }; diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index a0b10795cf..22371a26f4 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -25,7 +25,7 @@ private ["_gunner", "_turret"]; _gunner = [_vehicle, _weapon] call EFUNC(common,getGunner); _turret = [_gunner] call EFUNC(common,getTurretIndex); -if (ACE_player != _gunner) exitWith {}; +//if (ACE_player != _gunner) exitWith {}; // global private ["_FCSMagazines", "_FCSElevation", "_offset"];