- Re-standardise horizon around 0 and not 100.

* Blood had this right. It makes sense that the horizon be based around as it's easier to work with.
* Removed all associated game math to deduct default horizon of 100 when doing weapon zvel etc, meaning actual horizon can just be used.
* Re-did return to center function to work on the already converted pitch. Return speed should be 1:1 with previous code.
This commit is contained in:
Mitchell Richters 2020-10-07 13:28:38 +11:00
parent 99e6c718d7
commit 09a05f354c
30 changed files with 144 additions and 163 deletions

View file

@ -170,7 +170,7 @@ int32_t ydimen;
int32_t rxi[8], ryi[8];
int32_t globalposx, globalposy, globalposz, globalhoriz;
int32_t globalposx, globalposy, globalposz;
fixed_t qglobalhoriz;
float fglobalposx, fglobalposy, fglobalposz;
int16_t globalang, globalcursectnum;
@ -1092,8 +1092,7 @@ int32_t renderDrawRoomsQ16(int32_t daposx, int32_t daposy, int32_t daposz,
// xdimenscale is scale(xdimen,yxaspect,320);
// normalization by viewingrange so that center-of-aim doesn't depend on it
qglobalhoriz = mulscale16(dahoriz-IntToFixed(100), divscale16(xdimenscale, viewingrange))+IntToFixed(ydimen>>1);
globalhoriz = FixedToInt(qglobalhoriz);
qglobalhoriz = mulscale16(dahoriz, divscale16(xdimenscale, viewingrange))+IntToFixed(ydimen>>1);
globalcursectnum = dacursectnum;