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

Fixed ties failing to appear if invisible hooks are present #3164

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

ohlidalp
Copy link
Member

@ohlidalp ohlidalp commented Jul 4, 2024

Fixes #3162

Problem introduced by myself in 965d250 - I named beam scene nodes explicitly, but the scheme I used allowed for repetition in case beam visuals were created and then destroyed again during spawn. Unfortunately, for 'hooks' we don't know the visibility flags beforehand so we must always create visuals and then delete them if not desirable.

Changes:

  • ActorSpawner.cpp - function CreateBeamVisuals() - generate name based on unique beam number instead of the visual count.
  • GfxActor.cpp - function RemoveBeam() - properly dispose all OGRE objects when deleting beam visuals.

Fixes RigsOfRods#3162

Problem introduced by myself in 965d250 - I named beam scene nodes explicitly, but the scheme I used allowed for repetition in case beam visuals were created and then destroyed again during spawn. Unfortunately, for 'hooks' we don't know the visibility flags beforehand so we must always create visuals and then delete them if not desirable.

Changes:
- ActorSpawner.cpp - function `CreateBeamVisuals()` - generate name based on unique beam number instead of the visual count.
- GfxActor.cpp - function `RemoveBeam()` - properly dispose all OGRE objects when deleting beam visuals.
@ohlidalp ohlidalp merged commit cbb7225 into RigsOfRods:master Jul 30, 2024
2 checks passed
@ohlidalp ohlidalp deleted the 3162_Mike_invis-ties branch July 30, 2024 23:45
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.

Ties fail to appear if invisible hooks are present
2 participants