Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VehSpawner: Fix Advanced Logistics blocking static weapon respawns. #178

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

dijksterhuis
Copy link
Contributor

@dijksterhuis dijksterhuis commented Jun 18, 2024

When an advanced logistics container vehicle is destroyed, static weapons created by the vehicle spawner (vehicle asset manager) system can be blocked from respawning.

The static weapon object is still alive, hidden and attached to the player who loaded it into the now destroyed container vehicle... meaning the static weapon will not respawn at the vehicle spawn point.

This change fixes the block on spawning by checking if the spawn point's _currentVehicle was loaded into a container vehicle with advanced logistics, and whether the container vehicle is still alive. If not, force respawn of _currentVehicle.

additional

_vehicle getVariable ["log_inventory_loaded", false] should hopefully double up as a check for whether the advanced logistics module is enabled -- variable should not be set otherwise.

Would be nice to unload static weapons from a destroyed adv-log container vehicle if they are configured for WRECK. but that's more complex.

Tested this pretty thoroughly, not encountered any issues.

@dijksterhuis dijksterhuis force-pushed the vehspawner-advlog-can-cause-statics-to-never-respawn branch from 1b8ff5c to 76c5e0a Compare June 18, 2024 14:33
@dijksterhuis dijksterhuis force-pushed the vehspawner-advlog-can-cause-statics-to-never-respawn branch from 76c5e0a to 550aebe Compare June 18, 2024 14:33
@dijksterhuis dijksterhuis changed the title VehSpawner: Advanced Logistics module can block static weapons respawning VehSpawner: Fix Advanced Logistics blocking static weapon respawns. Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant