Fix hit/kill notify being swapped (#698)
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 42s

This commit is contained in:
smallmodel 2025-03-17 00:19:40 +01:00 committed by GitHub
parent 74e909d17f
commit 73aa377264
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 9 deletions

View file

@ -1667,8 +1667,8 @@ void CG_ParseCGMessage_ver_15()
CG_HudDrawFont(iInfo);
break;
case CGM_NOTIFY_KILL:
case CGM_NOTIFY_HIT:
case CGM_NOTIFY_KILL:
if (cg.snap) {
const char *soundName;
int iOldEnt;
@ -1676,12 +1676,11 @@ void CG_ParseCGMessage_ver_15()
iOldEnt = current_entity_number;
current_entity_number = cg.snap->ps.clientNum;
if (iType == CGM_NOTIFY_HIT) {
soundName = "dm_kill_notify";
if (iType == CGM_NOTIFY_KILL) {
commandManager.PlaySound("dm_kill_notify", NULL, CHAN_LOCAL, 2.0, -1, -1, 1);
} else {
soundName = "dm_hit_notify";
commandManager.PlaySound("dm_hit_notify", NULL, CHAN_LOCAL, 2.0, -1, -1, 1);
}
commandManager.PlaySound(soundName, NULL, CHAN_LOCAL, 2.0, -1, -1, 1);
current_entity_number = iOldEnt;
}
@ -2058,15 +2057,15 @@ void CG_ParseCGMessage_ver_6()
CG_HudDrawFont(iInfo);
break;
case CGM6_NOTIFY_KILL:
case CGM6_NOTIFY_HIT:
case CGM6_NOTIFY_KILL:
if (cg.snap) {
int iOldEnt;
iOldEnt = current_entity_number;
current_entity_number = cg.snap->ps.clientNum;
if (iType == CGM6_NOTIFY_HIT) {
if (iType == CGM6_NOTIFY_KILL) {
commandManager.PlaySound("dm_kill_notify", NULL, CHAN_LOCAL, 2.0, -1, -1, 1);
} else {
commandManager.PlaySound("dm_hit_notify", NULL, CHAN_LOCAL, 2.0, -1, -1, 1);

View file

@ -770,8 +770,8 @@ movement on the server game.
CGM_HUDDRAW_ALPHA,
CGM_HUDDRAW_STRING,
CGM_HUDDRAW_FONT,
CGM_NOTIFY_KILL,
CGM_NOTIFY_HIT,
CGM_NOTIFY_KILL,
CGM_VOICE_CHAT,
CGM_FENCEPOST,
};
@ -812,8 +812,8 @@ movement on the server game.
CGM6_HUDDRAW_ALPHA,
CGM6_HUDDRAW_STRING,
CGM6_HUDDRAW_FONT,
CGM6_NOTIFY_KILL,
CGM6_NOTIFY_HIT,
CGM6_NOTIFY_KILL,
CGM6_VOICE_CHAT,
};