Browse Source

change to event system

thefloff 4 years ago
parent
commit
10cd2cbfb0

+ 2 - 0
addons - Copy/RD501_Main/functions/magclamp/fnc_startRefuel.sqf

@@ -42,6 +42,8 @@ _vehicle setVariable["RD501_mc_lastRefuelTick", _firstTick, true];
     private _target_new_fuel = ((_target_fuel + _transfer) / _maxFuelTarget);
     private _source_new_fuel = ((_source_fuel - _transfer) / _maxFuelSource);
 
+    systemChat str _transfer;
+
     _target setVariable ["RD501_mc_targetFuel", _target_new_fuel];
     ["RD501_mc_set_fuel", [], _target] call CBA_fnc_targetEvent;
 

+ 1 - 3
addons - Copy/RD501_Main/functions/magclamp/magclamp.sqf

@@ -105,10 +105,8 @@ macro_grp_fnc_name(magclamp,handle_drop_all) = {
 
 // refuel target function
 ["RD501_mc_set_fuel", {
-    systemChat str this;
-    systemChat str vehicle this;
     _vehicle = (vehicle this);
-    if (isNil _vehicle) exitWith {};
+    if (isNull _vehicle) exitWith {};
     _new_fuel = _vehicle getVariable["RD501_mc_targetFuel", 0];
     _vehicle setFuel _new_fuel;
 }, []] call CBA_fnc_addEventHandlerArgs;

+ 1 - 1
addons - Copy/RD501_Vehicles/air/LAAT/common_stuff_swop.hpp

@@ -5,7 +5,7 @@ class EventHandlers : DefaultEventhandlers
 };
 
 RD501_magclamp_small_forbidden=1;
-RD501_magclamp_large_offset={0.0,0.0,-5.0};
+RD501_magclamp_large_offset[]={0.0,0.0,-3.0};
 
 	faction = macro_republic_faction
 	editorSubcategory = macro_editor_cat_air(Republic_heli)

+ 2 - 2
addons - Copy/RD501_Vehicles/air/LAAT/common_stuff_tcw.hpp

@@ -5,7 +5,7 @@ class EventHandlers : DefaultEventhandlers
 };
 
 scope=2;
-author="RD501"
+author="RD501";
 forceInGarage = 1;
 
 faction = macro_republic_faction
@@ -13,7 +13,7 @@ editorSubcategory = macro_editor_cat_air(Republic_heli)
 vehicleClass = macro_editor_vehicle_type_air(Republic)
 
 RD501_magclamp_small_forbidden=1;
-RD501_magclamp_large_offset={0.0,0.0,-5.0};
+RD501_magclamp_large_offset[]={0.0,0.0,-3.0};
 
 weapons[] = {
 	macro_basic_air_weapons,