Opened 9 years ago

Last modified 8 years ago

#3544 closed defect

[PATCH] Dead Units Can be promoted — at Version 4

Reported by: Stan 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

Change History (9)

by Karamel, 9 years ago

Attachment: sibyllae_vox_tkt3544.zip added

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

by Karamel, 9 years ago

Attachment: replay_tkt3544.zip added

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

by Karamel, 9 years ago

Simple patch with HP check before promoting

comment:1 by Karamel, 9 years ago

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 by elexis, 9 years ago

Milestone: BacklogAlpha 20

comment:3 by Stan, 9 years ago

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

by elexis, 8 years ago

Attachment: commands_micro.txt added

Minimal replay for r17460.

by elexis, 8 years ago

Attachment: reborn.gif added

comment:4 by elexis, 8 years ago

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.

Note: See TracTickets for help on using tickets.