Changeset - r28742:e80d6a5b649a
master
0
5
0
Codechange: Don't scan vehicle pool to find targeting disaster vehicle when deleting any vehicle. (#12064)
* Codechange: Don't scan vehicle pool to find targeting disaster vehicle when deleting any vehicle.
When deleting a vehicle, the vehicle pool is scanned to find a targetting disaster vehicle. With lots of vehicles this can take some time, especially when deleting multiple consecutive vehicles.
Disasters vehicles can actually only target road vehicles. Store the DisasterVehicle index in the road vehicle, so that no pool scan is necessary.
* Change: Small UFOs no longer target a vehicle which is already a target.
* Codechange: Don't scan vehicle pool to find targeting disaster vehicle when deleting any vehicle.
When deleting a vehicle, the vehicle pool is scanned to find a targetting disaster vehicle. With lots of vehicles this can take some time, especially when deleting multiple consecutive vehicles.
Disasters vehicles can actually only target road vehicles. Store the DisasterVehicle index in the road vehicle, so that no pool scan is necessary.
* Change: Small UFOs no longer target a vehicle which is already a target.
5 files changed with 38 insertions and 11 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)