Commit graph

3077 commits

Author SHA1 Message Date
toasterbabe 317259a459 Two fixes to playersforexit changes.
* Crash prevention if total somehow becomes zero.
* Don't waste time multiplying and demultiplying the HUD check if it's just gonna net you the same number.
2017-07-08 19:02:28 +01:00
Monster Iestyn 023d91a02e Merge branch 'public_next'
# Conflicts:
#	src/y_inter.c
2017-07-08 17:49:54 +01:00
Monster Iestyn 0bfd4106fb Merge branch 'next' into public_next 2017-07-08 17:43:28 +01:00
toasterbabe b197dcdb1f A little bit of monitor love.
* Rename "Unknown" options to "Mystery".
* Make Random monitors work consistently in singleplayer if hacked/SOC'd in.
2017-07-08 12:31:37 +01:00
toasterbabe 5cc1b0dcd0 Exiting icon on the tab menu! (Requires new patch.dta) 2017-07-08 11:41:32 +01:00
Monster Iestyn f0ffd691f4 Merge branch 'master' into next 2017-07-07 22:47:34 +01:00
Monster Iestyn fe3f4f4ed1 Merge branch 'pwease_no_kicky' into 'master'
Pwease no kicky

Don't kick Tails! Also, a movement for the WRITESINT8 to prevent modification to buf if the function bails early.

This can go into Master, right? It only matters for the host, and it's explicitly only having a major effect outside of netgames.

See merge request !201
2017-07-07 17:45:59 -04:00
Monster Iestyn 4752109233 Some more tweaks of my own:
*Add CONS_Printf messages for !netgame checks
*Arg count is checked first regardless of netgame status for both kick and ban, < 2 is checked instead of == 1 just in case these weren't called from console for some stupid reason?
*Moved Command_Kick's buffer vars to within the code that actually does kicking stuff
2017-07-07 22:40:00 +01:00
Monster Iestyn b291390edf Merge branch 'sp-tally-non-green-res-hud-fix' into 'master'
Single Player/Coop tally screen fixes

