And preventing enormous corruption due to a free() called on a garbage (malloc'd)
pointer values this time. DO_BUILD_VERY_FAST_PLEASE!
git-svn-id: https://svn.eduke32.com/eduke32@4980 1a8010ca-5511-0410-912e-c29ae57300e0
Previously, that was the case only with DRONE and COMMANDER. This makes
non-falling enemies pass properly through TROR bunches.
git-svn-id: https://svn.eduke32.com/eduke32@4975 1a8010ca-5511-0410-912e-c29ae57300e0
- 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.
git-svn-id: https://svn.eduke32.com/eduke32@4972 1a8010ca-5511-0410-912e-c29ae57300e0
Since TILE_TILT is only allocated once, it must be done with the maximum
possible size.
git-svn-id: https://svn.eduke32.com/eduke32@4965 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes the out-of-bounds read of former g_player[] in VM_EventCommon_().
git-svn-id: https://svn.eduke32.com/eduke32@4961 1a8010ca-5511-0410-912e-c29ae57300e0
By default, the following enemies have this flag set: OCTABRAIN, COMMANDER, DRONE.
DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4956 1a8010ca-5511-0410-912e-c29ae57300e0
This is where things are changed at last. This fixes lizmen walking on water.
git-svn-id: https://svn.eduke32.com/eduke32@4955 1a8010ca-5511-0410-912e-c29ae57300e0
Factor out condition for whether a z offset is added or not
("fix for flying/jumping monsters getting stuck in water", etc.) into
a function A_GetWaterZOffset() (and a helper A_GetVerticalVel()).
git-svn-id: https://svn.eduke32.com/eduke32@4954 1a8010ca-5511-0410-912e-c29ae57300e0
In VM_Fall(), keep a temp preliminary new z position of the actor and
assign only when we return. This is to each ease watching its value in GDB.
DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4953 1a8010ca-5511-0410-912e-c29ae57300e0
This prevents a enormous leak being reported by LeakSanitizer. Not that it
matters much, since we most frequently free models only at exit. (Sometimes one
may be freed earlier though -- if there was an error loading it, AFAICS.)
git-svn-id: https://svn.eduke32.com/eduke32@4952 1a8010ca-5511-0410-912e-c29ae57300e0
This allows for CON screen display code to use menu animations. The following is an example of how to adapt screen features that should animate.
before:
onevent EVENT_DISPLAYMENUREST
ifvare current_menu 0 // main menu
{
setvar x 1
setvar y 1
rotatesprite x y zoom ang tilenum shade pal orientation 0 0 xdim ydim
}
endevent
after:
state DisplayMenuCommon
ifvare RETURN 0 // main menu
{
getuserdef[THISACTOR].m_origin_x x
getuserdef[THISACTOR].m_origin_y y
addvar x 65536
addvar y 65536
rotatesprite16 x y zoom ang tilenum shade pal orientation 0 0 xdim ydim
}
ends
onevent EVENT_DISPLAYMENUREST state DisplayMenuCommon endevent
onevent EVENT_DISPLAYINACTIVEMENUREST state DisplayMenuCommon endevent
git-svn-id: https://svn.eduke32.com/eduke32@4945 1a8010ca-5511-0410-912e-c29ae57300e0
This makes sure that the engine arrays have sufficient space allocated for usage
in Mapster32's 2D mode, for example from drawmapview().
git-svn-id: https://svn.eduke32.com/eduke32@4938 1a8010ca-5511-0410-912e-c29ae57300e0
- t{sector,wall}type are simply typedef'd to the non-t versions
- make FORCE_INLINE unconditional of DISABLE_INLINING (otherwise there are
multiple definitions of these functions)
- update lunatic/doc/lpeg-lunatic.patch to apply against the LPeg 0.12 I just
downloaded
git-svn-id: https://svn.eduke32.com/eduke32@4937 1a8010ca-5511-0410-912e-c29ae57300e0
In setview(), we now assert windowx2 < xdim. The only calling places where its
non-violation is non-trivial to ascertain are (1) showview from CON and
(2) draw-to-tile for look-sideways in game.c. AFAICS case 1 should be fine.
Case 2 is adapted; see comments there.
git-svn-id: https://svn.eduke32.com/eduke32@4935 1a8010ca-5511-0410-912e-c29ae57300e0