mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix init order problem
This commit is contained in:
parent
f8b8d7dd16
commit
270f9f3662
@ -7,7 +7,7 @@ class CfgPatches {
|
|||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_interaction"};
|
requiredAddons[] = {"ace_interaction"};
|
||||||
author[] = {"PabstMirror"};
|
author[] = {"PabstMirror"};
|
||||||
authorUrl = "https://github.com/PabstMirror/";
|
authorUrl = "https://github.com/acemod/ACE3";
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Author: PabstMirror
|
* Author: PabstMirror
|
||||||
* Function for sync module. Assigns keys for all synced vehicles to any players that are synced.
|
* For every lockable vehicle, sets the starting lock state to a sane value.
|
||||||
|
* Only run if the InitModule is placed.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Vehicle <OBJECT>
|
* 0: Vehicle <OBJECT>
|
||||||
@ -18,9 +19,10 @@
|
|||||||
PARAMS_1(_vehicle);
|
PARAMS_1(_vehicle);
|
||||||
|
|
||||||
if (!isServer) exitWith {};
|
if (!isServer) exitWith {};
|
||||||
if (GVAR(VehicleStartingLockState) == -1) exitWith {};
|
|
||||||
|
|
||||||
[{
|
[{
|
||||||
|
//If the module wasn't placed, just exit (needs to be in wait because objectInitEH is before moduleInit)
|
||||||
|
if (GVAR(VehicleStartingLockState) == -1) exitWith {};
|
||||||
private ["_lock"];
|
private ["_lock"];
|
||||||
PARAMS_1(_vehicle);
|
PARAMS_1(_vehicle);
|
||||||
if ((_vehicle isKindOf "Car") || {_vehicle isKindOf "Tank"} || {_vehicle isKindOf "Helicopter"}) then {
|
if ((_vehicle isKindOf "Car") || {_vehicle isKindOf "Tank"} || {_vehicle isKindOf "Helicopter"}) then {
|
||||||
@ -36,4 +38,4 @@ if (GVAR(VehicleStartingLockState) == -1) exitWith {};
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
//Delay call until mission start (so everyone has the eventHandler's installed)
|
//Delay call until mission start (so everyone has the eventHandler's installed)
|
||||||
}, [_vehicle], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
}, [_vehicle], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
||||||
|
Loading…
Reference in New Issue
Block a user