mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Fix apparent horizon not being independent of viewingrange (classic/Polymost).
The apparent horizon (in units proportional to pixels by a constant factor) was being calculated without normalizing to viewingrange, resulting a discrepancy between the drawn and actual up/down angle with non-default viewingranges (e.g. with r_usenewaspect=1, or when setting it from setaspect). This also means that the center-of-aim will now be the same regardless of the aspect. This fixes many derived bugs: * inconsistency w/ crosshair when shooting a gun and aiming up/down (obviously) * bugs resulting from being able to look up/down too far (garbage non-slope texture-mapping and viewing BIGORBIT skies above the borders in classic). Note: mods that had workaround logic for this bug will have to remove it... git-svn-id: https://svn.eduke32.com/eduke32@2414 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f12b09b512
commit
50375fcff2
1 changed files with 3 additions and 1 deletions
|
@ -8060,7 +8060,9 @@ void drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
|
|||
globalposx = daposx; globalposy = daposy; globalposz = daposz;
|
||||
globalang = (daang&2047);
|
||||
|
||||
globalhoriz = mulscale16(dahoriz-100,xdimenscale)+(ydimen>>1);
|
||||
// xdimenscale is scale(xdimen,yxaspect,320);
|
||||
// normalization by viewingrange so that center-of-aim doesn't depend on it
|
||||
globalhoriz = mulscale16(dahoriz-100,divscale16(xdimenscale,viewingrange))+(ydimen>>1);
|
||||
|
||||
globaluclip = (0-globalhoriz)*xdimscale;
|
||||
globaldclip = (ydimen-globalhoriz)*xdimscale;
|
||||
|
|
Loading…
Reference in a new issue