This commit is contained in:
Aaron Clark
2012-11-04 20:28:50 -06:00
commit 76e9a0582e
1049 changed files with 94406 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
/***********************************************************
ASSIGN DAMAGE HANDLER TO A UNIT
- Function set_EH
- unit call set_EH;
************************************************************/
private["_unit","_eh1","_eh2","_dir","_location"];
_unit = _this;
_dir = getdir _this;
_location = getPosATL _this;
//Assign event handlers
_eh1 = _unit addeventhandler ["HandleDamage",{ _this call vehicle_handleDamage } ];
_eh2 = _unit addeventhandler ["Killed",{ _this call vehicle_handleKilled } ];
//diag_log format ["set EH %1 for vehicle:%2", _eh1, typeOf _unit ];
if (isServer) then {
_eh3 = _unit addEventHandler ["GetOut", {[(_this select 0),"all"] call server_updateObject;}];
_eh4 = _unit addEventHandler ["GetIn", {[(_this select 0),"all"] call server_updateObject;}];
};