Build 5246
SVN-
fix 'resizearray' after r4735: copy over old values, zero-init new ones.
Show details
Make lunatic/test/gamearray.con run in C-CON, too.
SVN handles and Git names are merged into one person.
fix 'resizearray' after r4735: copy over old values, zero-init new ones.
Make lunatic/test/gamearray.con run in C-CON, too.
fix negative alpha for 'rotatespritea'. BUILD_LUNATIC.
Conceptually, this amends r4428.
from 'definevolumename', make g_numVolumes be determined as in C-CON.
check EVENT_ENTERLEVEL for nonzero RETURN, run w/ other players then.
Background: AMC TC initializes per-player variables from this event.
Free alloc'd anims in h_dukeanim. Adds a function hash_loop().
suffix gamearray file names with '.gar'.
fix rendering of middle part of 1-way masked wall.
It does not depend on the "swap bottom wall parts" bit being set. The fix is by matching up the related code with Polymost.
implement NODEFAULT per-actor gamevars in the C-CON fashion.
For glocal gamevars, the LunaCON semantics (session gamevar) are kept. For per-actor ones, this now prevents resetting a gamevar's value to default on spawn or loadactor. BUILD_LUNATIC.
config.c: fix an overlapping strcpy() in CONFIG_SetMapBestTime().
allow writing -1 to player[].newowner.
For the other player members, where formerly negative values were allowed to be written, only -1 is now.
fix g_tile[].proj memory leaks, halve number of projectile_t allocations.
When checking for SE7 water teleportation, regard sign of z velocity.
This fixes RPGs fired upwards at a steep angle teleporting immediately to underwater when wading in water (reported via PM by Turok 64 Jr).
account for the projectile changes in r5080. BUILD_LUNATIC.
The (undocumented) Lua-side API stays almost the same.
allow ':' immediately after 'case' (legacy; warns), writing to ud.god.
Also, on one "gamevar `xxx' is not per-*" diagnostic, print the location of the gamevar definition.
fix build and user_defs definition mismatch.
Left: projectile changes.
honor r_usenewaspect, especially it being off.
For this, add a setaspect_new() setup/restore pair in M32_DrawRoomsAndMasks() like for G_DrawRooms(). With this, changing viewingrange/aspect via m32script (in a.m32: [7] -- [9] on the upper row) can only be done in r_usenewaspect 0, though.
for non-user level, don't write garbage into h.boardfn, allow per-map ART.
Do "typedef projectile_t defaultprojectile_t;" instead of having an indetical-member type.
Move projectile_t to player.h.
polymost.c: fix display of floor-aligned sprites ornameted to the ceiling.
polymost.c: split three overlong lines into three each.
This was formerly "fix multi-tile ceiling skies.", but TX beat me to it and Git automatically figured out how to merge while keeping a linear history. (Our fixes were identical.) Nice!
Double the size of clouds[] (holding sectors with CLOUDYSKIES ceilings).
Also, make cloudx[] and cloudy[] scalars, as the per-sector values were always identical. In prelevel(), warn if some CLOUDYSKIES-ceiling sectors could not be set up due to reaching the new 256 sector limit.
actors.c: fix 3 incorrect '/' -> tabledivide32_noinline rewrites in r4658.
Division has higher precedence than bitwise-OR. The cases concerned SE3, SE4 and NEON* sprites. Incidental info: the blinking of NEON* sprites can be controlled via their lotag, similarly to how you how you give a "random flash number" as SE4 hitag.
map SDL_SCANCODE_NONUSBACKSLASH to the same Build code as COMMA.
NONUSBACKSLASH is what is generated for the key between the LShift and 'Z' here. The aliasing with the actual ',' key is as with the SDL1.2 build. Fixes the issue reported in http://forums.duke4.net/topic/8029-cant-bind-key-anymore/
Makefile.common: for Clang, add -Wno-missing-braces.
Because we get spammed otherwise, regarding initializations of 'vec3f_t' and 'vec3d_t' variables. Update: actually, it also happens for GCC builds for me.
Mapster32/C++ build/non-Lua: probably fix a crash in showsectordata().
Reported in http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__220722 I could not reproduce it, but it is thinkable that 'searchsector' could have been out-of-sync with the 'sectnum' local. (For example, the former one could have been -1, triggering the crash.)
Fix freeze on pitch 0 sound playback introduced in r4616.
Reported in http://forums.duke4.net/topic/3857-the-crash-thread/page__view__findpost__p__220954 Now, PitchTable[] in initialized with the same values as pre-r4608.
update docs and comments in lunatic/test/event_chaining.con
add 'definevolumeflags' to keyword pattern, re-apply some changes of r5026.
DONT_BUILD.
engine.c: style-cleanup getzrange(). DONT_BUILD.
update user_defs, CPLUSPLUS=0 in synthesis.sh, disable 'cutscene' for now.
BUILD_LUNATIC.
Makefile.common: fix "disallow building Lunatic with C++" (r4979). DONT_BUILD.
update files from LuaJIT. DONT_BUILD.
fix a couple of typo-like issues found by listglobals.sh. DONT_BUILD.
menus.c: fix two unused-variable warnings.
Classic/Polymost: factor out update of starting sectnum, use updatesectorbreadth().
The latter means that running perpendicular thin sector is handled better if there are e.g. TROR sectors in the same x/y space.
gamedef.c: tweak g_keywdate[] entries.
actors.c: make Enforcers and Troopers avoid ST1 sectors as in Duke3D.
That is, resurrect the stayput condition for LIZMAN and non-flying LIZTROOP, but only if changing from a non-ST1 sector. DONT_BUILD.
Stick update of 'totalclocklock' at beginning of G_DrawRooms() instead of drawrooms().
This fixes engine-side sprite animation in the following scenario: CON code wants to draw a scene from EVENT_DISPLAYREST, but since it covers the whole screen, disables the drawing of the 3D scene beforehand (RETURN set to 1 from EVENT_DISPLAYROOMS). DONT_BUILD.
in 'for i drawnsprites' handling, back up and restore sprite MAXSPRITES-1.
This fixes the level 5 corruption encountered when issuing that iteration. (Because the last sprite would be changed from e.g. statnum MAXSTATUS to 0.) It is also mandatory anyhow since the last sprite may be contained in the map.
style-cleanup check_spritelist_consistency() and VM_Execute(): 'for'.
DONT_BUILD.
Under conditions of CLASSIC_Z_DIFF_64 (r4960), make some drawvox() vars 64-bit.
- In drawvox(), make view-relative x and y high-precision on desktops. To a large extent (but not completely), this fixes "stray" fake floor shadow sprites for voxels. - In the mouse picking code for voxels, fix a possible integer overflow. A new engine.c-private function mulscale_triple30() is added. DONT_BUILD.
Add lunatic/test/thisactor_getzrange.con, providing 'state thisactor_getzrange'.
Also, note a place that is the real cause for "what makes the player slide off enemies", as far as I can see.
gameexec.c: factor out 2x occuring pattern into VM_GetZRange(), clean up 3 funcs.
- VM_GetZRange(), which updates actor[].{floor,ceiling}z, is called from A_GetZLimits() and A_Fall(). - Style-cleanup the following: A_Dodge(), A_GetFurthestAngle(), A_FurthestVisiblePoint(). DONT_BUILD.
Revert "gameexec.c: in VM_Move(), update actor[].{floor,ceiling}z for enemies."
This reverts r4975. DONT_BUILD.
Fix swapbufreverse(), adding precondition of count >= 4.
Also, in premap.c:G_CacheMapData(), comment out what was supposedly intended as a debugging message ("percentage ...").
add 'cutscene' and 'ifcutscene' as NYI commands. DONT_BUILD.
mdsprite.c: in md3load(), allocate m->head.surfs with Xcalloc, amending r4952.
And preventing enormous corruption due to a free() called on a garbage (malloc'd) pointer values this time. DO_BUILD_VERY_FAST_PLEASE!
Makefile.common: disallow building Lunatic with C++ for now. DONT_BUILD.
gameexec.c: in VM_Move(), update actor[].{floor,ceiling}z for enemies.
Previously, that was the case only with DRONE and COMMANDER. This makes non-falling enemies pass properly through TROR bunches.
actors.c: style-cleanup A_MoveSpriteClipdist(). DONT_BUILD.
in build.c, prevent oob of wall[] if joining non-adjacent sectors.
Also, some minor stylistic cleanup.
Amend retrieval of STR_*TIME for qgetsysstr, fixing LunaCON and possible oob.
- Add declarations of C functions to defs.ilua, names to dynsymlist, fix typo in con_lang.lua, ffi.string() calls in control.lua - Assert that G_LastMapInfoIndex() is always called with ud.last_level >= 1. (A stricter requirement than necessary to prevent follow-up oob accesses, but logically the most meaningful.) - In G_PrintParTime() and G_PrintDesignerTime(), return "<invalid>" if the above does not hold. This can happen from EVENT_NEWGAME, for example. Add a test to lunatic/test/qgetsysstr.con. DONT_BUILD.
fix underallocation of TILE_TILT and tilting at very small resolutions.
Since TILE_TILT is only allocated once, it must be done with the maximum possible size.
sdlayer.c: minor stylistic simplification of sdlayer_checkversion(). DONT_BUILD.
osd.c: in OSD_HandleChar() for TAB, fix use of uninitialized osd->editor.buf[i].
Exposed by Valgrind. DONT_BUILD.
make -fbad-getactorvar-use-pli enabled by default. DONT_BUILD.
Make g_player a +1 offset pointer into 'static g_player_s[1 + MAXPLAYER]'.
This fixes the out-of-bounds read of former g_player[] in VM_EventCommon_().