Skip to content

Commit

Permalink
Merge pull request #32 from Moondarker/testing
Browse files Browse the repository at this point in the history
Adjusted God mode (heal target before entering an non-changable state)
  • Loading branch information
Moondarker committed Apr 3, 2019
2 parents cce5c35 + eb0c835 commit e7d210b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ZomBerry/Addons/scripts/5_Mission/ZomBerryStockFnc.c
Expand Up @@ -148,7 +148,7 @@ class ZomberryStockFunctions {
target.GetStatWater().Set(1000);
BSMgr.RemoveAllSources();

MessagePlayer(admin, "Healed target");
if (admin) MessagePlayer(admin, "Healed target");
}

void GodTarget( string funcName, int adminId, int targetId, vector cursor ) {
Expand All @@ -164,13 +164,15 @@ class ZomberryStockFunctions {
if (listId != -1) {
target.SetAllowDamage(true);
MessagePlayer(target, "God mode deactivated");
if (adminId != targetId) MessagePlayer(admin, "Target - god mode deactivated");
if (adminId != targetId) MessagePlayer(admin, "God mode deactivated for " + target.GetIdentity().GetName());

m_godList.Remove(listId);
} else {
HealTarget("HealTarget", -1, targetId, "0 0 0");

target.SetAllowDamage(false);
MessagePlayer(target, "God mode activated");
if (adminId != targetId) MessagePlayer(admin, "Target - god mode activated");
if (adminId != targetId) MessagePlayer(admin, "God mode activated for " + target.GetIdentity().GetName());

m_godList.Insert(targetId);
}
Expand Down

0 comments on commit e7d210b

Please sign in to comment.