major macro sim improvement
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2025-05-24 20:46:40 -04:00
parent 9516209bc3
commit 49de7e6adb
3 changed files with 14 additions and 2 deletions

View File

@ -1965,6 +1965,7 @@ Performance improvements
- Accumulator draw calls do not use bones
- LOD skipping in realm simulation
- Shadow map pipeline only considers entities that are nearby
- Character services references set of already-loaded characters when simulating macro data

View File

@ -195,6 +195,17 @@ public class CharacterService extends SignalServiceImpl {
return rVal;
}
/**
* Gets the list of loaded characters
* @return The list of loaded characters
*/
public List<Character> getLoadedCharacters(){
lock.lock();
List<Character> rVal = new LinkedList<Character>(this.loadedCharacterMap.values());
lock.unlock();
return rVal;
}
/**
* Gets the characters at a given world position
* @param worldPos The world position

View File

@ -29,9 +29,9 @@ public class MacroSimulation {
//
//simulate characters
Globals.profiler.beginCpuSample("MacroSimulation.simulate - characters");
List<Character> characters = Globals.serverState.characterService.getAllCharacters();
List<Character> characters = Globals.serverState.characterService.getLoadedCharacters();
if(characters != null && characters.size() > 0){
for(Character character : Globals.serverState.characterService.getAllCharacters()){
for(Character character : characters){
if(character.getPlayerId() != CharacterService.NO_PLAYER){
continue;
}