Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Incorrect VisualCharacter entity #3686

Merged
merged 1 commit into from Jun 13, 2019

Conversation

@darshan3
Copy link
Member

commented Jun 12, 2019

Contains

Fixes #3685

How to test

Add this command to VisualCharacterSystem.java:

@Command(shortDescription = "print all characters and visual entities present currently")
public String printVisualEntities() {
    StringBuilder message = new StringBuilder();
    for (EntityRef character: entityManager.getEntitiesWith(PlayerCharacterComponent.class)) {
        if (character.hasComponent(VisualCharacterComponent.class)) {
            EntityRef visualCharacter = character.getComponent(VisualCharacterComponent.class).visualCharacter;
            message.append(character.toFullDescription());
            message.append("\n");
            message.append(visualCharacter.toFullDescription());
            message.append("\n");
        }
    }
    return message.toString();
}

Now, start 3-4 instances of game, host a Core Gameplay mode game on one of them, and join using others. Once, everyone has joined and game has loaded on each of them, use this command to check if the character entities and their visual entities are printed correctly. For the local player character in each of the instances, visual character should by EntityRef.NULL, i.e., it should just print { }.

Changed incorrect receiving entity to character entity in onAwaitedLo…
…calCharacterSpawnEvent in VisualCharacterSystem

@darshan3 darshan3 force-pushed the darshan3:VisualEntityFix branch from 2956176 to 4fa3a9e Jun 12, 2019

@Cervator

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

Seems to work! But I'm having some bizarre issues in my workspace that I suspect are unrelated. Going to try to clean that up better before I risk merging anything.

Very nice detective work on this one!

2019-06-13 00_38_20-Terasology _ Alpha

@Cervator Cervator added the Bug label Jun 13, 2019

@Cervator Cervator added this to the v2.3.0 milestone Jun 13, 2019

@Cervator Cervator merged commit 4fa3a9e into MovingBlocks:develop Jun 13, 2019

1 check passed

LGTM analysis: Java No new or fixed alerts
Details
@Cervator

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

Got another clean test and getting better at predicting what causes this weirdness I'm hitting. Good enough as far as merging this goes. Thanks again @darshan3 - I know this one caused some hair loss 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.