Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed May 10, 2016
1 parent e082192 commit c30ee09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions addons/xeh/fnc_addClassEventHandler.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Parameters:
2: _eventFunc - Function to execute when event happens. <CODE>
3: _allowInheritance - Allow event for objects that only inherit from the given classname? [optional] <BOOLEAN> (default: true)
4: _excludedClasses - Exclude these classes from this event including their children [optional] <ARRAY> (default: [])
5: _applyInitRetroactivly - Apply "init" event type on existing units that have already been initilized. [optional] <BOOLEAN> ((default: false)
5: _applyInitRetroactively - Apply "init" event type on existing units that have already been initilized. [optional] <BOOLEAN> ((default: false)
Returns:
_success - Whether adding the event was successful or not. <BOOLEAN>
Expand All @@ -27,7 +27,7 @@ Author:
---------------------------------------------------------------------------- */
#include "script_component.hpp"

params [["_className", "", [""]], ["_eventName", "", [""]], ["_eventFunc", {}, [{}]], ["_allowInheritance", true, [false]], ["_excludedClasses", [], [[]]], ["_applyInitRetroactivly", false, [false]]];
params [["_className", "", [""]], ["_eventName", "", [""]], ["_eventFunc", {}, [{}]], ["_allowInheritance", true, [false]], ["_excludedClasses", [], [[]]], ["_applyInitRetroactively", false, [false]]];

private _config = configFile >> "CfgVehicles" >> _className;

Expand All @@ -50,8 +50,8 @@ if (_eventName == "FiredBIS") exitWith {
if !(_eventName in GVAR(EventsLowercase)) exitWith {false};

// don't use "apply retroactively" for non init events
if (_applyInitRetroactivly && {!(_eventName in ["init", "initpost"])}) then {
_applyInitRetroactivly = false;
if (_applyInitRetroactively && {!(_eventName in ["init", "initpost"])}) then {
_applyInitRetroactively = false;
};

// add events to already existing objects
Expand All @@ -70,7 +70,7 @@ private _eventVarName = format [QGVAR(%1), _eventName];
(_unit getVariable _eventVarName) pushBack _eventFunc;

//Run initReto now if the unit has already been initialized
if (_applyInitRetroactivly && {ISINITIALIZED(_unit)}) then {
if (_applyInitRetroactively && {ISINITIALIZED(_unit)}) then {
[_unit] call _eventFunc;
};
};
Expand Down

0 comments on commit c30ee09

Please sign in to comment.