Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 78a58e2

Browse files
committed
Setter and Lua for PitchVariation cus why not
1 parent 076f805 commit 78a58e2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Entities/SoundContainer.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ namespace RTE {
248248
/// </summary>
249249
/// <returns>The pitch variation the sounds in this SoundContainer are played at.</returns>
250250
float GetPitchVariation() const { return m_PitchVariation; }
251+
252+
/// <summary>
253+
/// Sets the pitch variation the sounds in this SoundContainer are played at.
254+
/// </summary>
255+
/// <param name="newValue">The pitch variation the sounds in this SoundContainer are played at.</param>
256+
void SetPitchVariation(float newValue) { m_PitchVariation = newValue; }
251257
#pragma endregion
252258

253259
#pragma region Playback Controls

Lua/LuaBindingsEntities.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,7 @@ namespace RTE {
11151115
.property("Pos", &SoundContainer::GetPosition, &SoundContainer::SetPosition)
11161116
.property("Volume", &SoundContainer::GetVolume, &SoundContainer::SetVolume)
11171117
.property("Pitch", &SoundContainer::GetPitch, &SoundContainer::SetPitch)
1118+
.property("PitchVariation", &SoundContainer::GetPitchVariation, &SoundContainer::SetPitchVariation)
11181119

11191120
.def("HasAnySounds", &SoundContainer::HasAnySounds)
11201121
.def("GetTopLevelSoundSet", &SoundContainer::GetTopLevelSoundSet)

0 commit comments

Comments
 (0)