Releases: Timmiej93/clipDistanceControl
Releases · Timmiej93/clipDistanceControl
Improved foolproof-ness
Overlapping (or close to each other) triggers will no longer create an issue like #1.
What was happening?
- Vehicle enters trigger 1. The vehicle's clip distance is set to the trigger defined (lower) clip distance, and the current (original) clip distance is stored.
- Vehicle enters trigger 2, while still inside trigger 1. The vehicle's clip distance is again set to that trigger's defined clip distance, and the current, already reduced by trigger 1, clip distance is stored.
- Vehicle leaves trigger 1, clip distance is reset to the original clip distance, which was stored in trigger 1.
- Vehicle leaves trigger 2, clip distance is reset to the reduced clip distance, which was stored by trigger 2.
If the vehicle would leave trigger 2 first, and then trigger 1, the clip distance would be reset properly.
How has this been fixed?
Instead of storing clip distances in each trigger (completely independent, triggers don't know of each other's data), data is now stored in a global database as well, that each trigger can access. Data is also still stored locally, for optimization.
By storing the data in this global database, a vehicle's clip distance will only be stored if no other trigger has already stored a clip distance. This will ensure that only the clip distance of vehicles that enter a trigger with their original clip distance active will be stored.
Initial release
Initial release