TidalPoo Posted June 20, 2021 Share Posted June 20, 2021 Тема пополняемая! 2 Quote Link to comment Share on other sites More sharing options...
TidalPoo Posted September 28, 2021 Author Share Posted September 28, 2021 1 Quote Link to comment Share on other sites More sharing options...
TidalPoo Posted October 24, 2021 Author Share Posted October 24, 2021 1 1 Quote Link to comment Share on other sites More sharing options...
TidalPoo Posted November 2, 2021 Author Share Posted November 2, 2021 Ещё один в коллекцию. Причём этот говнокод, пожирает нескромные ресурсы. public class MoveTaskManager extends AbstractPeriodicTaskManager { ... private final Predicate<Creature> CREATURE_MOVE_PREDICATE = new Predicate<Creature>() { public boolean apply(Creature creature) { creature.getMoveController().moveToDestination(); if (creature.getAi2().poll(AIQuestion.DESTINATION_REACHED)) { MoveTaskManager.this.movingCreatures.remove(creature.getObjectId()); creature.getAi2().onGeneralEvent(AIEventType.MOVE_ARRIVED); ZoneUpdateService.getInstance().add(creature); } else { creature.getAi2().onGeneralEvent(AIEventType.MOVE_VALIDATE); } return true; } }; ZoneUpdateService.getInstance().add(creature) - Уже выполняется в методе onGeneralEvent(AIEventType.MOVE_ARRIVED), (цепочка методов приведет к updateZone) В итоге мы имеем 2 копии одного метода, которые на борту имеют отдельный поток, то есть, по итогу запускается 2 одинаковых thread потока. Которые в свою очередь весьма "тяжелые" так как там идёт валидация зон. 1 Quote Link to comment Share on other sites More sharing options...
TidalPoo Posted November 13, 2021 Author Share Posted November 13, 2021 а нахера автор переменную создавал?)))) 😅 1 Quote Link to comment Share on other sites More sharing options...
Booblik Posted November 22, 2021 Share Posted November 22, 2021 2 Quote Link to comment Share on other sites More sharing options...
Booblik Posted January 14, 2022 Share Posted January 14, 2022 Кто-то прогуливал уроки математики)))) Quote Link to comment Share on other sites More sharing options...
TidalPoo Posted April 4, 2022 Author Share Posted April 4, 2022 Quote Link to comment Share on other sites More sharing options...
TidalPoo Posted April 9, 2022 Author Share Posted April 9, 2022 2 Quote Link to comment Share on other sites More sharing options...
Booblik Posted April 10, 2022 Share Posted April 10, 2022 22 часа назад, TidalPoo сказал: И тот прогер такой: 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.