ambient_generic: fix regression in the old style sound mechanism

This commit is contained in:
Marco Cawthorne 2023-10-06 21:19:46 -07:00
parent a5ecd18047
commit f183bfc571
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -359,6 +359,8 @@ ambient_generic::SendEntity(entity ePEnt, float flChanged)
if (m_bIsModern) {
flChanged |= AMBIENT_MODERN;
} else {
flChanged &= ~AMBIENT_MODERN;
}
WriteFloat(MSG_ENTITY, flChanged);
@ -422,8 +424,10 @@ ambient_generic::ReceiveEntity(float isnew, float flChanged)
if (m_bLoops == true) {
if (flChanged & AMBIENT_MODERN) {
print("MODERN!\n");
Sound_Update(this, CHAN_BODY, Sound_GetID(m_strActivePath), m_flVolume);
} else {
print("OLD!\n");
soundupdate(this, CHAN_BODY,
m_strActivePath, m_flVolume, m_flRadius, m_flPitch, 0, 0);
}