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 controller roars persisting into loaded savegames #20

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Fixed controller roars persisting into loaded savegames #20

merged 1 commit into from
Apr 3, 2019

Conversation

Decane
Copy link
Contributor

@Decane Decane commented Apr 3, 2019

Per my comment in Decane/SRP#46:

  • In xrGame\ai\monsters\controller\controller.cpp, we have:
void CController::net_Destroy()
{
	inherited::net_Destroy();

	m_aura->on_death	();
	FreeFromControl		();
}
  • CControllerAura::on_death() in xrGame\ai\monsters\controller\controller_psy_aura.cpp just calls m_effector->switch_off() and then nullifies pointer m_effector. But it doesn't actually terminate the looped controller roar sounds if they are playing when CController::net_Destroy() is called.

The changes introduced here should fix the problem by forcing an immediate termination of any playing controller roar sounds when CController::net_Destroy() is called, so that they don't persist into the subsequently loaded session.

I have tried to conform as closely as possible to GSC's coding style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants