Skip to content

Commit

Permalink
Better exit condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tonihele committed Jul 5, 2024
1 parent a3ab19c commit 4eabb68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/toniarts/openkeeper/game/task/TaskManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private void processChangedTasks(Set<Entity> entities) {
for (Entity entity : entities) {
long taskId = entity.get(TaskComponent.class).taskId;
Long oldTaskId = tasksIdsByEntities.put(entity.getId(), taskId);
if (oldTaskId != null && taskId == oldTaskId) {
if (oldTaskId == null || taskId == oldTaskId) {
continue;
}

Expand Down

0 comments on commit 4eabb68

Please sign in to comment.