This is not how you use pushlstring! This is actually sending uninitialized memory to Lua, which is making scripts have inconsistent results (duh?)
c/o JTE: "Tell Red they're a doofus."
Coloropposite hotfix
Quick fix to prevent ColorOpposite(MAXSKINCOLORS) or higher input from giving results out of the actual array's bounds. In other words, preventing it from giving you nonsense values or something.
I created the function for Lua to begin with, so clearly this is 100% my fault once again. Welp.
See merge request !31
Objectplace reallocates the mapthings list to add one more mapthing. By itself there's no problem with this.
But, mobj->spawnpoint is a pointer to the mapthing's location in the mapthings list.
So by reallocating the mapthings list, all references to mobj->spawnpoints point to freed memory.
... Oops.
Now when objectplace reallocates the mapthings list it actually corrects the locations of all mobj's spawnpoints to point to the new list.
Hooray, you can use NiGHTS objectplace again if you really want to.
The point here is ColorOpposite(MAXSKINCOLORS) would have given an actual result of its own since MAXSKINCOLORS & MAXSKINCOLORS is still MAXSKINCOLORS. This shouldn't happen though, as both Color_Opposite[MAXSKINCOLORS*2] and Color_Opposite[MAXSKINCOLOR*2+1] aren't defined.
Note: polyobj_t's "translucency" is apparently a SIGNED integer, so in theory it's possible to get polyobj flats to use the "spanfunc = splatfunc" line using negative values. If this is not meant to happen, this should probably be fixed asap
Conflicts:
src/f_wipe.c
Also makes comptime.bat work with git if able.
Development builds will now show the branch and the SHA1 hash of the revision. Also been tested to work with subversion, where it displays "Subversion r####". You know, just in case.
more detailed description: vissprites now store dispoffset in a separate variable from (y)scale, and uses it to influence order between sprites without it affecting the actual drawing of the sprites themselves
Fix md2s
shoutouts to MI for breaking them accidentally
I was about to just commit this straight to next but it's the perfect reason of why code review is beneficial and I'd be a hypocrite to point that out and then skip the process
See merge request !28
Apparently all parts of the source code that require GLPatch_t are themselves used only if HWRENDER is defined. Do I need to say more?
Not sure if this will fix Wolfy's latest problem or not though
Basically, Wolfy's linux (non-CMake) compiling apparently fails here, and config.in.h actually lives outside of the sdl folder. Blame a particular someone for blindly copy+pasting these includes in this file without considering the consequences when adding support for CMake everywhere.
Some small compiling fix
~~See commit description for details, I'm not repeating it all here with different words.~~
~~Needs testing before we actually merge the changes in, I don't have anything besides Windows so I can't actually try this fix out for myself sadly. :(~~
This was originally a quick branch I made to fix a problem so that @wolfy852 could compile with Linux on some thing of his ...turned out not to be the only problem, and then I found a slightly unrelated problem altogether. So it's now a small assortment of compiling-related fixes.
Also should be merged to next, which is hopefully obvious.
See merge request !29
Apparently all parts of the source code that require GLPatch_t are themselves used only if HWRENDER is defined. Do I need to say more?
Not sure if this will fix Wolfy's latest problem or not though
Basically, Wolfy's linux (non-CMake) compiling apparently fails here, and config.in.h actually lives outside of the sdl folder. Blame a particular someone for blindly copy+pasting these includes in this file without considering the consequences when adding support for CMake everywhere.
Compiling errors fixed in this commit:
* Various cases of mixed declaration and statement code
* Implicit declaration of slope functions (read: you forgot to put "include "p_slopes.h" in MORE than a few places)
* an odd case of a bad fixed_t to float typecase, cause by using P_GetZAt directly inside FIXED_TO_FLOAT
* a few minor cases of bad unsigned-signed comparisons
* no prototypes for some of the new slope functions. For goodness sake Red, this is basic stuff!
Actions tweaks
This just rewrites the action A_SetTargetsTarget currently, dunno if I'll bother to tweak any more actions in the near future \*shrugs\*
That said, PLEASE check whether the action works properly before accepting the merge. It's been a while since I last did anything with this branch, so I forget entirely whether I tested it or not.
See merge request !27
Slopes and stuff
Adds support for slopes, slopes on FOFs, slopes on translucent FOFs, slopes on FOFs with holes in the flat, slope physics, dynamic slopes, vertex slopes, dynamic vertex slopes, and a ham sandwich to the game. Only for software mode right now, though. (OGL still gets the physics and the sandwich.) Some things still need to be done, but for now this can be merged in to be finished later.
Please make sure nothing in the vanilla game breaks before giving the thumbs up for this merge.
Since this doesn't merge automatically, if the code review turns out positive and nobody else has done it, I'll handle the merging.
See merge request !22