Use ShakeOnDeath instead of the hardcoded shaking for bridges

This commit is contained in:
abcdefg30
2018-05-03 17:44:43 +02:00
committed by reaperrr
parent b89e6211b2
commit 917fd2103f
5 changed files with 12 additions and 2 deletions

View File

@@ -378,7 +378,6 @@ namespace OpenRA.Mods.Common.Traits
// Use .FromPos since this actor is killed. Cannot use Target.FromActor
info.DemolishWeaponInfo.Impact(Target.FromPos(self.CenterPosition), saboteur, Enumerable.Empty<int>());
self.World.WorldActor.Trait<ScreenShaker>().AddEffect(15, self.CenterPosition, 6);
self.Kill(saboteur);
});

View File

@@ -116,7 +116,6 @@ namespace OpenRA.Mods.Common.Traits
// Use .FromPos since this actor is dead. Cannot use Target.FromActor
Info.DemolishWeaponInfo.Impact(Target.FromPos(self.CenterPosition), saboteur, Enumerable.Empty<int>());
self.World.WorldActor.Trait<ScreenShaker>().AddEffect(15, self.CenterPosition, 6);
self.Kill(saboteur);
});
}

View File

@@ -977,6 +977,9 @@
ScriptTriggers:
BodyOrientation:
QuantizedFacings: 1
ShakeOnDeath:
Duration: 15
Intensity: 6
^Crate:
Inherits@1: ^SpriteActor

View File

@@ -942,6 +942,9 @@
QuantizedFacings: 1
Interactable:
Bounds: 96,48
ShakeOnDeath:
Duration: 15
Intensity: 6
^Rock:
Inherits@1: ^SpriteActor

View File

@@ -63,6 +63,9 @@ LOBRDG_A:
ADestroyedSequences: adead
BDestroyedSequences: bdead
ABDestroyedSequences: abdead
ShakeOnDeath:
Duration: 15
Intensity: 6
LOBRDG_A_D:
Inherits: LOBRDG_A
@@ -99,6 +102,9 @@ LOBRDG_B:
ADestroyedSequences: adead
BDestroyedSequences: bdead
ABDestroyedSequences: abdead
ShakeOnDeath:
Duration: 15
Intensity: 6
LOBRDG_B_D:
Inherits: LOBRDG_B