- Blood: Adjust VDoorBusy() setup from e133985fa0.

* Changes to case 3 while visibly different, actually equates to the same algorithm for case 0.
* Revert case 3 back to original condition and send through 0 to `ZTranslateSector()` in `VDoorBusy()` if its 3 and we're not vanilla.
This commit is contained in:
Mitchell Richters 2023-01-05 20:59:14 +11:00
parent d59208ce74
commit 676cdba259

View file

@ -49,7 +49,7 @@ double GetWaveValue(unsigned int nPhase, int nType)
case 2:
return 1.0 - BobVal((nPhase / 128.) + 512);
case 3:
return !VanillaMode() ? (1. + BobVal(-512. + (nPhase / 64.))) * 0.5 : BobVal(nPhase / 128.);
return BobVal(nPhase / 128.);
}
return nPhase;
}
@ -1328,12 +1328,8 @@ int VDoorBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator)
}
}
}
int nWave;
if (pXSector->busy < a2)
nWave = pXSector->busyWaveA;
else
nWave = pXSector->busyWaveB;
ZTranslateSector(pSector, pXSector, a2, nWave);
const int nWave = (pXSector->busy < a2) ? pXSector->busyWaveA : pXSector->busyWaveB;
ZTranslateSector(pSector, pXSector, a2, (!VanillaMode() && nWave == 3) ? 0 : nWave);
pXSector->busy = a2;
if (pXSector->command == kCmdLink && pXSector->txID)
evSendSector(pSector, pXSector->txID, kCmdLink, initiator);