Fix Wanders to be usable on its own

Allows unarmed actors like civilians or harmless critters to wander around when idle.

Additionally made it upgradable.
This commit is contained in:
reaperrr
2016-06-25 12:45:58 +02:00
parent c643a0abd6
commit 09e365bc4a
3 changed files with 20 additions and 10 deletions

View File

@@ -149,7 +149,7 @@ namespace OpenRA.Mods.D2k.Activities
sandworm.IsAttacking = false;
// There is a chance that the worm would just go away after attacking
if (self.World.SharedRandom.Next(100) <= sandworm.Info.ChanceToDisappear)
if (self.World.SharedRandom.Next(100) <= sandworm.WormInfo.ChanceToDisappear)
{
self.CancelActivity();
self.World.AddFrameEndTask(w => self.Dispose());