Skip to content

Commit

Permalink
- Fix the previous commit
Browse files Browse the repository at this point in the history
Revert "Fixed a missing parameter in S_Sound's ZScript prototype that was causing assertion failures."

This reverts commit 619f44d.
  • Loading branch information
madame-rachelle committed Jan 18, 2021
1 parent 619f44d commit d380491
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sound/s_doomsound.cpp
Expand Up @@ -415,7 +415,8 @@ DEFINE_ACTION_FUNCTION(DObject, S_Sound)
PARAM_FLOAT(volume);
PARAM_FLOAT(attn);
PARAM_FLOAT(pitch);
S_SoundPitch(channel & 7, EChanFlags::FromInt(channel & ~7), id, static_cast<float>(volume), static_cast<float>(attn), static_cast<float>(pitch), 0.0f);
PARAM_FLOAT(startTime);
S_SoundPitch(channel & 7, EChanFlags::FromInt(channel & ~7), id, static_cast<float>(volume), static_cast<float>(attn), static_cast<float>(pitch), static_cast<float>(startTime));
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion wadsrc/static/zscript/doombase.zs
Expand Up @@ -125,7 +125,7 @@ extend class Object
{
return level.PickPlayerStart(pnum, flags);
}
deprecated("4.3", "Use S_StartSound() instead") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0);
deprecated("4.3", "Use S_StartSound() instead") native static void S_Sound (Sound sound_id, int channel, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0, float startTime);
native static void S_StartSound (Sound sound_id, int channel, int flags = 0, float volume = 1, float attenuation = ATTN_NORM, float pitch = 0.0, float startTime = 0.0);
native static void S_PauseSound (bool notmusic, bool notsfx);
native static void S_ResumeSound (bool notsfx);
Expand Down

3 comments on commit d380491

@Cacodemon345
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't startTime be 0 by default?

@alexey-lysiuk
Copy link
Collaborator

Choose a reason for hiding this comment

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

The default value for the added argument is missing.

@madame-rachelle
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're both right - fixed again 0cbcb87

Please sign in to comment.