Commit graph

55 commits

Author SHA1 Message Date
toaster
3ee8713e46 Dehardcode menu gametype selection, part 1
- Introduce `menugametype`
    - Controlled by IT_KEYHANDLER/M_HandleMenuGametype
    - Excludes gametypes that do not support multiplayer by default
        - GTR_CAPSULES and GTR_BOSS for now, but also user-specifiable GTR_NOMP
- Remove gametype_cons_t and G_UpdateGametypeSelections, an obstacle in the way of infinitely allocatable custom gametypes
2022-12-30 15:23:26 +00:00
toaster
8431e52687 All playsim-internal distinctions between Race and Battle are now gametype rules.
New:
- GTR_POWERSTONES
    - Handles spawning in Battle Emeralds (currently only works stacked with GTR_PAPERITEMS)
- GTR_ENCORE
    - Codifies that Race can use Encore and Battle can't.
- GTR_CLOSERPLAYERS
    - A gametype where players are encouraged/expected to be closer together. (All of the following was GT_BATTLE specific)
        - Drafting/tether has increased strength/effective distance
        - Spindashing is stronger
        - Invincibility chaining has less effect
        - Grow has a lower total duration
        - Flame shield is more uncontrollable

Extra functionality
- GTR_CAPSULES
    - Prevents usage of lives in Grand Prix (so Race, and the upcoming Special and Boss gametypes, can have 'em)
- GTR_CIRCUIT
    - When not present, Flame Shield has perma-full meter
    - When not present, overrides gamespeed with KARTSPEED_EASY
    - Presence of Best Lap sticker in Time Attack menu
    - Seperation between Time Attack and Break The Capsules modeattacking roulettes
- GTR_POINTLIMIT
    - Handles the switch between a gametype recording/displaying Times and Scores in a few places
    - Handles displaying "WANTED" players on the minimap

Missing simple substitutions
- A whole bunch of cases where player->bumpers was checked with gametype == GT_BATTLE rather than GTR_BUMPER
- GTR_OVERTIME handles the overtime special icon on the minimap
- GTR_BATTLESTARTS is honoured in K_DoIngamerespawn
- The Replay hut is closer to supporting custom gametypes

Removals
- GTR_LIVES
- GTR_SPECIALBOTS
    - Given that grand prix persists between modes, these are special game-controlled features and not gametype-specific.
- GTR_WANTED
    - WANTED as it existed is functionally dead
2022-12-24 22:43:00 +00:00
Sally Coolatta
82df346417 Merge branch 'master' into special-stages 2022-12-22 05:18:56 -05:00
Sally Coolatta
36e9a56f29 Add K_TimeAttackRules
Lets Time Attack capsules spawn in Free Play, and prevents Time Attack specific rules from happening in Special Stages
2022-12-17 01:05:30 -05:00
toaster
6d3a812ff3 Fix some G_BuildMapTitle memory leaks (found while writing the next commit) 2022-12-12 16:44:40 +00:00
toaster
b8f3e64ca1 discord.c compilation warning 2022-09-21 19:22:33 +01:00
toaster
0a48165d3a Disable hardcoded Discord API map icons for now, we can address this at release 2022-09-18 20:43:15 +01:00
Sally Coolatta
2fddc9f343 Merge branch 'master' into big-large-map-markers 2022-09-10 16:01:02 -04:00
toaster
975ed1f136 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into new-menus
# Conflicts:
#	src/d_main.c
2022-09-07 21:39:34 +01:00
Ashnal
a58ae6c472 Discord joins now force menu close and title demo stop
This prevents wierdness from ahving the menu open on teh connection screen
It also prevents the connect command from erroring due to being in a demo
2022-08-28 16:41:26 +01:00
JugadorXEI
aa505823f5 Simply return address, don't allow self_ip to be possibly written as something else 2022-08-28 16:36:23 +01:00
JugadorXEI
3f53d768d1 Discord Invite Fixes
# Conflicts:
#	src/Makefile
2022-08-28 16:36:08 +01:00
toaster
48d451cfef Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart.git into new-menus
# Conflicts:
#	src/d_ticcmd.h
#	src/deh_soc.c
#	src/deh_soc.h
#	src/deh_tables.c
#	src/dehacked.c
#	src/f_finale.c
#	src/g_game.c
#	src/m_menu.c
2022-05-21 18:57:46 +01:00
Sally Coolatta
97b7178d36 Move to new Discord rich presence app 2022-05-21 03:36:17 -04:00
Sally Coolatta
2af75a2bd1 Fix merge conflicts 2021-01-11 00:06:34 -05:00
SteelT
29b5f38347 Merge branch 'master' into big-large-map-markers
# Conflicts:
#	src/d_netcmd.c
2021-01-09 15:52:34 -05:00
Sally Coolatta
fc934b38e1 Merge public next 2020-11-10 15:32:48 -05:00
James R
8f68a21f2f Fix many instances of G_BuildMapName
Some things are gonna be busted. Fix it later, BYE.
2020-10-31 20:17:12 -07:00
Sally Coolatta
afbbfc9b1f Fix cvars
My wrist burns...
2020-10-24 21:32:07 -04:00
James R
f7a4667bc3 Use STUN instead of curl to fetch the public IP address for Discord
RFC 5389 is a standard protocol that can be used for this instead of ip4.me.

I may have gone overboard on the CSPRNG... It was fun though.
2020-09-30 03:57:50 -07:00
Sally Coolatta
285ec3e08c Player death uses damage types
- Fixed last place elimination not working (again)
- Replaces squishing from level geometry with good old fashioned crush death
2020-09-25 16:31:10 -04:00
Sally Coolatta
b5fcd74ef9 Merge master
Slopes in a few maps are really broken ... think it's anchors, I'm gonna leave that to jart :V
2020-09-25 12:00:50 -04:00
James R
2d5b48e08c Disable DRPC if dedicated 2020-09-15 19:56:08 -07:00
James R
7b1f974397 Basically, update master server code to v2
Removes rooms, replaced with cv_advertise and "Advertise" on the host menu.

According to the new API, SRB2APPLICATION is sent instead of MODID. A contact
field was added, but there is no means of accessing it or setting it.

As a slight change, the server list will be populated even on an outdated
version of the game. (The new API was designed with this in mind.) The update
alert is still presented first of course.
2020-09-11 06:11:41 -07:00
Sally Coolatta
7561c69266 Increase cipher length 2020-08-31 00:25:28 -04:00
Sally Coolatta
2a93c2260d Expand IP_SIZE 2020-08-30 23:41:27 -04:00
Sally Coolatta
2d7c835c4d Dedicated servers can change discordinvites without needing RPC support 2020-08-30 23:20:06 -04:00
Sally Coolatta
5127696fcf Finish DEVELOP mode functionality 2020-08-23 07:15:33 -04:00
James R
688adb2055 Make join requests options on pause menu selectable even if you're already in the menu 2020-08-22 17:16:49 -07:00
Sally Coolatta
d302ad6e38 Fix XOR not working 2020-08-22 09:46:25 -04:00
Sally Coolatta
7228cc80a1 Remove timer variable
Doesn't feel necessary to me anymore, especially with how the menu works
2020-08-22 07:25:47 -04:00
Sally Coolatta
38ec458903 Always have XD_DISCORD defined, so that people compiling without Discord support can connect to servers that do. 2020-08-22 05:03:08 -04:00
Sally Coolatta
1899b31fa7 Add envelope icon, add sounds 2020-08-22 04:54:08 -04:00
Sally Coolatta
b761349076 Add some options, maxplayer/allownewplayer dont need to be netvars anymore 2020-08-22 01:53:27 -04:00
Sally Coolatta
56694030ec Base xor off of inital seed 2020-08-22 00:11:33 -04:00
Sally Coolatta
318b2a8434 Ignore any duplicate requests
You will still get a message for them, so if they're being annoying you will want to block them anyway, but at least it won't clog up the game.
2020-08-22 00:01:56 -04:00
Sally Coolatta
f000756448 Merge branch 'discord-rpc-support' of https://git.magicalgirl.moe/KartKrew/Kart into discord-rpc-support 2020-08-21 04:14:36 -04:00
Sally Coolatta
734b099202 Invite menu started
Functions! Is not pretty yet!
2020-08-21 04:14:33 -04:00
James R
368ed6ad1e curl_global_cleanup 2020-08-20 22:36:41 -07:00
Sally Coolatta
3949826f89 Don't show map image for title screen demos 2020-08-21 01:18:40 -04:00
Sally Coolatta
d4a530ac5e XOR IP addresses before sending them to Discord
Not complex because we aren't sending anything that isn't easily accessible via the Master Server anyway, just means we aren't sending plain-text IPs to Discord. Might be improved by basing the XOR key on other values (base RNG, maybe version) so that it's not like *right* there
2020-08-21 01:16:11 -04:00
Sally Coolatta
5af0eb7076 Don't show gametype when watching replays 2020-08-17 23:33:55 -04:00
Sally Coolatta
9d304d3d16 Show game speed and encore 2020-08-17 09:08:05 -04:00
Sally Coolatta
1a966f4a11 Don't allow invites if allowjoin is off 2020-08-17 06:55:43 -04:00
Sally Coolatta
0576729ff4 Update presence when maxplayers is changed 2020-08-17 06:52:46 -04:00
Sally Coolatta
1d5251e1f1 Fix ZONE being all caps, standardize the function comments 2020-08-17 06:13:32 -04:00
Sally Coolatta
8fd0424f15 Add distinct images for map hell & normal custom maps 2020-08-17 04:42:22 -04:00
Sally Coolatta
bd29d0c6bb Check supported skins by name instead of number, so we can have bonuschars images 2020-08-17 04:42:05 -04:00
Sally Coolatta
59ebf07dd5 Guard discord.h, add cvar to disable rich presence 2020-08-17 02:25:05 -04:00
Sally Coolatta
352449010e Display time elasped/time limit 2020-08-17 02:05:16 -04:00