OpenRA / ra2

A Red Alert 2 mod for the OpenRA game engine
GNU General Public License v3.0
973 stars 161 forks source link

Allow Spy to Disguise as Certain Units Without Crash #762

Open WilliamWsyHK opened 3 years ago

WilliamWsyHK commented 3 years ago

I tried to disguised the Spy as Rocketeers, but of course it would fail because IIRC in the original game it just pretend to be walk on the ground, but it gives exception instead.

Exception of type `System.InvalidOperationException`: Unit `spy` does not have a sequence named `fly`
    at OpenRA.Graphics.SequenceProvider.GetSequence(String unitName, String sequenceName)
    at OpenRA.Graphics.Animation.PlaySequence(String sequenceName)
    at OpenRA.Graphics.Animation.PlayRepeating(String sequenceName)
    at OpenRA.Mods.Common.Traits.Render.WithInfantryBody.Tick(Actor self)
    at OpenRA.WorldUtils.DoTimed[T](IEnumerable`1 e, Action`1 a, String text)
    at OpenRA.World.Tick()
    at OpenRA.Game.InnerLogicTick(OrderManager orderManager)
    at OpenRA.Game.LogicTick()
    at OpenRA.Game.Loop()
    at OpenRA.Game.Run()
    at OpenRA.Game.InitializeAndRun(String[] args)
    at OpenRA.Program.Main(String[] args)

We should be allowed for spy to disguise as certain units, without any crashes. (Disguise ready)

vgaming commented 3 years ago

Confirming, I just got a similar

Exception of type `System.InvalidOperationException`: Unit `spy` does not have a sequence named `idle-air`
  at OpenRA.Graphics.SequenceProvider.GetSequence (System.String unitName, System.String sequenceName) [0x00057] in <2f36d06c9a324d228639d627cc054bbb>:0 
  at OpenRA.Graphics.Animation.GetSequence (System.String sequenceName) [0x0000c] in <2f36d06c9a324d228639d627cc054bbb>:0 
  at OpenRA.Graphics.Animation.PlaySequence (System.String sequenceName) [0x00000] in <2f36d06c9a324d228639d627cc054bbb>:0 
Mailaender commented 3 years ago

https://github.com/OpenRA/OpenRA/pull/17742 might have already fixed that.

testman42 commented 2 years ago

just encountered this

Platform is Linux
Engine version is release-20210321
Using SDL 2 with OpenGL (Modern) renderer
Desktop resolution: 1920x1080
No custom resolution provided, using desktop resolution
Using resolution: 1920x1080
Using window scale 1.00
OpenGL renderer: AMD Radeon (TM) R7 M340 (ICELAND, DRM 3.42.0, 5.14.10-1-MANJARO, LLVM 12.0.1)
OpenGL version: 4.6 (Core Profile) Mesa 21.2.3
Using default sound device
Internal mods:
    ra2: Red Alert 2 ({DEV_VERSION})
    all: All mods (release-20210321)
    ra: Red Alert (release-20210321)
    modcontent: Mod Content Manager (release-20210321)
    d2k: Dune 2000 (release-20210321)
    ts: Tiberian Sun (release-20210321)
    cnc: Tiberian Dawn (release-20210321)
External mods:
    ra2-{DEV_VERSION}: Red Alert 2 ({DEV_VERSION})
Loading mod: ra2
System.Net.Sockets.SocketOptionName 0x17 is not supported at IP level
[2021-10-21T20:04:05] Game started
Exception of type `System.InvalidOperationException`: Unit `spy` does not have a sequence named `fly`
  at OpenRA.Graphics.SequenceProvider.GetSequence (System.String unitName, System.String sequenceName) [0x0005d] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Graphics/SequenceProvider.cs:78 
  at OpenRA.Graphics.Animation.GetSequence (System.String sequenceName) [0x00000] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Graphics/Animation.cs:234 
  at OpenRA.Graphics.Animation.PlaySequence (System.String sequenceName) [0x00000] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Graphics/Animation.cs:115 
  at OpenRA.Graphics.Animation.PlayRepeating (System.String sequenceName) [0x0000e] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Graphics/Animation.cs:123 
  at OpenRA.Mods.Common.Traits.Render.WithInfantryBody.Tick (OpenRA.Actor self) [0x0005e] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs:188 
  at OpenRA.Mods.Cnc.Traits.Render.WithDisguisingInfantryBody.Tick (OpenRA.Actor self) [0x00137] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Mods.Cnc/Traits/Render/WithDisguisingInfantryBody.cs:75 
  at OpenRA.Mods.Common.Traits.Render.WithInfantryBody.OpenRA.Traits.ITick.Tick (OpenRA.Actor self) [0x00000] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs:172 
  at OpenRA.World+<>c.<Tick>b__112_0 (OpenRA.Actor actor, OpenRA.Traits.ITick trait) [0x00000] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/World.cs:439 
  at OpenRA.TraitDictionary+TraitContainer`1[T].ApplyToAllTimed (System.Action`2[T1,T2] action, System.String text) [0x0002b] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/TraitDictionary.cs:307 
  at OpenRA.TraitDictionary.ApplyToActorsWithTraitTimed[T] (System.Action`2[T1,T2] action, System.String text) [0x00000] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/TraitDictionary.cs:134 
  at OpenRA.World.ApplyToActorsWithTraitTimed[T] (System.Action`2[T1,T2] action, System.String text) [0x00000] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/World.cs:512 
  at OpenRA.World.Tick () [0x00172] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/World.cs:439 
  at OpenRA.Game.InnerLogicTick (OpenRA.Network.OrderManager orderManager) [0x001bc] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Game.cs:620 
  at OpenRA.Game.LogicTick () [0x0003e] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Game.cs:646 
  at OpenRA.Game.Loop () [0x000f1] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Game.cs:811 
  at OpenRA.Game.Run () [0x0003c] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Game.cs:852 
  at OpenRA.Game.InitializeAndRun (System.String[] args) [0x00010] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Game/Game.cs:274 
  at OpenRA.Launcher.Program.Main (System.String[] args) [0x00044] in /home/testman/Games/openra-ra2/ra2/engine/OpenRA.Launcher/Program.cs:30 

AL lib: FreeContext: (0x5578773382a0) Deleting 32 Source(s)
mfzl commented 2 years ago

Any workarounds for this, we just had a crash middle of a game.

On a tangential note, how does one get started with development (on Linux)? I didn't find too much information in the book and contribution guide.

Mailaender commented 2 years ago

There is a patch at https://github.com/OpenRA/ra2/pull/786 which has not yet been integrated.

Mailaender commented 2 years ago

The https://github.com/OpenRA/ra2/wiki should get you started. Ignore the book as it is incomplete and unmaintained.

testman42 commented 11 months ago

just got

Exception of type `System.InvalidOperationException`: Unit `spy` does not have a sequence named `idle-air`

with ra2 built from commit 2a29249da1a4fe40f24a3ccf76ad338c5302a05b