ItemSpawn: Add reset function to enable re-collection of item.

liquid_container
Sven Eberhardt 2016-02-21 16:56:19 -05:00
parent e87ad1ecc1
commit 5963b9aed3
1 changed files with 12 additions and 0 deletions

View File

@ -37,6 +37,18 @@ public func SetSpawnObject(id def)
return true;
}
// Re-enable spawning for given player
public func Reset(plr)
{
if (!GetType(plr)) plr = GetPlayers(); else plr = [plr];
for (p in plr)
{
spawn_list[p] = nil;
UpdateVisibility(p);
}
return true;
}
// If called, items can only be collected by members of this team
public func SetTeam(int new_team)
{