mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-07 09:27:51 +07:00
Fixed #8185
This commit is contained in:
parent
66f4118896
commit
f6c97f4ff6
@ -206,7 +206,7 @@ public class EntityGroup<T extends Entityc> implements Iterable<T>{
|
||||
//fix incorrect HEAD index since it was swapped
|
||||
if(array.size > 0 && idx != array.size){
|
||||
var swapped = array.items[idx];
|
||||
indexer.change(swapped, idx);
|
||||
if(indexer != null) indexer.change(swapped, idx);
|
||||
}
|
||||
|
||||
if(map != null){
|
||||
@ -228,7 +228,7 @@ public class EntityGroup<T extends Entityc> implements Iterable<T>{
|
||||
//swap head with current
|
||||
if(array.size > 1){
|
||||
var head = array.items[array.size - 1];
|
||||
indexer.change(head, position);
|
||||
if(indexer != null) indexer.change(head, position);
|
||||
array.items[position] = head;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user