Commit graph

739 commits

Author SHA1 Message Date
toaster
19ef96351a roundqueue
A general purpose system that permits cacheing of GP progression in one place, but which permits future expansion and brings Online GP a little closer to reality.
- Stores a bunch of levels, gametypes, encore state, and restricted-by-rank-ness in sequence.
    - Initialised on GP cup select.
    - FUTURE WORK: Open to being initialised by other methods
- Digests its way through that sequence as maps are completed.
- Stores round number instead of `grandprixinfo`.
- Map commands as sent over the wire have been adjusted.
    - Sends round number and size of/position in roundqueue.
    - Now figures out GP Event Type from gametype.
        - Can be swung in the direction of a Special Stage with a hint flag.
        - This hint flag replaces "fromlevelselect", which was functionally vestigal.
2023-04-11 17:18:27 +01:00
Sally Coolatta
198672c845 Fix vote buffer for G_RandMap being broken 2023-04-11 01:19:30 -04:00
Sally Coolatta
9c4ace6fbc Map anger
- Maps build anger every time a map isn't selected by anyone.
- If a map is ignored for 4 votes in a row, then on the 5th vote it shows up it will be angry enough to vote for itself when everyone else finishes voting.
- Once it gives its funny vote, or it gets played, it will calm down again.
- 13P+ vote icons are implemented; it's just a basic circle though cuz lazy.
- Made the roulette finish even faster.
- Bots can vote again but now behind a debug cvar.
2023-04-10 02:10:06 -04:00
Sally Coolatta
8432d7e552 Big vote screen cleanup
- 4th map is now a regular option instead of dice.
- Add function to draw a maintained Combi Catcher object on screen.
- Put all vote static variables into either a "vote" struct or a "vote_draw" struct, if it's logic or drawing code.
- Prefix netcode vote globals with _g.
- Add enums/defines for vote magic numbers.
2023-04-10 02:09:59 -04:00
Sally Coolatta
15f60a1f14 Split thing voting screen to a new file 2023-04-03 20:57:31 -04:00
James R
9b5b07b03c Completely rewrite party management code
Replaces g_splitscreen.c with g_party.cpp. Simplifies
party management functions.

Moves externs out of already bloated doomstat.h and
g_game.h into g_party.h.

Cuts down on globals spam.
2023-04-02 17:26:33 +01:00
James R
3b67f99d0d RRID: correct remaining instances of hardcoded sizes to defines 2023-03-28 03:54:29 -07:00
AJ Martinez
0df4251bc7 No, seriously, don't use STRINGN for pubkeys 2023-03-28 01:25:56 -07:00
AJ Martinez
bf4781d26c Use READ/WRITEMEM instead of STRINGN for data that can contain 0s, dummy! 2023-03-28 01:25:56 -07:00
AJ Martinez
5a475c7888 Cleanup + fix off-by-one in gamestate 2023-03-28 01:25:55 -07:00
AJ Martinez
f2c66a2171 Expose public_key to Lua 2023-03-28 01:20:43 -07:00
AJ Martinez
4ffae5d862 Store keypairs in profiles, do signature verification for all splitscreen players 2023-03-28 01:19:43 -07:00
toaster
4c0077e07c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-19 13:01:06 +00:00
toaster
edddb26f98 P_Net(Un)ArchivePlayers: Send roundconditions.unlocktriggers over the wire
Discovered while self-reviewing that ACS has read access to this, not just write, so it has to be saved and loaded.
It is the only roundcondition which should be netsynced. Everything else is truly per-player progression.
2023-03-14 22:05:13 +00:00
toaster
2e1efaff0c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_battle.c
#	src/k_hud_track.cpp
#	src/k_kart.c
#	src/p_inter.c
2023-03-14 21:59:19 +00:00
James R
94faf486fd Add player->fastfallBase 2023-03-13 20:09:20 -07:00
toaster
241475155b Rename "Break the Capsules" to "Prison Break"
We had this collective consciousness bigbrain moment in VC together, and it can literally only happen in this branch because unlocks.pk3 is the only main-game asset that needs to change for it
Solves the big problem we had with mixing up Item Capsules and ~~Battle Capsules~~ PRISON EGGS
2023-03-12 20:17:46 +00:00
James R
b2a6ffecf9 Refactor player->invulnhitlag -> player->nullHitlag
- Move condition for whether hitlag came from a constant
  damage source into P_DamageMobj directly. Should be more
  accurate if a player is dealt brand new damage, the
  constant damage still won't count.

