How to replicate: In tactical mode, put a soldier inside a vehicle, eg. ice cream truck and force move it through buildings with shift+click until it explodes.
nullptr dereference in renderworld.cpp GetShadeTable due to psoldier->sGridNo being -1, which is then used for array access. Simply preventing the nullptr dereference shows that intact vehicle graphics are not properly removed from the tactical map, unlike merc graphics are which results in undamaged vehicle graphics being shown under the vehicle corpse graphics. Proper fix requires going through the code and finding out where the removal of vehicle from the tactical map goes wrong. If the vehicle is removed from the merc list in strategic map, the vehicle graphics disappear from tactical map as well.
RemoveMerc() returns FALSE due to not finding the vehicle pSoldier in gpWorldLevelData[ iMapIndex ].pLevelNodes[5] for the sGridNo that the vehicle is supposed to be on. Maybe a mismatch of where the structure in world is not yet updated to the vehicle's current gridno when it gets destroyed? This bug does happen when the vehicle is moving in tactical
How to replicate: In tactical mode, put a soldier inside a vehicle, eg. ice cream truck and force move it through buildings with shift+click until it explodes.
nullptr dereference in renderworld.cpp GetShadeTable due to psoldier->sGridNo being -1, which is then used for array access. Simply preventing the nullptr dereference shows that intact vehicle graphics are not properly removed from the tactical map, unlike merc graphics are which results in undamaged vehicle graphics being shown under the vehicle corpse graphics. Proper fix requires going through the code and finding out where the removal of vehicle from the tactical map goes wrong. If the vehicle is removed from the merc list in strategic map, the vehicle graphics disappear from tactical map as well.
RemoveMerc() returns FALSE due to not finding the vehicle pSoldier in gpWorldLevelData[ iMapIndex ].pLevelNodes[5] for the sGridNo that the vehicle is supposed to be on. Maybe a mismatch of where the structure in world is not yet updated to the vehicle's current gridno when it gets destroyed? This bug does happen when the vehicle is moving in tactical