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

EFX spawnarg for location entities #2

Draft
wants to merge 10 commits into
base: trunk
Choose a base branch
from

Conversation

FrostSalamander
Copy link

@FrostSalamander FrostSalamander commented Jun 3, 2024

Adds ability to specify EFX preset as a spawnarg on location entities.

  • no need for EFX file
  • spawnarg will take precedence if both it and file are present

Test map here (efxtest.map): https://github.com/FrostSalamander/dev-test-maps/tree/main

effects.Append(soundEffect);
}
else {
ok = AddPreset(efxPreset, soundEffect, err);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why both cases call AddPreset.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Presets can be used by either the EFX file or the spawnarg, so instead of duplicating the code I refactored it into a new function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry ignore my last comment - I understand what you mean now. I've gone back and refactored it, it should look better now.

efxf(AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, props->flRoomRolloffFactor);
efxi(AL_EAXREVERB_DECAY_HFLIMIT, props->iDecayHFLimit);

}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like missing return.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be added to VCS I suppose.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed from PR

@stgatilov
Copy link
Owner

I merged this as svn rev 10797.

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.

2 participants