- player->invulnhitlag renamed to player->nullHitlag
2023-03-11 05:36:24 -08:00
James R
a3c64068e6 Replace bumpers completely with health
Adds some functions:

- K_Bumpers, bumper count for the count, intended for
  where player->bumpers was used in HUD and visual
  contexts.
- K_BumpersToHealth, converts bumper count to health
  points.

player->mo->health replaces player->bumpers where it was
used in health contexts.

Removes some functions:

- K_HandleBumperChanges
- K_DestroyBumpers

Everything K_HandleBumperChanges did has either been
removed or moved elsewhere. P_KillMobj also already called
K_CheckBumpers.

K_DestroyBumpers became pointless after player->bumpers
was removed.
2023-03-07 22:54:33 -08:00
James R
3843f0c3cd Remove more Karma Bomb crap
- remove Karma Bomb boost trail condition
- remove Karma Bomb condition for Eggman Mark
- remove Karma Bomb condition for hiding player name tags
- remove Karma Bomb player translucency
- remove Karma Bomb respawn invincibility
- remove Karma Bomb speed buff
- remove Karma Bomb sphere digestion
- remove Overtime Karma
2023-03-07 22:32:28 -08:00
James R
540bd6e18d Merge branch 'improve-battle-tracking' into 'master'
HUD TARGET for Battle Kiosk, Monitors and Emeralds; remove WANTED over players' heads

See merge request KartKrew/Kart!1016
2023-03-07 09:44:07 +00:00
Oni
e4ba544994 Merge branch 'buff-sliptide' into 'master'
Make sliptiding actually good

See merge request KartKrew/Kart!1020
2023-03-07 08:49:46 +00:00
James R
18ccc3db27 Remove g_hiscore since it's not used anymore 2023-03-06 18:52:53 -08:00
Sally Coolatta
55de982fa3 GP ranking
Needs balancing + intermission, but mostly functional
2023-03-06 18:25:14 -05:00
AJ Martinez
15a0eb6c48 Add sliptideZipIndicator to netsave 2023-03-06 06:26:21 -07:00
AJ Martinez
87d8945f97 Make sliptiding actually good (no visuals)
50% increased effect of handling boosts, 75% reduced penalty for handling boost stacking, grants a boost proportional to your sliptide length when you straighten out
2023-03-05 23:57:47 -07:00
Sally Coolatta
82313de499 Awayview cleanup
- Moved variables to awayview_t
- Arbritrary +20 is no longer added to z pos, it will use the thing position as the camera position directly.
2023-03-03 16:09:54 -05:00
James R
e5a533544d Add sonicloopvars_t to player_t 2023-02-28 19:14:35 -08:00
Oni
912e062efa Merge branch 'battle-points' into 'master'
Battle points changes

See merge request KartKrew/Kart!962
2023-02-26 00:08:25 +00:00
James R
67062bb920 Merge branch 'refactor-pointlimit' into 'master'
Refactor pointlimit to be delayed until next round, just like timelimit

See merge request KartKrew/Kart!966
2023-02-25 07:33:25 +00:00
James R
e6da831e36 HUD target player with most points
- Replace battlewanted global with g_hiscore, keeps track
  of the current highest number of points.
- Adds HUD tracking for player(s) with the hiscore.
- Should target both players in a tie.
2023-02-24 23:21:47 -08:00
AJ Martinez
9b5bd70cae Briefly lock out TRIPWIRE_BLASTER after failing a tripwire 2023-02-24 00:30:21 -07:00
James R
917acfd16b Refactor pointlimit to be delayed until next round, like timelimit 2023-02-23 18:37:30 -08:00
James R
923b8414a1 Merge branch 'refactor-kitemcap' into 'master'
Refactor kitemcap

