* P_GiveCoopLives bundles the coop lives reward for everyone versus reward for one person in other gametypes thing into one function. Available in Lua.
Needs a bunch of changes to HUD rendering, especially in splitscreen, which doesn't try to show spectator stuff whatsoever. Also, if you're the player whose respawn determines when the map reloads, you'll see the spectator text during the front half of the fade. Unless, of course, it's 2-player mode.
* cv_sharedstarposts - Makes everyone share starposts, defaults to "On"
* cv_respawntype - Defaults to "Starpost". If set to that, people respawn at the starpost you just hit (assuming cv_sharedstarposts is on - may have to combine the two variables later, but seperate for testing for now). The other option is the old, unrestricted spawning. We COULD add TD bubble spawning at a later time using this variable, though.
The level DOES reset if everyone dies, but not in a way which allows for Mystic Realm style non-resetting resets. I'll handle that later.
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
This removes exactly one feature in exchange for a greater number of files to be loaded. I asked around, and people don't actually like what it currently does (load unimportant server-side files if you can findfile it locally), so.
Can be reverted if requested.
Nojumpspin fix
MI can attest to this being a problem that's now solved.
To test, check out root/!LatestSRB2Files/srb2win_branch_jumpfixes.exe and root/MonsterIestyn/robohood.wad.
See merge request !95
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.
* GE_NIGHTSPULL (for it to chase you once paralooped) - Sun emblem
* GE_NIGHTSITEM (for hidden until paralooped) - Moon emblem
Combined means that you essentially have to loop it twice.
Also, revamped NIGHTSITEM to suck a little less (and have more compatibility with MT_EMBLEM).
<Alam_Squeeze> p_floor.c:2932: warning: 'widthfactor' might be used uninitialized in this function
<Alam_Squeeze> p_floor.c:2932: warning: 'heightfactor' might be used uninitialized in this function
<Alam_Squeeze> m_menu.c:1907: error: initializer element is not constant
<Alam_Squeeze> m_menu.c:1907: error: (near initialization for `OP_ScreenshotOptionsDef.drawroutine')
<Alam_Squeeze> m_menu.c:9353: warning: 'M_DrawScreenshotMenu' defined but not used
<Alam_Squeeze> Makefile:770: recipe for target '../objs/Mingw/Debug/m_menu.o' failed
<Alam_Squeeze> make: *** [../objs/Mingw/Debug/m_menu.o] Error 1
* Search case is now handled via cvar instead of assumed based on system.
* filemenusearch (previously strsystemstr) uses static char[] to prevent stack suffering.
* New cvar for searching from start of string instead of anywhere in it!
* Menu tweaked for the above.
* Reverted slash from pathsep.
* Clean up titlemapinaction so that it isn't true when you're playing
* Don't print "SPEEDING OFF TO [ZONE] [ACT 1]..." on screen if it's a titlemap - keep a nice and pretty black screen
Level specials setup stuff
Some changes to level setup, largely inconsequential for gameplay but maybe helpful for Lua scripting:
* gravity, weather, and some other internal variables are set to their defaults before loading things, so their values from a previous level don't affect mobj spawning potentially
* Tag lists are also initialised before loading things, so that tag-based search functions (such as P_FindSpecialLineFromTag) can be used internally for the maces and particle generator. This should probably extend to Lua as well
* the level header "forcecharacter" no longer recognises "255" as "None" anymore. This is because it no longer takes skin numbers (as of whenever that change was added... version 2.0?), and level headers are auto-cleared when edited anyway.
See merge request !88
* Improved layout of addons menu.
* Disabled input for 5 tics after a console-touching enter key command on the menu, so that weird stuff doesn't happen.
* Added Add-on options.
* cv_addons_option - chooses save location. A little smaller in scope than the weird Default/HOME/SRB2/Custom thing for screenshots - now it's SRB2 Folder and Custom.
* cv_addons_folder - goes with Custom for above.
* cv_addons_md5 - chooses whether to identify files on the addons menu with name comparison only, or with checksum comparison as well (more intensive hence not default).
* cv_addons_showall - chooses whether to show just supported file extensions, or all
* Some minor other refactors.
Bad:
* Screenshot options menu crashes on access for some reason (to do with itemOn not being valid?????) looking into
New User Experiences - Menus, Closed Captioning, and other non-substantial tweaks
Hello! I'm going to words.
* Menu stuff!
* Scrolling menus when there's lots of options instead of doing lots of nestling!
* Video Options, Server Options, and Screenshot Options have been updated to take advantage of this.
* Headings are prettier in general to match the level platter's headers!
* Expose a bunch of stuff Mystic wanted exposed, without iundating the player!
* Little arrows!
* Better, clearer control menus!
* I know this is probably related to the above, but whatever.
* Very organised with lots of renaming and magical clarifying context headings!
* Killed the analog-only Camera L/R keys in favour of merging them with the regular turn keys in that context!
* Also little arrows!
* Statistics!
* One page instead of two, loses a lot less info than you'd expect!
* The benefit of having them on one page is greater than the loss of being able to individually discern which of your Score/Time/Rings is incomplete.
* ALSO also little arrows!
* Secrets checklist!
* Scrolls vertically!
* Allows for autogeneration of conditions based off conditionset, which allows for names of required levels to be hidden if you haven't played them yet!
* Still allows overriding condition string per traditional checklist.
* This allows us to show every secret's condition without letting it be spoiled or overflowing the everything.
* Also ALSO also little arrows!
* Closed captioning!
* Console command "closedcaptioning on/off".
* Shows stuff in the bottom right hand corner of the screen.
* sfxinfo[sfx_name].caption = "Butt.".
* S_StartMusicCaption(string, tics, optional player) allows for a caption to play without being anchored to a specific sound.
* Color Profile!
* Using only the best in advanced cube-based majyks.
* cv_gamma now goes from -15 to +5!
* cv_saturation - from 0 to 10!
* A new menu for modifying the hue, saturation and gamma of specific corners of the cube (RYGCBM) independently of the master options!
* Screenshots/Video Mode now supports turning on/off circumstantial color profile alterations (cv_screenshot_colorprofile).
* Spring cleaning!
* cv_allcaps is dead.
* Sudden death and old match scoring (25 points for shield damage as the only change??) is dead
* A few things are taken off the menu because they're not that relevant to have.
* cv_competitionboxes now applies to race as well.
* Failed teleports go nuh-uh.
* Question mark boxes don't have doomednums anymore, so they can't be placed in singleplayer and used to get free lives by playing with the tv_extralife etc stuff.
* Other tidbits!
* HUD offsets are tweaked to give one digit less space to score and one digit more space each to time and rings to match up the right edges.
* Emerald tokens show up on the level complete screen and are loaded into a coin slot at the end of the tally.
* Speaking of Emerald tokens, they now give score all the time, and continues instead of 50 rings when you have all Emeralds.
* Moved Race HUD down, and made it go bing bing bing BONG.
* V_DrawCroppedPatch now properly handles topdeltas.
* Minor tweak to GFZ3 eggmobile's pinch to be more lenient.
* Hudnames for skins now replace full stops with katakana dots. We could make it replace a different character instead if we really wanted to, but I figure this matches what is desired.
Check out ```<root>/!LatestSRB2Files/srb2win_branch_deeznux.exe``` to try it out.
See merge request !91
* Menu shuffling for addons. Shows up on main menu and MP pause menu if you're host/admin (not encouraged in SP).
* The menu yells at you in red text if you're playing, warning of issues.
https://gfycat.com/DizzyEnergeticCygnet
I will make it prettier.
(Also: stristr. Since the Windows (and others?) standard library doesn't have it for some reason, I modified code someone put on StackExchange as a stopgap; once I'm ready to get on IRC for the day, we'll discuss attribution/rewriting.)
* M_StartMessages when file loading goes wrong! (Determined by CONS_Alerts of warning level CONS_WARNING and CONS_ERROR happening after W_LoadWadFile has been called.)
* Now actively tries to keep your place on the menu if files are deleted between calls to preparefilemenu().
* More enums! DIR_ (for if you want to try embed more metadata in the dirmenu strings) and REFRESHDIR_ (for refreshing the menu and handling warnings).
* Handle changing size menu between calls to opendir() better.
* Don't crash on draw/enter attempt if one of the dirmenu's is null.
* Moved the addons menu to OP_MainMenu instead of MainMenu for now so it can be tested in MP without needing to mess with several menus.
* Display the amount of space used for serverinfo_pak's fileneeded on the addons menu, both visually and with a percentage.
* Instead of needing to press backspace, going back is now handled via an "(up arrow) UP..." entry in the table.
* Maximum depth is now #define'd instead of dotted around everywhere.
* Enums!
* Exec for .txt (with confirmation dialog) and .cfg (without)!
* Complaints about folders and etc now mention the folder names.
* A shrinking folder now prevents dir_on[] from going beyond its end.
Basic as fuck UI, and the controls for manipulating it suck, but the basic elements of the feature set I'm looking for have been implemented in some form or another. More at a later time.
MI, be glad I didn't do this in deeznux ;P
Skybox improvements
Some improvements to skyboxes and new features for them:
* *The Thing's Z position now determines the relative z position of a skybox viewpoint from the ground, the Thing's angle no longer affects the Z position at all.* This should also fix objectplace breaking skyboxes after you place a Thing, and allow Z heights to be more easily controlled by custom skybox mobjs set by Lua's `P_SetSkyboxMobj`.
* The skybox viewpoint Thing's "Parameter" value (or the multiple of 4096 added to the Thing type, if you're still using SRB2DB) determines the ID number for a viewpoint or centerpoint, a value between 0 and 15. By default the game uses the viewpoint and centerpoint using ID 0. Note: this ID system does not apply to custom skybox mobjs set by Lua, only to `MT_SKYBOX` mobjs spawned by Things for a map.
* **Linedef type 448** has been added as a linedef executor special for changing the skybox viewpoint and/or centerpoint used, making use of the new ID system mentioned above:
* By default, only the *viewpoint* will be changed. The front x offsets set the ID of the new viewpoint to use; if the number is out of range (numbers accepted are 0 to 15), the game will simply not use any viewpoint at all.
* If the "*Block Enemies*" flag is set, the centerpoint will be changed as well. In this case the front y offsets set the new centerpoint ID to use.
* If the "*Solid Midtexture*" flag is set, the viewpoint will **not** be changed at all. Combine this with Block Enemies to make the linedef type change only the centerpoint if needed (otherwise the linedef will do nothing lol).
* By default, only the player who triggered the linedef will see the skybox being changed. If a player did not trigger the linedef executor directly, no change will be seen by anyone. If the "*Not Climbable*" flag is set, the skybox change will be "global", i.e. it will be seen by all players in the map.
In my folder on the FTP I've made a subfolder called "skybox improvements", and in it are the following files:
* srb2win-skyboximprov.exe - the test exe for this branch I've compiled myself
* skyboxchange-test.wad - an edit of my test map for my skybox change Lua script release on the MB, to test out the new skybox change linedef type.
See merge request !89
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
Used instead of pLocalPalette when attempting to determine objective truths, such as "the colours of this gif without color profile modification" and "what indicies should this colormap remap to".
Also, made f_wipe.c's paldiv only get calculated once.
* Serious refactor of - and internal exposure of - what has become S_StartCaption().
* Renaming of a few existing captions.
* The prevention of access to - or writing over - sfx_None's stuff in SOC or Lua.
* The new Lua wrapper function S_StartMusicCaption(string, tics, optional player), which essentially allows custom music captions to be created. (This is best used for stuff like final lap music in SRB2 Kart or bonus time in a thokker-like game, not a comprehensive Now Playing expy. That'd be a different kettle of fish.)
Also, updated all the lock-on stuff to use P_IsLocalPlayer instead of rolling my own.
A less memetic message: On permission of Mystic, rejiggered a few things such that Race uses cv_competitionboxes, allowing the menu to be nicer.
Also:
* disabled the doomednum for ? boxes
* made A_MixUp play sfx_lose if you're in a gametype that can't use it
* Removed the all-teleporters option from cv_competitionboxes. It could just be done by tweaking the random monitor toggles, anyways.
This means setting the skybox view angle is no longer stupid, objectplace no longer breaks skyboxes, and Lua-defined skybox mobjs can actually set a Z position more easily now.
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
This allows tag lists, gravity, weather, and the "CheckFor" vars to be initialised before running P_LoadThings or P_ResetDynamicSlopes, in case they could affect mobj spawning or cause a netgame desync somehow by carrying over the previous level's values
No doubling texture heights plz
If you didn't know, apparently SRB2 was hardcoded to double the height of 64x64 textures created using TX_START/TX_END. This has frustrated some a lot. This branch removes this hack at last (there doesn't appear to be any visual issues resulting from removing it, anyway).
srb2win-nodoubletexheight.exe can be found in my FTP folder.
See merge request !85
First person HUD drown numbers fix
This branch fixes the following issues with the first person HUD when drowning:
* "0" turning into Sonic's drown sprite, since both sprites happen to be named DRWNA0
* SF_MACHINE's special drowning numbers from 3rd person not being used
See merge request !80
Basically in preperation of supporting colourblindness modes I implemented the following link when loading palettes.
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter24.html
This basically means I can do whatever the hell I want to the colour profile of incoming paletties, and nobody can stop me. Muahahahaha etc.
Also, I added a saturation feature to show off its full potential, converted gamma from a table to a factor of the calculation, tweaked some menus and made the default value of cvars show up on sliders. Because that's how I roll.
MI's unimportant code cleanup
Just removing a bunch of unused variables/function prototypes from the source code and similarly minor stuff, nothing here should change gameplay much (if at all).
See merge request !71
MI minor refactoring
Just moving the locations of some consvar externs from d_netcmd.h to other header files in which I think they should REALLY belong. Ultimately this should not affect gameplay whatsoever, it's just code cleanup.
See merge request !81
* Put brackets around the sound names on the reccomendation of a friend who works with disability in gaming.
* Update a bunch of sound names to better match what they actually do in SRB2.
* Provides a helpful description for the hearing impaired, whether permanent, temporary or situational.
* Consvar "closedcaptioning", with on/off values available.
* Only works if sounds are on. This is frustrating. I will see what I can do to allow it to work with sounds off in future, but for now it's dependent in order to properly accept or decline sounds.
* Thanks to MI for making that wiki page a lot more comprehensive a few days ago.
* Weapon ring is now a seperate sfx_wepfir instead of doubling up on sfx_thok.
* Also, made V_StringWidth work with V_NOSCALESTART.
* Made it possible to switch statistics pages using left and right arrows. Their previous functionality has been given to Page Up and Page Down.
* Swap over header style to the new version for everything.
* Move Master Server into Data Options, since it needs to be exposed somewhere.
* Show resolution on main Video page.
* Optimise by using V_RightAlignedString instead of V_DrawString with V_StringWidth.
* Revamp sliders. (Requires a new patch.dta I'll upload in a little bit in order to be perfect, but does pretty well w/o replacement graphics too.)
* Revamped base video menu and moved all the relevant stuff from the Game Options Menu onto it. Still mulling on where to put the Master Server reference.
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)
Recreated my previous code using floats in case the issue was overflowing that could be mitigated using floating point precision - but still doesn't work. Pulling my hair out.
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
Revamped Level Select (platter view)
Seriously revamped every level select instance in the game to use a more attractive and easier to navigate platter view, including:
* Game CLEAR! save (Title/Pause menus)
* Secrets Menu (including custom ones)
* Record Attack/NiGHTS Mode
* Server creation (Online/2P)
* MP Pause level select (Online/2P)
As a result, the layout of the last three above menus has been changed to varying degrees of difference.
Also, bonus feature: using level select (or MAP MAPxx without -force) in Co-op multiplayer won't reset your score, will keep any lives you have above the startinglives variable, and will not take away all your emeralds. The -force thing prevents both warping directly to special stages to rack up the emeralds AND ensures there IS a way to start a new game.
Check out <root>/!LatestSRB2Files/srb2win_branch_levelselect.exe with the latest patch.dta to see more.
Also, LF2_WIDEICON lets you do this. https://gfycat.com/MenacingClearAngora
See merge request !68
Suggested default settings
Making a merge request for suggested new default settings, because saying "hey, I think this would be a better default, you guys should try it" in IRC won't actually get people to give you opinions on them ;p
Camera distance is 160 now, height is 25, and speed is 0.3 (previously 128, 20, 0.25, respectively). Mouse sensitivity on both axes is now 12, previously 35. The default move/look/jump/spin keys is Mystic's proposed scheme from the New Player Experiences topic (https://mb.srb2.org/showthread.php?t=42095).
Camera settings also now can save to your config.cfg, and they won't try resetting back to the default at every chance it gets. (~~As a side effect, analog mode won't have higher cam_dist anymore. Poor analog mode, no one cries for you.~~ Now increases cam_dist in analog mode by x1.2!) This makes it so everything that's different can be easily reverted back to the older setting.
Test exe in my folder, <root>/TehRealSalt/srb2win_changed-defaults.exe
See merge request !75
* Getting hit whilst on a swinging mace doesn't send you off in roll/jump state.
* P_GetJumpFlags replaces a bunch of copypasted code.
* Homing attacking a spring sends you directly on its path, rather than rocketing off in the direction you were preiously hurtling in.