Build 1973
SVN-
General
disable undo/redo editor feature until I can debug the disappearing sprites
-
General
disable hidden switch heuristic of r1968
SVN handles and Git names are merged into one person.
disable undo/redo editor feature until I can debug the disappearing sprites
disable hidden switch heuristic of r1968
slight tweak for software renderer sprite picking: don't pick them if they're behind a TROR portal from the current position.
Make Ctrl-Alt-A also remove gray walls in the side-view mode. This makes TROR-heavy maps look much less cramped when used in conjunction with Ctrl-A.
Various cleanup work:
- fix an earlier 'oops': make highpals load correctly again - maphack lights shouldn't be double-loaded now - slight tweak to the loading screen fadein/out timing - two bound checks - make some variables static in engine.c
Take a stab at hidden model switch handling. There are at least two ways by
which switches have been hidden in the original and user maps. One is to make it face a wall, and another is to 'embed' it in e.g. the floor, like the monitor with the burning fuse in E4L1. Both kinds show up when the switches are rendered as models, revealing the secrets that the mapper sought to hide. My proposal, implemented in this commit, is to apply a heuristic for such switches at premap and make them invisible (set cstat bit 32768). The conditions are re-checked during the game in case there is a switch coming out of the floor, for example. A new spriteext bit is used for this feature.
* "Fix" two bugs introduced by r1450. In quotation marks, because I merely tracked down the offending changes without understanding them. Mild breakage of TX's ROR is expected.
The two bugs are: - RPG projectiles don't pass through water - can't emerge from slime in bobsp2 * Coalesce Polymer lights that are at the same position for FIRE-like sprites so that only one light is actually generated. This is good for usermaps that have multi-sprite fires, like bobsp2 again.
fix sector updating between TROR bunches, leading to 'being stuck' glitches. Difference: one character.
fix rotscrnang weirdness for any r_usenewaspect
make r_usenewaspect imply NOT glwidescreen (i.e. disable r_anamorphic there, because that would be redundant). r_projectionhack is still active, but doesn't seem to do much.
* fix screen warping with r_usenewaspect: now you have a larger FOV when being shrunk
* fix 'squishing' when taking off shrunk (the reason was TROR game code using updatesectorz) and a potential sector[-1] access
* Address http://forums.duke4.net/topic/3911-true-room-over-room/page__view__findpost__p__103306
by using setspritez() instead of setsprite() for the sectnum updating. * Change 'yax-nextwall(0/1)' to 'upwall/downwall' in the corruption checker, makes it much nicer to read.
don't crash wall alignment with void-tiled walls
* skip grayed out sectors when changing tags in 2d mode
* make Ctrl-Alt-A (formerly 'toggle inner gray walls') now remove all gray walls entirely in 2d mode * make r_usenewaspect enabled by default
Add a warning when calling {save,load}mapstate from EVENT_ANIMATESPRITES (forgotten from earlier changes).
Lots of M32script tweaks:
* fix breaking out of 'switch' blocks and compilation of the 'default' case * Have a way of assigning 'special function' menu [' F] entries to script states. Writing a string literal after the state name will register the state under that name. Menu names are limited to 24 characters and it's possible to have up to 16 of them. * new branching command 'ifinteractive', true if a state runs from the menu mentioned above. * new command: getnumberfromuser <<retvar>> "query_string" <maxnum> <flags> See 'state collect_teleporting_sectors' in a.m32 for a combined usage of the new functionality.
fix a typo that made TROR-nextwall corruptions only detected for the ceiling and write an auto-correction routine for inconsistencies with them.
Patch up this issue:
http://forums.duke4.net/topic/4685-glitch-on-keyboard-customization-page/ by setting the key_names[] characters in the non-ASCII range to '?' on Windows
* a.m32: new state 'correctslopes' which will check all ceilings and floors for a stat&2 and heinum mismatch and correct accordingly (the result isn't visible, but such an inconsistency can prevent planes from TROR-joining)
* helper feature: when shade preview is enabled, the ceilings and floors of highlighted sectors are shown in pal 6. This makes it possible to highlight the TROR-joining candidate sectors in 3D mode using e.g. 'sethighlightsector searchsector 1' while aiming at the respective ceilings and floors, and get visual feedback. * when failing TROR-joining early ('no consistent joining combinations found'), print to the console why it failed. * more Makefile.deps updating
update Makefile.deps
maint 2: refactor bits of code that twiddle/untwiddle pointers for persistent storage into a G_Util_PtrToIdx() function
maint 1: refactor 3 redundant instances of the same code into G_ResetInterpolations()
add 'gametics' to the 'dncoords' display, this gives a feeling for how often things are updated wrt the game clock
More fog/visibility tweaking. This makes Polymost's not depend on the screen width.
* Clean up after myself. It seems that Polymost isn't very clean with handling texture IDs sometimes, so switching between the two GL renderers could mess them up with the last revision. This is fixed now by always uninitializing Polymer when changing from it to another renderer.
* New shade/visibility calculation code, which is activated with 'r_usenewshading' (on by default), and is closer to the classic look. Also tweak the FOGSCALE macro to have approximately the same fog distance with all renderers. * Mapster32: END modifier to RShift. If it's pressed when RShift is released, sprites which are in grayed out sectors are also selected; Make changing shade affect all highlighted sprites in 3D mode (when aiming at one of them). * some debug code to watch out for suspicious glGenTexture/glDeleteTextures calls, not active.
Janitorial work part 2, perfect for a rainy day. This fixes a lot of leaks, both on the client side as well as for memory allocated by OpenGL. If you had crashes after a few times of restartvid'ing in Polymer, this should fix it.
A bit of cleanup with memory issues.
First, it is now possible to disable the memcache (which is there to cache the texcache) by setting the new cvar 'r_memcache' to 0. Do this if you're constrained on memory or getting crashes when e.g. doing vidrestart often. Also, the memcache will disable itself (and free its storage, if it's there) the first time it fails to allocate. Fix a strcpy with identical arguments in game.c and a couple of uninitialized mem accesses related to Polymer lights.