dan200 / Redirection

A puzzle game
GNU General Public License v3.0
52 stars 9 forks source link

Wire connection issues #44

Closed Vswe closed 9 years ago

Vswe commented 9 years ago

Not sure what happened, but I got a cast issue while making an advanced wire connection.

Game crashed with System.InvalidCastException: Unable to cast object of type 'Dan200.Game.Level.SpawnTileBehaviour' to type 'Dan200.Game.Level.WireTileBehaviour'. at Dan200.Game.Level.WireTileBehaviour.ExploreNetwork(Level level, TileCoordinates coordinates, HashSet1 o_coordinates) at Dan200.Game.Level.WireTileBehaviour.ExploreNetwork(Level level, TileCoordinates coordinates, HashSet1 o_coordinates) at Dan200.Game.Level.WireTileBehaviour.ExploreNetwork(Level level, TileCoordinates coordinates, HashSet1 o_coordinates) at Dan200.Game.Level.WireTileBehaviour.ExploreNetwork(Level level, TileCoordinates coordinates, HashSet1 o_coordinates) at Dan200.Game.Level.WireTileBehaviour.UpdateNetwork(Level level, TileCoordinates coordinates) at Dan200.Game.Level.WireTileBehaviour.OnLevelStart(Level level, TileCoordinates coordinates) at Dan200.Game.Game.LevelState.FinishLoad() at Dan200.Game.Game.LevelState.OnPreInit(State previous) at Dan200.Game.Game.InGameState.OnPreInit(State previous) at Dan200.Game.Game.TestState.OnPreInit(State previous) at Dan200.Game.Game.Game.Update(Single dt) at Dan200.Core.Main.App.Run[TGame](GameInfo info, String[] args)

Vswe commented 9 years ago

Found out when it happened. It's when a button (or wires connected to a button) is connected to the spawn point of any robot (even the gray blocks).

dan200 commented 9 years ago

Can you post a screenshot of a level that will exhibit this bug? Using vanilla tiles if you can

Vswe commented 9 years ago

This is the smallest setup I can make that makes it crash. I'm still not entirely sure when it happens.

2014-11-02t18-42-46

dan200 commented 9 years ago

Fixed in 0.6.5