Async mesh reloading for planets
This commit is contained in:
@@ -33,6 +33,7 @@ import mindustry.graphics.g3d.*;
|
||||
import mindustry.input.*;
|
||||
import mindustry.io.*;
|
||||
import mindustry.maps.*;
|
||||
import mindustry.maps.planet.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.type.Planet.*;
|
||||
import mindustry.ui.*;
|
||||
@@ -285,11 +286,6 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
lookAt(state.planet.getLastSector());
|
||||
}
|
||||
|
||||
if(state.planet.requiresMeshReload){
|
||||
state.planet.requiresMeshReload = false;
|
||||
state.planet.reloadMesh();
|
||||
}
|
||||
|
||||
return super.show();
|
||||
}
|
||||
|
||||
@@ -662,6 +658,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
||||
if(timeShift != 0){
|
||||
universe.setSeconds(universe.secondsf() + timeShift * Time.delta * 2.5f);
|
||||
}
|
||||
|
||||
if(input.keyTap(KeyCode.r)){
|
||||
state.planet.reloadMeshAsync();
|
||||
}
|
||||
}
|
||||
|
||||
if(debugSectorAttackEdit && input.ctrl() && input.keyTap(KeyCode.s)){
|
||||
|
||||
Reference in New Issue
Block a user