Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#3544 closed defect (fixed)

[PATCH] Dead Units Can be promoted

Reported by: stanislas69 Owned by: Karamel
Priority: Should Have Milestone: Alpha 20
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

As reported by Karamel if a unit gets killed while it's killing another unit, it dies, and then get promoted, creating a new fresh soldier that isn't dead. It ought not to be promoted in that case.

http://trac.wildfiregames.com/raw-attachment/ticket/3544/reborn.gif

Attachments (5)

sibyllae_vox_tkt3544.zip (943.4 KB) - added by Karamel 5 years ago.
Mod to use to play the replay and reproduce the bug (found on r17141)
replay_tkt3544.zip (14.2 KB) - added by Karamel 5 years ago.
The game data in which the bug happened (see around 3:30 in the skirmishers duel below red CC)
0001-Fix-promotion-of-dead-units.patch (1.7 KB) - added by Karamel 5 years ago.
Simple patch with HP check before promoting
commands_micro.txt (4.9 KB) - added by elexis 4 years ago.
Minimal replay for r17460.
reborn.gif (1.7 MB) - added by elexis 4 years ago.

Change History (11)

Changed 5 years ago by Karamel

Attachment: sibyllae_vox_tkt3544.zip added

Mod to use to play the replay and reproduce the bug (found on r17141)

Changed 5 years ago by Karamel

Attachment: replay_tkt3544.zip added

The game data in which the bug happened (see around 3:30 in the skirmishers duel below red CC)

Changed 5 years ago by Karamel

Simple patch with HP check before promoting

comment:1 Changed 5 years ago by Karamel

Keywords: patch review added

As suggested by Stanislas an HP check before promoting fixed the bug.

To reproduce it use the attached mod and play the replay data on r17141 (may happen with later revision though).

At around 3:30 the blue cavalry skirmishers goes below the red CC, followed by a red skirmisher. a duel happens and both get killed. The red skirmisher is dead but a new skirmisher is spawned cheering on the body of it's previous shape.

comment:2 Changed 5 years ago by elexis

Milestone: BacklogAlpha 20

comment:3 Changed 5 years ago by stanislas69

Owner: set to Karamel
Summary: Dead Units Can be promoted[PATCH] Dead Units Can be promoted

Changed 4 years ago by elexis

Attachment: commands_micro.txt added

Minimal replay for r17460.

Changed 4 years ago by elexis

Attachment: reborn.gif added

comment:4 Changed 4 years ago by elexis

Description: modified (diff)

I could reproduce the issue by letting a guy hunt chicken until he would become promoted. Added debug output to Promote.js to see on which turn it happens. Then added a delete command on that turn for that entity, voila.

comment:5 Changed 4 years ago by elexis

Resolution: fixed
Status: newclosed

In 17461:

Don't resurrect dead units when trying to promoting them while they die. Patch by karamel, fixes #3544.

comment:6 Changed 4 years ago by elexis

Keywords: review removed

Thanks for the patch! Keep it up!

Note: See TracTickets for help on using tickets.