* The TIME/SCORE part of the HUD now doesn't move from the position it was before the tally screen started in non-green resolutions. The example screenshots of this bug and the fix for it below are all taken in 640x480:

  How it should be:

  ![](https://dl.dropboxusercontent.com/s/4h86gnm0tvkwjxh/srb20293.png)

  How it displays in 2.1.19:

  ![](https://dl.dropboxusercontent.com/s/awyfupn5wgo40rv/srb20294.png)

  How it displays in an exe with the fix:

  ![](https://dl.dropboxusercontent.com/s/gbstznautbl5f38/srb20295.png)

* The time display at the tally screen no longer limits the minute number to between 0 and 59.

  How a time > 60 mins displays normally just before finishing the level:

  ![](https://dl.dropboxusercontent.com/s/lclonkwfd656t55/srb20296.png)

  How it displays afterwards (it's supposed to be 61:19 but it's wrapped to 1:19 instead):

  ![](https://dl.dropboxusercontent.com/s/obv3fq2qeto9uo3/srb20297.png)

See merge request !202
2017-07-07 15:23:51 -04:00
toasterbabe 54a8602c4c Woops, forgot about other gametype spawncamping. 2017-07-07 14:39:51 +01:00
toasterbabe 88546abb08 Fix a few things noted during a test netgame with Salt and FuriousFox.
* Hide the individual lives on the tab menu whenever they're irrelevant.
* Make co-op spectators appear on the tab menu.
* Hide one frame of spectatorhood stuff in splitscreen.
* Fix joining netgames whilst in a special stage not giving the startinglives.
* Make monitors that don't appear to do anything play the failure sound.
* Only make players flash if they're REspawning, rather than spawning into a fresh level - unless it's a NiGHTS level, in which case never.
2017-07-07 13:35:48 +01:00
toasterbabe 1a7a0662ba * Set player->outofcoop to false if it's not a coop gametype.
* Expose player->outofcoop to Lua.
2017-07-06 14:53:52 +01:00
toasterbabe f809923f69 * If cv_playersforexit != "One", add a count of the number of players required to exit to the end tally.
* Make the default value of cv_playersforexit "All".
* Correct the greying out of the lives counter for cv_cooplives == "Single pool" to only be when you can't respawn.
2017-07-06 14:39:51 +01:00
toasterbabe 0bf676498a woops, the check was accidentially inverted 2017-07-05 22:43:45 +01:00
Monster Iestyn e8df99c632 They didn't use V_HUDTRANS before and they probably shouldn't, my fault here 2017-07-05 22:30:18 +01:00
toasterbabe 014c1d8f03 https://cdn.discordapp.com/attachments/297148222332469249/332227405747847168/unknown.png
betterexit integration!
2017-07-05 19:33:41 +01:00
Monster Iestyn 815d10e15d Display minutes in full, so 60:00 for instance displays as 60:00 and not 0:00
The normal HUD display while playing a level doesn't do this, only the tally screen does it for some reason
2017-07-05 19:25:11 +01:00
Monster Iestyn aca7a574f8 Copy+paste st_stuff.c functions and macros to accurately draw SCORE/TIME on the tally screen like they are when actually playing the level 2017-07-05 17:05:39 +01:00
toasterbabe 9a1e1180ff Also account for bans, pff. 2017-07-05 16:29:21 +01:00
toasterbabe 60e21381ab Don't kick Tails!
Also, a movement for the WRITESINT8 to prevent modification to buf if the function bails early.
2017-07-05 16:20:23 +01:00
toasterbabe e55f24419e Additional opportunity for F12 message exposure pounced upon. 2017-07-05 13:44:50 +01:00
toasterbabe fa42875aee Better setting names/values for various new and old console variables impacted by this branch. 2017-07-05 12:34:13 +01:00
toasterbabe 125646e521 Some minor tweaks to make countdown not COMPLETELY broken. 2017-07-04 21:33:16 +01:00
toasterbabe e5eb6720f0 Change how countdowns are presented.
I would have changed how they actually worked, too, but I ended up breaking it and getting too frustrated/tired to continue.
2017-07-04 20:49:38 +01:00
toasterbabe dad6ce9796 * Tweaked some monitor toggle names I forgot to modify.
* Added arrows to the "sky room" menu.
2017-07-04 14:59:48 +01:00
toasterbabe a65598a97a Fixed Game Over being broken in singleplayer. Woopsie doodle! 2017-07-04 14:57:22 +01:00
toasterbabe bc066a16a0 Whoops, I did some menu stuff in here. Oh well.
NEW COOP BASED:
* Add "Infinite" option to cv_cooplives, inspired by SUBARASHII. Lives still exist, but are hidden from the player's view, and are prevented from falling below 1 at any cost. As a result, made the variable CV_CHEAT.

OTHER MULTIPLAYER BASED (semi-related):
* Made cv_autobalance an on/off switch which determines the allowed difference based on the number of people in the server, instead of a weird and opaque number from 0-4.

MENU BASED (not related):
* Add horizontal arrows to menu options which respond to the arrow keys.
* Make the menu arrows bob.
* Switch out the seperate arrows for combination arrows on the joystick menus.
* Minor cvar description tweaks.
2017-07-04 13:17:29 +01:00
toasterbabe 2fd6a20be0 * Fix some HUD offsets.
* Don't attempt to respawn anybody when changing cv_coopstarposts and nobody CAN be respawned.
* Make Rings transparent (and not flash) when you're a spectator.
2017-07-03 16:33:52 +01:00
toasterbabe 50496970d1 Fix weird visual artifacting caused by restarting the level in co-op, which was a direct result of my code being messy. This is significantly better to deal with, anyways. 2017-07-03 15:43:29 +01:00
toasterbabe ca76dd41f8 Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into new_coop
# Conflicts:
#	src/p_user.c
2017-07-03 15:41:00 +01:00
Monster Iestyn 298c1af045 Merge branch 'lua-archive-value-fix' into 'next'
Lua archive value fix

This fixes some potential problems with archiving mobjinfo_t/state_t data via Lua in netgames (whether as custom mobj/player vars or by NetVars hook). Thanks to LJSonic for pointing this out to me.

See merge request !200
2017-07-02 20:23:29 -04:00
Monster Iestyn 663d8a1f00 Merge branch 'jumping_springs' into 'next'
No more jumping springs FOR REAL!

The issue was that because both them and the player had MF_SOLID, the tmfloorz of the spring was getting set to above the player (or vicea versa with tmceilingz), forcing it upwards with them under certain circumstances.

Now, springs only acknowledge the solidity (for purpose of tmfloorz/tmceilingz) of objects they CAN'T launch.

Test with ```<root>/toaster/srb2springsagain.exe``` and ```<root>/DrTapeworm/springtest.wad```, via Mystic's secret server that [SOME jerk](https://www.youtube.com/watch?v=TRjXE_ZMT2s) keeps leaking from.

See merge request !199
2017-07-02 20:22:53 -04:00
Monster Iestyn c751971d57 Fix integer type slipup in ArchiveValue for saving mobjinfo/state #s that LJSonic spotted
Apart from the fact that UnArchiveValue reads UINT16 for both anyway (which alone causes problems), but UINT8 isn't even enough to store the higher end of the object types list and definitely most of the states welp
2017-07-02 16:50:11 +01:00
toasterbabe 9797ae31a6 Fix the springs jumping!
The issue was that because both them and the player had MF_SOLID, the tmfloorz of the spring was getting set to above the player (or vicea versa with tmceilingz), forcing it upwards with them under certain circumstances.

Now, springs only acknowledge the solidity (for purpose of tmfloorz/tmceilingz) of objects they CAN'T launch.
2017-07-02 16:48:58 +01:00
Monster Iestyn 252cdb0c28 Merge branch 'private_flatsprite' into 'master'
OpenGL papersprites

I don't know if anyone actually tested Sryder's original OpenGL papersprites support before it was merged in, but there was some issues with the papersprites themselves "wobbling" about in a sort of weird way depending on the angle you view it from or where you are. It's easiest to see what I mean if you just load up sawb.wad, and strafe about when viewing one of the sawblades.

Thankfully all I really needed to do was tweak the way angles work for papersprites. I also cleaned up Sryder's original code a little, not that I really needed to do so though.

See merge request !96
2017-07-02 09:46:44 -04:00
Monster Iestyn 64b3861168 Merge branch 'mapthing-spawn-hook' into 'master'
"MapThingSpawn" hook for Lua

A hook for adding special stuff to mobjs spawned via a map thing on level load, like special features depending on the map thing's flags, angle, z position, extrainfo, or anything else I didn't think of.

**Function syntax:**
`functionname(mobj, mapthing)`

where `mobj` is the spawned mobj (type mobj_t obviously), and `mapthing` is its corresponding map thing (type mapthing_t also obviously). Note that `mapthing.mobj` will not yet be set to `mobj` at this point (it's set afterwards, provided you don't remove the mobj or something stupid).

Returning `true` overrides features in place for existing mobj types (currently not all existing features are overridden, I may change this; see the source code for what IS overridable for now), returning `false` runs them as normal.

**Hook syntax:**
`addHook("MapThingSpawn", functionname, MT_OBJECTTYPE)`

where `MT_OBJECTTYPE` is the object type to apply the hooked function for. As usual, if this argument is omitted or set to MT_NULL, the function runs for all object types.

**Test resources and where to find them:**

* srb2win-mapthingspawn.exe, my folder on the FTP - test exe, obviously
* luatest-mapthingspawn.lua, same place - a simple Lua script that changes the scale of MT_GFZFLOWER1 (the orange flower) based on the map thing's angle (0 degrees is normal, 90 degrees is 2x bigger, 180 is 3x bigger, 270 is 4x, etc etc)

See merge request !83
2017-07-02 09:46:11 -04:00
Monster Iestyn 68d8906a36 Merge branch 'mi-code-cleanup-once-again' into 'master'
MI code cleanup once again

Code prettification branch 12472849127, no real changes to gameplay except a bunch of outdated SOC features have been removed or disabled (most notably, Callum's old texture/patch SOC implementation). Though the changes here might also speed up game startup a teensy bit I suspect, possibly?

See merge request !102
2017-07-02 09:45:30 -04:00
Monster Iestyn 7b551ed409 Merge branch 'animdef-type-check-fix' into 'master'
Animdef type check fix

This fixes Sphere's problem with ANIMDEFS, where animated textures and animated flats with the same name cause one or the other not to animate (depending on the order they are in the ANIMDEFS lump, not the WAD; if the texture animdef comes first the texture animates, if the flat animdef comes first the flat animates).

The game now compares the "type" (i.e. whether the anim is for a texture or flat) of a new animdef with that of existing typedefs, before deciding whether to ignore it based on the starting lump's name.

See merge request !100
2017-07-02 09:44:39 -04:00
toasterbabe fe4dcee9ad fix inaccurate SC_FULLBRIGHT declarations 2017-06-26 16:30:23 +01:00
toasterbabe b2fc2e03ba * Always remove linkdraw vissprites from unsorted drawing chain.
* Make the related I_Error more descriptive and "#define PARANOIA"'d only.
2017-06-26 16:11:50 +01:00
toasterbabe dda9148e56 Fix issue with precipitation not modifying its mobj reference, resulting in Smiles' tails disappearing in CEZ3.
Also, as a result, safeguard some stuff against referencing stuff that's outside of *precipmobj_t's domain.
2017-06-26 15:53:20 +01:00
toasterbabe 59ea08ee11 * Change the order of operations such that linkdraw sprites aren't ever used for ordering comparisons with non-linkdraw sprites.
* Refactor of the unbundling to not involve modifying the next/prev links.
* Make the booleans in vissprite_t use flags stored in sprite->cut instead.
* Make the linkdrawn sprites much more linked - ie, same brightness (unless independently fullbright), same colormap, and don't draw if the tracer isn't being drawn.
* Other minor corrections.
2017-06-26 14:44:10 +01:00
toasterbabe 93dce12fce Seriously improves the reliability of the linkdraw system (in Software, the only rendering engine which actually does anything with this information), reducing the number of visual errors it produces significantly.
Of particular note: Standing in shallow pools of water as Smiles will now reliably associate the bottom half of the tails following mobj with the underwater portion of Smiles' body, and the flicking ends with his un-submerged head.

Deliberately engineered to only affect objects with MF2_LINKDRAW applied.
2017-06-25 20:46:30 +01:00
Monster Iestyn c653289121 Turns out we don't need to use SDL_SetWindowTitle on its own, since SDL_CreateWindow already deals with the window title anyway. So I've disabled everything related to Impl_SetWindowName for now
Also what were you thinking Fury?!? window shouldn't be NULL for SDL_SetWindowTitle, you backwards person you
2017-06-25 20:22:01 +01:00
Monster Iestyn 0eaebb16fc Check if existing animdefs have the same type as the animdef we're parsing 2017-06-25 18:17:05 +01:00
Monster Iestyn f44d769d39 dehacked.c cleanup
*removed Texture/Patch SOC implementations, since they weren't used in the end
*removed remnants of AnimTex and some Spritename thing
*none of the save* arrays in DEH_LoadDehackedFile were being used, so I removed all related code disabled or otherwise
*DEH_LoadDehackedFile doesn't need a "wad" param anymore since only the Patch block was using it
2017-06-24 20:33:56 +01:00
Monster Iestyn 7d82ac406e whoops forgot to change these two 2017-06-24 19:27:29 +01:00
Monster Iestyn b2941087de Move all the leftovers of the "title" print code into D_Titlebar, since it's only used by DOS now 2017-06-24 18:39:17 +01:00
Monster Iestyn 9d24186ecd Removing D_SRB2Main's OS2 window title code
"pmData" was originally declared in the files in the (non-SDL) OS2 source subfolder, last known to be present in Demo 4.1's source code ...said folder has not been around for over a decade, so this would definitely fail to compile if you tried compiling for OS2 without SDL anyway
2017-06-24 18:27:43 +01:00
Monster Iestyn d263c4fcd4 Remove unused static vars in d_main.c (and remnants of some of them) 2017-06-24 18:15:06 +01:00