diff --git a/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c b/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c index 2c9ee44cb..088475007 100644 --- a/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c +++ b/planet/Objects.ocd/Environment.ocd/ItemSpawn.ocd/Script.c @@ -135,6 +135,17 @@ public func OnTeamSwitch(int plr, int new_team, int old_team) } +public func OnClonkDeath(object clonk, int killed_by) +{ + // Reset spawn on clonk death + // This is odd in multi-clonk rounds with spawn points, but the alternative + // of not resetting it is probably worse because the spawned item will + // usually lie around somewhere. + var plr = clonk->GetOwner(); + if (plr >= 0) Reset(plr); +} + + /* Scenario saving */ func SaveScenarioObject(props)