This is just in case someone actually tries to dump in C_START/C_END and "add" colormaps using them, not that they would ever be used currently anyway.
Admin ban fix
Okay, THIS time admin bans should work properly. Turns out the relevant code for banning did not properly consider the case of admins doing the banning, at least until now.
Unlike my last attempt at fixing admin bans (!165), this one would require both host and admin to have the fix exe assuming everyone else would be using 2.1.17, so I'm merging to next instead of master.
See merge request !167
Allowteamchange fix
Fixes "allowteamchange no" to actually work properly and NOT desync you from the game in most cases. You can now switch TO spectator freely (as intended it turns out), and switching FROM spectator is prohibited. The "Enter Game" menu option in Match/Tag now displays one of those blue window notices just like with "Change Teams" in CTF/Team Match if you cannot change teams right now. Everything else works as you'd expect.
The de-sync issue was originally reported here https://mb.srb2.org/showthread.php?p=789965#85
See merge request !168
Falling rocks fix
This fixes the rock spawners' rocks not being removed if they rolled down to the ground from a slope rather than bouncing (see https://mb.srb2.org/showthread.php?t=41963)
See merge request !162
-------
Braking no longer stops on a dime, and instead reduces your speed input. The effect is different between braking and accelerating at the same time, and braking on its own.
Increased 'driftweight' to player->kartweight*14, up from player->kartweight*12.
Changed the base drift curve formula from a range of 447 - 303, to 415 - 303. This will result in a very slightly wider drift arc at low weights. This does not effect the strength of steering while drifting.
Drifting without holding a direction now has a bonus of 0.5 frames, up from 0.
Added kartweight to the required number of drift frames, at half value. Lighter characters take up to 4 additional frames to earn blue sparks, 8 for orange.
-------
Accelcode now factors in forwardmove value rather than a boolean. This is used to enable clutching (or whatever you call it; accel+brake) to give its own result.
Fixed Thwomps killing players rather than crushing them.
Reverted buggy collision experiment from previous version.
-------
Reverted drift timer to 52 + player->kartspeed;
Reduced weight's effect on neutral drifting by 10%
Reduced weight's effect on collision by 50%
*EXPERIMENTAL*: Inverted collision's x and y. This should shunt players to the side instead of bump them forward?
--------
Driftboost formula changed to:
49 + player->kartspeed*2;
(No longer factors weight from previous version)
Collision code now factors character weight for players.
Collision code now only plays the collision sound once, rather than per player.
Weight now factors into drifting's base value. A heavier character will drift more straight with no input and have less control.
Added a cheat check in SetPlayerSkinByNum(), to force speed and weight within the boundaries of 1 and 9.
Nerfed orange turbo to 50 frames, down from 60.
-------
Changed the drift spark formula from:
51 + player->kartspeed;
To:
43 + player->kartspeed*2 + (10 - player->kartweight);
This allows an extreme heavy/accel to get sparks more often than an extreme light/speed character. Other extremes should be roughly where they were before.
--------
Hardcoded Collide.lua.
Added player boolean array "Collide", used by Collide.lua.
Walls are now bouncy by default again, like they were in 1.09.
Buffed Orange Drift sparks, the boost now lasts 60 frames up from 40.
-------
Diagonal springs now keep your current speed if you are faster than their set speed. This only affects players for now.
Offroad is no longer handled by &256, and is now handled by &2, &3, &4; Damage (Damage (Water), Damage (Fire), and Damage (Electric))
Starpost mobj radius and height have been reduced to 1*FRACUNIT, this should fix the checkpoint infinispawn bug.
doesn't draw off of the sides, and doesn't ignore snapping or widths for reasons that don't make sense
(for instance: the green bar in MI's test script showed *above* the blue one in non-green resolutions in 2.1.17)
Command-line skin selecting fix
Fixed http://mb.srb2.org/showthread.php?t=42312.
Also, fixed being able to change your skin colour during credits/cutscenes in singleplayer.
See merge request !158
Lakitu is completely commented out currently and we will be able to re-add it back later
Final lap sounds do some wacky stuff with the variables of the local player only, and also block out the music just to restart it at the same speed currently, changed it to just be the lap sound, we can use a new sound for it later
No longer does all the angle adjustments inside of the player thinker and instead does it with the controls
Should hopefully avoid any desynch from drifting
Also maybe fixed player 2's controls
I believe editing the player data in G_BuildTiccmd will cause desync, especially for anything that would effect gameplay
driftfix didn't seem to do much, will find a way to re-enable looking backwards properly later (probably change one of the buttons, DRIFTLEFT or DRIFRRIGHT?)
they are basically unused outside of timeattack and checkpointtimes isn't sent for netplay anyway
we can reimplement later with a more sensible solution for lap times in time attack
We can set a standard for friction sectors in maps and people can then do what they want with it.
Also caused problems with Ice and FOFs above friction sectors.
Mushrooms rewritten to not use Instathrust, instead they jack up your accel to 10x. Feels nicer.
Floor mushroom panels no longer activate while above them
Mushrooms force player to accelerate (and cannot brake)
K_PlayTauntSound works now. (YES YES YES HUP HUP YES HUP HERE WE GO)
Star and Mega sfx might stop correctly now in netgames (need to test)
Item box radius and height increased from 32 to 36.
(various large invisible blocks used in the level cause rain to make splashes high above the main level, high enough to make ghostly rain splash sprite artifacts appear sometimes in nearby areas)
Intermission timer is back down to 20 seconds unless something breaks with auto-transmissions again.
Also I remembered to enable Magnets this time. Super low odds on it though.
Consolidated the turning and drifting values to k_kart functions for easier editing
Removed 200cc. 50/100/150ccs are a weird amalgamation of the prior values.
This is used by Command_Addfile in the MD5 calculation code, so that it can search subfolders properly and allow addfile in netgames to treat them the same way as in SP
This fixes the grid floors in TD's Lava Mountain freezing the game if they go off the bottom of the screen far enough (they have ACWRFL1A as the wall texture, which is a single patch texture with holes)
* Fixing an inconsistency with being able to change skin colours when you shouldn't be able to, much like the previous skin change issue that was fixed.
-If the server tries to kick a joiner who is downloading the game state, they will get a timeout instead, because a regular kick would only happen once the game state has been downloaded
-Added a timeout for player ticcmd packets, again to prevent freezes to happen in some cases
-File/game state downloading is now faster, the speed is controlled by the "downloadspeed" cvar, in packets per tic
-The reason is now properly shown when the server refuses connection
-Changed the default values of "nettimeout" to 10 seconds (previously 15) and "maxsend" to 4 MB (previously 1)
-Added a "noticedownload" cvar that displays a message in the server console when someone is downloading a file
CMake: Fix nasm Linux builds
When compiling under Linux with CMake and nasm/yasm enabled, the operation would fail during linking with undefined symbols related to the tmap files.
This commit adds support for passing flags to the assembler and passes ```-DLINUX``` in order to compile.
After this change, binaries are successfully compiled with either nasm or yasm on Linux systems.
Tested on Ubuntu.
See merge request !153
Savegame hotfixes
Yes, this another netgame related fix! Named this "savegame hotfixes" rather than "ERCZ hotfix" or the like in advance of the fact we probably need a general branch for other $$$.sav fixes?
Anyway, fixes included in by this branch:
* ERCZ's lava falls now act as expected rather than being stuck in place for the map's duration, fixing all other known desynchronisation issues known in the map for the time being (yay)
* Changing sector tags in a map no longer causes joiners to netgames to have their SRB2 application stop responding etc
* Player names should no longer turn red in the console in gametypes outside of CTF/Team Match if a resynch occurs (not $$$.sav related, but it's related to netplay so I lumped it in anyway)
See merge request !150
One Eggscalibur fix
Use mobj->watertop instead of mobj->spawnpoint->z. CEZ3 is far from fixed in multiplayer, but this is still one less thing to worry about.
See merge request !148
Software plane rendering fixes/cleanup
This is mostly cleanup, with the exception that polyobject planes should now behave somewhat better than they do in 2.1 currently (translucent polyobj planes should now always be actually translucent regardless of where you view them from, for instance). I can't claim I've fixed their rendering once and for all though, there may still be bugs for all I know...
See merge request !136
Some texture-related fixes
Bugs fixed in this branch:
* upper/lower/middle textures with non-existent texture ids being capable of crashing the game. For instance, RVZ1 has colormap codes on non-colormap linedefs, which causes them to wind up with invalid texture ids because of how the game tries to interpret lower/upper textures with "#" followed by characters on normal linedefs. Fortunately these "textures" are normally not visible anyway (since they're all in control sectors) unless they are swapped with in-level textures by some crazy Lua script of some sort...
* animated single-patch textures with holes displaying garbage on first viewing (see this thread: https://mb.srb2.org/showthread.php?t=42195)
* the heights of the lighting (shadows or colormapping) from water/translucent/shadowcasting/etc FOFs become messed up when displayed on repeated midtextures.
See merge request !144
Flat changing hotfix
This should fix how Lua scripts that change flats in levels, particularly to flats that don't already exist in the level, cause SRB2 to crash for anyone who joins a netgame afterwards. (I'm not sure if it's a consistent thing or not though)
Probably needs a good test to verify the issue is completely fixed before being merged in. Maybe there are other minor things I didn't account for in this fix? I don't know!
See merge request !141
Dunno who thought it was a good idea to lump tag, nexttag and firsttag together in $$$.sav, but that meant changing sector tags caused SRB2 to stop responding since it lead to the tag lists being broken
This fixes ERCZ's lava falls not moving after joining a netgame at that stage. Possibly explains other various floor/ceiling related netgame quirks that haven't been noticed until now, maybe even in multiplayer levels.
Remove secplanes
This is just removing SSNTails's old port of ZDoom's secplane code and math, from back when he attempted slopes himself. The slopes we've had since 2.1.15 however do not need these, so we can pretty much toss the code for them out now (nothing uses them anyway).
See merge request !149
-Updated packet name list so the debug file no longer shows garbage packet names
-Replaced byte values with actual net command names in the debug file. Only the first net command in a packet will be shown though
-Added a MOBJCONSISTANCY define that makes the game takes all revelant mobjs to be counted in the synch seed
-Added a PACKETDROP define that adds two console commands "drop" and "droprate" to simulate bad internet by dropping packets
-Added/changed comments here in there in the netcode
-Fixed a minor error that would ignore one of the urgent ack slots
-Added a space between the map name and "zone" for the messages shown in a joiner's console
This fixes Brak's electric barrier disappearing for joiners to ERZC. There seems to be some issues with the lava falls there too I've found, but the electric barrier actually stays around now at least
Smoother ropes and zoom tubes
Makes rope hangs and zoom tubes suck less. Specifically, they handle corners (and vertical height changes, ala sloped rope hangs) a LOT nicer. Ported from internal.
See merge request !139
As LJSonic has pointed out, there's no need for a for loop in either case; just use sector->floorpic/ceilingpic as a levelflats index directly
(Besides, if that was to stop any out-of-bounds indexes being used, that's hardly the way to do it anyway)
Turns out sdl12's version of this function only did stuff for DC/GP2X ports; support for them have been cut out for SDL2, so for now let's just not use the function at all
I'm convinced there's going to be some stupid side effects from doing this, but it's the quickest way I can fix the polyobj planes not all appearing anyway
Console improvements
* Unused console backgrounds no longer take up memory
* Input cursor can now move left and right
* Support for selections (Shift-arrow keys, CTRL-A, etc)
* Clipboard support (CTRL-C to copy, CTRL-V to paste, CTRL-X to cut)
* Fixed handling of simultaneous modifier key presses
https://dl.dropboxusercontent.com/u/3518218/21/console.gif
None of this affects chat yet, that's not part of the console. I'll look at it later.
See merge request !133
I added similar checks for the other num* but it seems some MD2s break the other limits without knowing anyway ...so I've commented these checks out for now, unless we have further discussion regarding them later on
* Space sector support complete, bounds of drowning now altered slightly.
* Knuckles climb now has symmetrical slope support for both normal and reverse gravity.
* All slope-determining topheight and bottomheight code is now identical in form.
* Camera postimages now support slopes properly.
Moved the handling of P_PlayerInSpecialSector to P_PlayerAfterThink from P_PlayerThink.
* This allows the player to get hurt on sloped lava surfaces that are moving downwards.
* Also prevents the player from standing on death pits for 1 tic.
* Prevents the player moving 1 extra tic's worth of movement of pain when hit by sector.
* Thankfully, no consequences re conveyors.
* Like, the only consequences I've found have been positive. However, this DOES need to be thoroughly investigated before it can be allowed anywhere near Next itself.
(neither does P_CanRunOnWater, but I don't think it's necessary to make that check more complicated as you probably shouldn't be able to waterrun up steep surfaces anyways)
Also, the "teleport" devmode command can now gracefully handle coordinates specified outside maps with no/few thok barriers, which previously prevented teleport via the thok barrier bleed's sector floor and ceiling being equal.
Fixing various problems with MF_SOLID collision
(I, toast, wrote the original merge request, but Alam made this merge request because I made a mistake. Twice. In a row.)
* Solid objects are now no longer intangible when your z is less than the other object's.
* I originally thought the bug was limited to just solid objects on slopes (hence the branch name), and was wondering about undesired side effects - but looking at this gfy, this was a major bug that slopes made easier to expose.
* Unfixed = http://gfycat.com/BareLimitedCavy
* Fixed = http://gfycat.com/JubilantOffensiveGar
* You now properly lose your momentum when jumping at a solid object.
* The way I fixed this was a hack, but it was originally a much worse hack which resulted in very bizzare physics issues, so...
* Unfixed = http://gfycat.com/ShockingAbsoluteArthropods (also demonstrates the first bug)
* Fixed = http://gfycat.com/EmbellishedCourageousGordonsetter
See merge request !119
Fixed players disappearing when spindashing whilst wearing multi-layer shields
* Before: http://i.imgur.com/gxUFElo.png
* After: http://i.imgur.com/NxsOg94.png
The problem was that MT_OVERLAY's default radius and height were never getting changed from 1*FRACUNIT, and that meant that when you spindashed, the game considered it completely below the surface of the flat you were standing on. Since you're not usually clipped on flats that don't belong to FOFs, we didn't notice this aspect of the issue sooner.
(SORRY FOR THE MULTIPLE MR'S AGAIN I TOTALLY SUCK AT REMEMBERING TO MAKE SURE IT GOES TO NEXT INSTEAD OF MASTER)
See merge request !124
v.drawScaled negative scales fix
Lua now errors if you try to use negative scales with v.drawScaled, rather than crashing as it does in 2.1.16 currently. Not much else to say here.
See merge request !126
Fixing FF_REVERSEPLATFORM clipping fixes
Forgot the case where == 0.
Tested by @wolfy852 in Top Down, where the bugs this caused were first discovered.
See merge request !121
Even more slope-related fixes
What it says on the tin pretty much:
Currently included fixes:
* Pusher specials applied to FOFs did not properly account for slopes applied to the bottom plane; this probably was just a minor slipup that appeared on adding the support in the first place, I take it? (some waterfall in the last section of SUGOI's Fudge Canyon is the only place I can think of offhand where this bug is noticable)
See merge request !114
Treating " as whitespace in TEXTURES (and animdefs too i guess)
SLADE adds this character in its TEXTURES editor and makes SRB2 cry unless the lump is manually edited; this just treats it as whitespace so we don't have to think too hard about it.
Also, two I_Errors now refer to the correct lump name.
See merge request !122
(the problem was that MT_OVERLAY's default radius and height were never getting changed from 1*FRACUNIT, and that meant that when you spindashed, the game considered it completely below the surface of the flat you were standing on. Since you're not usually clipped on flats that don't belong to FOFs, we didn't notice this issue sooner.)
HOWEVER, since these changes to PIT_CheckThing do raise questions about whether there may be unintended side effects here. As a result, I may remake this for internal only if necessary.
More slope fixes (aka sorry guys I made another quick SUGOI fix)
Another slopes fix branch!
This branch currently includes a fix for:
* Knuckles gliding into a slope while in 2D mode causes him to try to "climb" on air above them, if the original non-sloped height is higher. Unfortunately he still tries to grab onto places that he can't really climb on, but at least now it's on the slope itself and not in mid-air lol. This issue is encountered in SUGOI's Retro Hill Zone, if you want to check for yourselves.
* Bustable FOF-busting code for both players AND pushables not accounting for slopes
* (Unrelated to slopes): Fix FF_SHATTERBOTTOM FOFs acting like THZ goop when stood on; I added this fix as a bonus because I encountered it in a test map of mine for the bustables fix
(Other fixes may or may not appear here in the near future, I haven't decided yet. Don't wait on me to get in any further fixes before merging, that said)
See merge request !110
Last-minute NiGHTS exiting bugfix
One single-line fix concerning the end of NiGHTS maps. Extremely small, literally zero side effects here, the only reason I'm not committing directly to master (aside from ettiquette) is that I don't have the ability to do so.
* The NiGHTS drone had a single tic of visibility when you hit the goal, which is evident stepping frame by frame through http://gfycat.com/ComplicatedComposedAoudad (the contents of which may or may not make it into 2.2). This is no longer the case.
See merge request !100
Cutscene switch fix
Yet another fix for SUGOI, lol: apparently going from a final level's post-cutscene straight to a custom credits cutscene gets the latter stuck forever in the first scene (because the game accidentally stops the cutscene responder from realising the custom credits cutscene is running). This branch of course makes a fix for that.
See merge request !108
Wall collision fixes
Fixes included in this branch:
* A fix for a specific crash encountered in a SUGOI map (sound familiar?) caused by bouncing off a wall adjacent to a slope
* A fix for solid midtextures not accounting for Effect 3/Peg Midtexture properly (https://mb.srb2.org/showthread.php?t=41462)
* A fix for solid midtextures not accounting for texture y offsets properly for non-Lower Unpegged/Peg Midtextured midtextures
* A fix for solid midtextures not accounting for "infinite" repeats (Repeat Midtexture + no repeat count set)
* ~~A fix for Effect 4 on Polyobject First Line making that particular linedef's midtexture solid in addition to making planes visible - this is not wanted if you want a polyobject with both visible planes and full intangibility.~~ Apparently they never did this anyway, don't mind me \o/
See merge request !104