start cleaning up reservations

This commit is contained in:
Chris Forbes
2010-08-01 11:35:26 +12:00
parent 13244d17f1
commit 5daaa99108

View File

@@ -11,8 +11,6 @@
using System;
using OpenRA.Traits;
// TODO: strip out this mechanism - it doesnt really work.
namespace OpenRA.Mods.RA
{
class ReservableInfo : TraitInfo<Reservable> { }
@@ -26,7 +24,8 @@ namespace OpenRA.Mods.RA
if (reservedFor == null)
return; /* nothing to do */
if (reservedFor.IsDead()) reservedFor = null; /* not likely to arrive now. */
if (reservedFor.IsDead() || !reservedFor.IsInWorld)
reservedFor = null; /* not likely to arrive now. */
}
public IDisposable Reserve(Actor forActor)