- Blood: Adjust sine wave in GetWaveValue for 4th type to use full curve of the wave.

* Initial setup would cause a very abrupt stop when coming to the top of an elevator, such as the one in E1M5.
* This would continue for an abrupt fall, causing the floor to essentially give out underneath the player or a dude actor.
* Lengthened wave allows the wave to start off softly and finish softly, with the elevator fastest in the middle of motion.
* Fixes #778.
This commit is contained in:
Mitchell Richters 2023-01-02 23:42:28 +11:00
parent 95f05d51c5
commit e133985fa0

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 BobVal(nPhase / 128.);
return (1. + BobVal(-512. + (nPhase / 64.))) * 0.5;
}
return nPhase;
}