Vinifera-Developers / Vinifera

Vinifera is a C&C: Tiberian Sun engine extension implementing new logics and fixing bugs.
GNU General Public License v3.0
43 stars 10 forks source link

[Vanilla Bug] Killing units leaves occupied cells #62

Open Crimsonum opened 3 years ago

Crimsonum commented 3 years ago

Description:

When a unit with the "drive" locomotor ({4A582741-9839-11d1-B709-00A024DDAFD1}) is killed while performing the "chess knight" move (L-shaped move), the cell that the unit was crossing is not properly cleared. This prevents units from entering that cell and buildings from being built on that cell for the remainder of the game.

The only way to clear the cell is by saving & reloading the game.

Steps To Reproduce:

  1. Make any unit with the drive locomotor perform the L-shaped move.
  2. Destroy the unit while it's turning.

For easier reproduction, give the unit a very slow speed and/or play at the slowest game speed.

Additional Files:

locobug_107 XPHRosp Images courtesy of Tuc0 from PPM.

Rampastring commented 3 years ago

@tomsons26 wrote the following related to this bug on the C&C Mod Haven Discord server:

i guess its due to how units move there its a lot less likely in RA i see a way to handle it when we find what causes it kinda see not sure how to know which cells are affected it occurs on these tracks https://github.com/electronicarts/CnC_Remastered_Collection/blob/master/REDALERT/DRIVE.H#L137 https://github.com/electronicarts/CnC_Remastered_Collection/blob/master/REDALERT/DRIVE.CPP#L2266 so checking the tracks the unit was on on death and for F_D and doing Clear occupier bits on those cells would be the solution