See merge request KartKrew/Kart!955
2023-02-22 11:23:51 +00:00
AJ Martinez
00aa69ca0a Buff eggbox speed, allow contact transfers 2023-02-21 23:00:56 -07:00
James R
be4c341316 Rename kitemcap to trackercap 2023-02-21 17:48:14 -08:00
James R
0b2273b848 p_saveg.c: replace unknown thinker error with assert
It is undefined behavior to cast function pointer to
void*.
2023-02-14 04:16:56 -08:00
wolfy852
b76557045f Change mapmusrng to UINT8 2023-02-11 08:23:57 -06:00
wolfy852
2c162b50a3 mapmusrng variable, proper sync, cleanup 2023-02-11 08:16:37 -06:00
Sally Coolatta
5b147f59ed Add sector action
Linedef actions, but on sectors. Including args, stringargs, and unique activator flags.
2023-01-06 05:31:53 -05:00
Sally Coolatta
1caf255f5c Merge branch 'master' into acs 2023-01-05 22:23:51 -05:00
toaster
22b87e0f19 Consistency for mobjnum 0 meaning NULL
Moves `P_Net(Un)ArchiveTubeWaypoints` down the file to take advantage of `SaveMobjnum` inline.
2023-01-06 00:05:31 +00:00
toaster
724c9b774e Cleaner reference handling for the following extern-scope netsynced mobj_t*.
- `skyboxcenterpnts` and `skyboxviewpnts`
    - P_InitSkyboxPoint`, which calls `P_SetTarget`
- `waypoint->mobj`
    - Make sure NULL before using `P_SetTarget` on
- `tubewaypoints`
    - Use `P_SetTarget`
    - Use `UINT32_MAX` for the invalid mobjnum, since 0 is a valid one.
- `waypointcap` and `kitemcap`
    - NULL before reset

Our international nightmare is over.
2023-01-05 23:32:12 +00:00
toaster
11b4fcdc1c Remove heinous pointer-sent-over-the-network hack remnants
This used to be used for `P_RelinkPointers()`, but was superseded by the far saner mobjnum. HOWEVER, its lingering effect was to leave `mobj->info` in an invalid state until a later `P_FinishMobjs()` was called. This is memory unsafety :D

After removing the last remnants of this ancient hack, it is now once again possible to connect to a server without crashing immediately. However, I did get a crash after a few seconds, so there is definitely still *something* nasty going on under the hood.
2023-01-03 20:20:22 +00:00
toaster
b573b6efbc Don't tie restoring mobj/waypoint pointers on player struct to existence of player object 2023-01-03 19:41:46 +00:00
Sally Coolatta
aa4fd8ab13 Add functions to initialize savebuffer_t
g_demo.c is mostly unaltered because it is made of twigs.
2023-01-02 19:47:59 -05:00
Sally Coolatta
345e7f83b0 Copy first mapthing tag to their mobjs
Allows the ThingCount and ThingSound ACS functions to fully work now, and adds significantly more possibilities for scripting later.
2023-01-01 17:07:46 -05:00
James R
77d54a09fe Remove global lua_save_p and use savebuffer_t for LUA_Archive / LUA_UnArchive 2023-01-01 00:23:23 -08:00
Sally Coolatta
38a35b6f78 Make save_p / savebuffers not global
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.

Also fixed some scary mix-ups in some of the Lua archiving code.
2023-01-01 00:22:56 -08:00
Sally Coolatta
d5155e3d83 Add Hexen line activation flags
- Lines can be set to activate when crossing or bumping into them, with distinctions for players, enemies, and missiles+items.
- A new flag has been added to determine if a line special can activate more than once.
- Finish Line + Respawn Line are now handled like other specials. This means that:
    - They follow the new line activation rules (so you can potentially have a finish line that you have to bump instead of cross)
    - More importantly, they can be called as functions in ACS. (Player_FinishLine and Player_Respawn)
- Fixed linedef flags not being saved in save games.
2022-12-31 13:41:17 -05:00