We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42aabdc commit a5f7c45Copy full SHA for a5f7c45
engine/modules/entities/src/main/java/com/codingame/gameengine/module/entities/Entity.java
@@ -29,7 +29,12 @@ static enum Type {
29
Entity() {
30
id = ++GraphicEntityModule.ENTITY_COUNT;
31
state = new EntityState();
32
- this.setVisible(true);
+
33
+ // World commits made before the creation of an entity should not affect that entity.
34
+ // This is why we set `visible` to false by default and immediately setVisible(true),
35
+ // this way the first commit of this entity will turn it into something visible.
36
+ // All other properties have no impact while the entity is invisible so it is effectively non-existant until it's first commit.
37
+ setVisible(true);
38
}
39
40
@SuppressWarnings("unchecked")
0 commit comments