- Combination switches fix (and basically all event commands)

- No sound of jumping when player's jump velocity is too low
This commit is contained in:
NoOneBlood 2020-01-04 03:20:41 +03:00 committed by Christoph Oelckers
parent dc5b8d27f8
commit 6f3ccdc651
2 changed files with 10 additions and 2 deletions

View file

@ -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:

View file

@ -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;