Build 10528
GIT-
If the texturecache.index file cannot be read, invalidate it
Show details
This fixes a problem where the texcache file could grow without limit if something managed to corrupt the texcache index.
SVN handles and Git names are merged into one person.
If the texturecache.index file cannot be read, invalidate it
This fixes a problem where the texcache file could grow without limit if something managed to corrupt the texcache index.
Revert clipupdatesector() changes from df868267 and replace with a different approach
If the sector contains a TROR bunch, then whenever clipupdatesector() would normally return 1, instead run updatesector() and return 0 instead. The old approach did not work out in all situations. In Fury, certain flying enemies could not pass some TROR layers properly, and in AMC, trying to submerge in TROR water had the player glitch out on the surface. This exact approach had previously been used in AMC without any major issues for 2 years, before the recent TROR changes.
Fix hitscan() and clipmove() by checking for invalid sectnums
Invalid sectnums could previously be added to the clipsectlist if a hitscan shot passed a tror layer.
fix regressions with clipupdatesector() from df868267
This resolves a bug in Duke3D where the player couldn't move while shrunk if a TROR sector was present on the map. It also ensures that the original clipping is used if no TROR bunch is present inside the sector in question. This should reduce the amount of backwards-compatibility problems.
Fix clipmove() problems with TROR wall geometry resulting from commit 7f00d5ce
The changes are now more conservative and only affect sprites on TROR layers.
Fix many cases in which cansee() would fail with TROR
This commit adds a failsafe which corrects the given origin and destination sectnums of the "cansee()" function, by checking if the corresponding (x,y,z) coordinates are actually contained within the given sectors. The problem with TROR in particular was that the calculation done to determine the point of intersection on the TROR layer requires the coordinates to be within the given sectnums. Else, cansee() would simply return 0, even if there was a clear line of sight. This should also implicitly fix any other cases where the coordinates of the cansee() call do not exactly match up with the given sectnums.
Fix tsprite cutoff if the sprite stretches across multiple TROR layers
The sprite is now properly copied for each sector it stretches across.
Overhaul TROR handling for hitscan() and clipmove()
- Vertically attached sectors are now added to the clipsectorlist - Entirely remove the previous TROR hack from hitscan() - Instead, hitscan() now also uses clipsectorlist, and detects whether a TROR transition floor or ceiling was hit. If so, any subsequent wall hits in the same sector are skipped. This fixes the following: - Collision and hitscan checks where a sprite stretches vertically across more than 2 TROR layers. - Hitscan shots being unable to clear sloped TROR surfaces. - A potential out-of-bounds array access in hitscan()
Add TROR-awareness to sprite clipping in hitscan()
Analogous to the previous commit, it also checks the sprites of the upper and lower TROR bunch of the sector. This handles the case where a sprite is intersecting layers, and fixes hitscan shots not hitting enemies properly in such cases.
Add TROR-awareness to sprite clipping in clipmove()
This makes it so that the sprites of the ceiling and floor bunch sectors of the sector being checked are also iterated over. This handles the case where a sprite is intersecting TROR layers, and fixes projectiles not hitting enemies properly in such cases.
Make clipupdatesector() TROR-aware with compatibility ENGINE_EDUKE32
When checking if a point (x,y,z) is contained within a sector, then if x,y is contained, but z is not, it also checks all attached TROR layers. This fixes terminx/eduke32#24
Skip screentextRender() if provided zoom smaller or equal zero
This fixes a division by zero crash if zoom == 0.
Fix cstat parameter in "classicDrawVoxel()" being int8_t instead of int16_t
Also fix an error log message in engine.cpp logging the wrong variable.
Fix parameter in "polymost_drawtilescreen" being called "wallnum" instead of "tilenum"
findfrompath() with empty filename immediately returns -1
Fixes a bug where an empty filename is interpreted as the current directory "./", which of course always exists.
Fix a bug introduced with voxel caching in fa3d6784
The texturecache file shouldn't be affected I think
Fix compilation for POLYMER=0 builds
Fix texcache discovering index files in search paths if texcache.index doesn't exist in the cwd
Resolved by creating the index file before trying to read from it
Fix same error as in OSD_Printf() also in initprintf() and buildgl_outputDebugMessage()
Fix edge case where OSD_Printf() may wrongly remove the last char in a string
Fix updatesectorz() not checking z height in fallback, and add fallback optimization to updatesectorexclude()
Initialize blend to 0 when inserting sprites
This fixes a bug where stale blend values could be transferred over from a previously loaded map.
fix parsing of voxel definition in error cases
Fix ancient identical branch warning in the Polymer code
Fix problems when changing renderer after having seen a mirror
If the player saw a mirror at some point while playing in Polymer, his view would get messed up on changing renderer. This fixes that. Fixes terminx/eduke32#49 and terminx/eduke32#50