Skip to content

Ensure func_tankapcrocket always has a targeting laser#538

Open
Bronzehawk75 wants to merge 1 commit into
mapbase-source:developfrom
Bronzehawk75:mapbase/tank-apcrocket-fix
Open

Ensure func_tankapcrocket always has a targeting laser#538
Bronzehawk75 wants to merge 1 commit into
mapbase-source:developfrom
Bronzehawk75:mapbase/tank-apcrocket-fix

Conversation

@Bronzehawk75
Copy link
Copy Markdown

Apparently env_laserdot (the entity used as the targeting dot for RPGs and APC rockets, and also the Wrangler in TF2) doesn't survive a save/load. weapon_rpg and APCs deal with this by recreating the laser if it doesn't exist. However, the obscure func_tankapcrocket only creates it on initial spawn. This causes the game to crash after a save is loaded and the tank is active.

This PR adds code to recreate the targeting laser to prevent game crashes.


Does this PR close any issues?

  • None that are tracked

PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

…esn't exist

* On a save restore, the laser dot gets removed, which causes the game to crash when the entity is enabled
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