don't crash on bsp w/o vis
don't crash with origin in the void (includes inside of structural brush)(do reset)
grab point to analyse from camera position with nothing selected; grab from any objects selection too
fix rendering issues
read surfaces written by q3map2 correctly + faster rendering code
print number of loaded drawsurfaces to console for evaluation of optimization done
fix a couple of of leaks and crashes after new/delete
The arrays were always meant to be variably sized, and objects are only ever allocated dynamically. Object size computations are simplified with this change.
Flexible arrays were introduced in C99, so this change means that we will require a C99-conforming compiler henceforth.
AAS_LoadAASLump will return 0/NULL in an error case. However it will also
return the input buffer pointer if length is 0, and the input buffer pointer
may be 0/NULL in the case where AAS_LoadAASLump is meant to allocate memory.
This means that it can return 0/NULL in a perfectly legal case where the lump
length is 0. Since AAS_LoadAASFile inteprets this as a fatal error, that's
bad.
I'm not sure how to best disambiguate this, but a low-touch fix is for the
caller of AAS_LoadAASLump to be OK with a returned NULL pointer if the lump
length is 0.
Also: added a missing break statement to avoid a spurious "don't know what to
do" message when using the aasinfo switch.
The settings in cfgq3.c had diverged from the actual fields and defaults in
these ways:
- extra field phys_maxacceleration
- missing fields phys_walkaccelerate, phys_swimaccelerate, rs_maxfallheight
- different defaults for phys_airaccelerate, phys_maxstep, phys_maxwaterjump
Also the code in aas_cfg.[ch] for reading the settings was missing
rs_maxfallheight.
It's brittle to require multiple different files to agree on these fields, but
rather than fix that issue this is just a band-aid to bring things back into
alignment so that custom configs based on the example file can be used again.