Ignore askinfoviams
Turns out PT_ASKINFOVIAMS is an obsolete packet type anyway, the MS doesn't send it at all. So let's just ignore it in the netcode then. (the online page just acts like a client and sends PT_ASKINFO, and is not part of the MS itself)
See merge request !191
Netcode hotfix
Various netcode fixes are included in this branch. Most important of all of course is a fix for the Net_CloseConnection invalid node -32769 detected message thing, or rather what actually caused that to occur.
It's a merge to master since everything here should be compatible with 2.1.18: the only main changes are related to recieving packets (whether you're the host of a netgame or a client), which AFAIK shouldn't cause desyncs if you played with these fixes on a 2.1.18-hosted netgame (or hosted a netgame with the fixes and 2.1.18-using players join you).
See merge request !185
A bunch of bugfixes about too many wads in netgames
Fixes:
* Having bunch of music WADs added and then breaching the file limit(s) through joining a server with important files added. http://mb.srb2.org/showthread.php?t=42662
* Having a bunch of music WADs added, joining a server, and then breaching the file limit(s) when the server adds a file. https://mb.srb2.org/showthread.php?t=34664
* Informing the adminplayer whenever they try to send a request addfile net command but the file limit(s) are reached.
Done into next because I might as well be 100% safe, even though this could probably work on master as well.
See merge request !187
Missiles 'n slopes
Fixed that thing where missiles like sliding up slopes for some reason.
This isn't a 1:1 fix compared to non-slopes - missiles still like stepping up over the borders of sloped sectors and will continue going as long as they never touch that ground again, whereas they can never step up on flat ones - but this fixes the most egregrious issue.
See merge request !181
* if you sent it to a client rather than the server, game over, your connection is closed
* if files that don't exist or are too large are requested are listed, game over, your connection is closed (they should have been checked on YOUR side beforehand, silly)
* if the server has downloading disabled anyway, ...yeah, you get the idea
Don't worry, I made sure Got_RequestFilePak cleaned up the full file request list for the node in case of failure
--------
Fireballs narrower
Fake Item is no longer restricted while held
Held items that are restricted remain in the item wheel until used
Magnet now correctly hits nearby players and objects
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