Restart rule: Don't do anything when crew is enabled, don't remove inventory when base respawn rule is activated.

shapetextures
Clonkonaut 2015-12-10 23:37:51 +01:00
parent fa10a214b5
commit fe4fb2cad7
1 changed files with 5 additions and 3 deletions

View File

@ -7,10 +7,12 @@ public func Activate(int plr)
return;
// Remove the player's clonk, including contents.
var clonk = GetCrew(plr);
if (clonk)
if (clonk && clonk->GetCrewEnabled())
{
while (clonk->Contents())
clonk->Contents()->RemoveObject();
// Remove contents only if the Base Respawn Rule isn't there otherwise it will handle inventory
if (!ObjectCount(Find_ID(Rule_BaseRespawn)))
while (clonk->Contents())
clonk->Contents()->RemoveObject();
clonk->Kill(clonk, true);
clonk->RemoveObject();
}