Extend DZE_GodModeBase to built items (#1898)

This now makes buildables properly apply godmode instead of having to
wait till restart for:

* Being built
* Being upgraded
* Being downgraded
master
This commit is contained in:
oiad
2017-02-27 07:50:11 +13:00
committed by ebayShopper
parent d12fda5e21
commit ea94ec4e8b
7 changed files with 26 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ if ([_object, "Server"] call check_publishobject) then {
_key call server_hiveWrite;
if !(_object isKindOf "TrapItems") then {
if (DZE_GodModeBase) then {
if (DZE_GodModeBase && {!(_type in DZE_GodModeBaseExclude)}) then {
_object addEventHandler ["HandleDamage", {false}];
} else {
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
@@ -42,4 +42,4 @@ else {
#ifdef OBJECT_DEBUG
diag_log ("PUBLISH: *NOT* created " + (_type ) + " (not allowed)");
#endif
};
};