fix lit dynamite crash
This commit is contained in:
parent
d6e43a70ca
commit
931f3c19c7
@ -2458,6 +2458,9 @@ export class Level extends LevelInterface {
|
||||
|
||||
//update static_on_tic_tiles
|
||||
//TODO: if which on_tic happens first ever matters, this will introduce a time travel bug where the order is changed by changing tiles then undoing that. hmm
|
||||
//ignore actors (because e.g. lit_dynamite gets called every tic because it's an actor)
|
||||
if (!new_type.is_actor)
|
||||
{
|
||||
if (old_type.on_tic && !new_type.on_tic)
|
||||
{
|
||||
//search array and remove
|
||||
@ -2475,6 +2478,7 @@ export class Level extends LevelInterface {
|
||||
//add to end of array
|
||||
this.static_on_tic_tiles.push(tile);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: update circuit networks?
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user