From 6f3ccdc65111b60fc91032aef8a685950b84f986 Mon Sep 17 00:00:00 2001 From: NoOneBlood Date: Sat, 4 Jan 2020 03:20:41 +0300 Subject: [PATCH] - Combination switches fix (and basically all event commands) - No sound of jumping when player's jump velocity is too low --- source/blood/src/eventq.cpp | 8 +++++++- source/blood/src/player.cpp | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/blood/src/eventq.cpp b/source/blood/src/eventq.cpp index ef70f5305..26b16125e 100644 --- a/source/blood/src/eventq.cpp +++ b/source/blood/src/eventq.cpp @@ -353,7 +353,7 @@ char evGetSourceState(int nType, int nIndex) void evSend(int nIndex, int nType, int rxId, COMMAND_ID command, short causedBy) { - EVENT event; event.index = nIndex; event.type = nType; event.cmd = command; event.causedBy = causedBy; + switch (command) { case kCmdState: @@ -365,6 +365,12 @@ void evSend(int nIndex, int nType, int rxId, COMMAND_ID command, short causedBy) default: break; } + + EVENT event; + event.index = nIndex; + event.type = nType; + event.cmd = command; + event.causedBy = causedBy; switch (rxId) { case kChannelTextOver: diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index bc4c326d5..0a29544a5 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -1578,7 +1578,9 @@ void ProcessInput(PLAYER *pPlayer) break; default: if (!pPlayer->cantJump && pInput->buttonFlags.jump && pXSprite->height == 0) { - sfxPlay3DSound(pSprite, 700, 0, 0); + if ((packItemActive(pPlayer, 4) && pPosture->pwupJumpZ > 1000) || pPosture->normalJumpZ > 1000) + sfxPlay3DSound(pSprite, 700, 0, 0); + if (packItemActive(pPlayer, 4)) zvel[nSprite] = pPosture->pwupJumpZ; //-0x175555; else zvel[nSprite] = pPosture->normalJumpZ; //-0xbaaaa; pPlayer->cantJump = 1;