mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-03-15 11:20:39 -07:00
Fixed #8185
This commit is contained in:
parent
66f4118896
commit
f6c97f4ff6
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue