Unreserve reservation on death.

This commit is contained in:
Paul Chote
2011-02-24 17:17:20 +13:00
parent 0723723b30
commit fa6a98cca3
2 changed files with 7 additions and 12 deletions

View File

@@ -18,9 +18,6 @@ namespace OpenRA.Mods.RA
public class Reservable : ITick
{
Actor reservedFor;
//Actor self;
//public Reservable(Actor self) { this.self = self; }
public void Tick(Actor self)
{
@@ -33,18 +30,10 @@ namespace OpenRA.Mods.RA
public IDisposable Reserve(Actor forActor)
{
//if (reservedFor != null)
// Game.Debug("BUG: #{0} {1} was already reserved (by #{2} {3})".F(
// self.ActorID, self.Info.Name, reservedFor.ActorID, reservedFor.Info.Name));
reservedFor = forActor;
//Game.Debug("#{0} {1} reserved by #{2} {3}".F(
// self.ActorID, self.Info.Name, forActor.ActorID, forActor.Info.Name));
return new DisposableAction(() =>
{
//Game.Debug("#{0} {1} unreserved".F(
// self.ActorID, self.Info.Name));
reservedFor = null;
});
}