Closed UlyssesSockdrawer closed 2 months ago
To add to this one - the ghost unit definitely isn't 'there' in gameplay terms, as it can be moved through, so this seems to be a visual bug?
@UlyssesSockdrawer : I wasn't able to reproduce this with the save included. I'm curious however, if you can get this to happen again... do the ghosts go away when you zoom in/out or hit escape?
Also, are you able to reproduce this with nightly CI#1600 or later?
I've not had it reproduce - but I can't load my campaign on nightly 1598 due to the unplanned disassembly of forces bug (the one from last night I think?).
The unit ghost didn't disappear when zooming in, out, or navigating around the map. However when I reload the in-battle save that had the issue, the ghost isn't there either.
I've never seen it happen before in 5 years of double-blind play - it's a strange one. It hadn't happened on any prior scenarios either.
@HoneySkull - I have been able to reproduce this on the 0.50.0 release.
It takes a very specific set of circumstances:
At that point, the duplicate 'ghost' mek seems to be created.
Here's two duplicates I created in one game this evening.
This detail helps. Thank you!
@UlyssesSockdrawer - I'm still coming up short trying to replicate this - do these ghost mech get created during the deployment, movement phase, or other? Or do they get created while playing the game on a later round etc?
Hmm - that's strange, as I can replicate it almost every battle.
They get created during the Deployment phase. I've attached my Megamek rules preset in a zip below to see if that helps with replication. Maybe there's something in there I have turned on that's triggering it?
Are you using a custom skin or something other than the default skin?
@UlyssesSockdrawer - when you see this happen next, can you check something? Can you press Ctrl-B to cycle through the label styles and see if the ghost unit's label updates along with the non-ghost meks? I'm curious if this is a visual artifact, or if it's an internal data issue.
I'm using the Smoke Jaguar skin.
Next time it happens I'll try the Ctrl-B cycle and see what happens. I did notice in one game that when it flicked through Princess' units quickly during the melee phase, the labels on the ghost units would flicker between purple and blue.
This may only happen with Megamek games launched via MekHQ, as I tried to replicate it just now via stand alone MM and couldn't get it to trigger.
Here are some steps to reproduce it from just megamek for me with latest code
use double blind, without single blind map, 2 sheets high add one unit to your team deploy S add one for princess deploy N deploy your unit then use the next unit button deploy your unit again then on move it creates a ghost unit at deployment location
cycling the ctrl-b changes the name tag for the ghost unit and good one
the right click menu does not register with the ghost unit
not sure if this is a different case. it seems to be something with the next unit button not clearing something completely.
save then load clears the ghost unit.
It looks to be the next unit button deploy use next unit deploy again twist and it has the ghost copy in the same tile
There was an issue with field of fire
and tag highlights not updating when tabbing through units (i.e. next button / tab) that was fixed - wondering if this has a similar root cause. Thanks for the detailed steps to reproduce.
I was finally able to recreate this with your help!
During the movement phase, the stale sprite will remain. Don't need a bot or special map setup. Do need double blind though.
[!NOTE] This isn't specific to double-blind; this can occur in any game where "next unit" is used during the deployment phase.
This is where the ghost sprite was introduced - now how to fix it?!
9060f4617f4d26f5c9324d26ee49de7e86c1bb9c
Wild! Apologies for my steps to reproduce not catching - I thought I'd caught what I was doing.
This is what's going on:
sequenceDiagram
actor player
player ->> DeploymentDisplay: actionPerformed "Next Unit"
DeploymentDisplay ->> Entity: setPosition(null)
DeploymentDisplay ->> +BoardView: redrawEntity()
opt Entity position is null
BoardView ->> +EntitySprites: remove EntitySprite
note over BoardView, EntitySprites: Current sprite is no longer in <br/> EntitySprites collection
end
BoardView ->> BoardView: removeSprites(EntitySprites)
note over BoardView: when position was null, removeSprites <br/> does nothing and sprite is orphaned.
BoardView -->> -DeploymentDisplay: return
@HoneySkull Wow!
A) I haven't seen one of these call diagrams since school, B) that is amazing, what tool are you using to produce this? C) Nice find!
I used the github inline mermaid markdown.
Environment
Version: MekHQ-0.50.0-SNAPSHOT - CI1597 Nightly - Megamek launched via MekHQ OS: Win11 Java: 17
Description
This is the first time I've seen this bug.
When deploying double-blind units, having lost deployment initiative, I placed down my forces. The Griffin with the "Spike" callsign was placed visible to Princess.
This created two versions on the board - an unclickable 'faded out' version of the Griffin, and a 'live' actual version that is interactable.
The faded out "SPIKE" mek cannot be interacted with at all but remains on the board.
Files
Megamek game save: DoubleBlindIssue.sav.gz
MekHQ campaign save pre-battle to set it off from the start: The Nova Dragoons30000630.cpnx.gz