Commit graph

337 commits

Author SHA1 Message Date
Magnus Norddahl
e3cde7a9e9 More big beautiful porting 2025-08-08 00:43:45 +02:00
Magnus Norddahl
3fdd22ef91 Merge remote-tracking branch 'gzdoom/master' into big_beautiful_merge 2025-08-06 21:06:53 +02:00
Boondorl
d6ead264ed Fixed +playerclass not being respected when new players join a save 2025-07-31 04:11:22 -04:00
Boondorl
a4ed63033e Fixed quick save rotator breaking save logic
The game should only ever save during the gameplay loop and never on the spot. Also fixes the quick save rotator skipping certain checks.
2025-07-28 02:50:10 -04:00
Marcus Minhorst
649ddd7774 Replaced uint with unsigned int 2025-07-19 11:37:24 -03:00
Marcus Minhorst
9b0f5d9b0d Fixes sign-compare warnings 2025-07-18 21:11:50 -03:00
Chris Cowan
ab7b1642bc Prevent buffer overflows when using streams 2025-07-10 14:11:08 -03:00
Chris Cowan
13a8b0e5ba Fixed incorrect buffer grow calls
Fixes minor mistake introduced in 94be307225.
2025-07-10 14:11:08 -03:00
Boondorl
ca98f33f42 Added support for client-side VisualThinkers 2025-07-08 16:28:40 -03:00
Boondorl
a1a3be1046 Clean up console commands
Improve functionality of network console commands and make displaying of who is who clearer.
2025-07-04 09:24:50 -03:00
Boondorl
2de0480147 Clamp max number of commands generated
Only allow half the host's buffer to be filled at any time.
2025-07-02 21:19:15 -03:00
Boondorl
492c83cf2c Improve stability in packet-server mode
Use buffers reported by clients so they can better check their own conditions when determining how to stabilize when outpacing the host.
2025-07-02 21:19:15 -03:00
Boondorl
0e23b900bb Added dynamic tic stabilization
Attempts to balance periods of rough traffic by putting in an artificial delay, smoothing playback but further increasing input delay. This can be disabled with net_ticbalance.
2025-07-02 21:19:15 -03:00
Boondorl
cf9a9097b9 Fix up saving in multiplayer
By default allow only settings controllers to save the game. Use actual file names to help prevent possible save file overriding as savexx is unreliable online. Prevent quicksave behavior from working with the rotator. Force a unique netgame subfolder for multiplayer saves to remove the ability to override singleplayer saves. Send over the host's -loadgame argument to make loading easier (will not override the guest's -loadgame in case they need a special file name).
2025-07-02 12:33:50 -03:00
Boondorl
311e1d09be Allow limiting NPC conversations to settings controllers
Also cleans up the network menu a little bit.
2025-07-02 07:29:28 -04:00
Boondorl
d182bd9411 Allow disabling pausing entirely when online 2025-06-29 07:22:56 -04:00
Boondorl
fae43b8120 Added ready system to screen jobs for multiplayer
Readds the feature to allow players to ready up during stat screens and intermissions instead of autoskipping based on whoever closed it. Comes with a variety of ways to tweak this behavior such as percentage-based auto starting (with a timer), the ability to unready as needed, and who can control it. Players will still be able to skip through individual screen jobs within the runner while waiting to ready up.
2025-06-28 14:39:19 -03:00
Boondorl
fc7a480fe8 Tweak tic catchup mechanic
Always chase the available tics.
2025-06-28 14:38:19 -03:00
Boondorl
c36ea479a8 Move engine verification to front end
This can't be in the backend since it uses game-specific information.
2025-06-26 00:24:19 -03:00
Boondorl
e981064e5c Fixed BT_RUN getting toggled off on command clear
This doesn't get delta'd when networking so its state has to be kept between wipes since it's built entirely from client data.
2025-06-14 14:04:44 -03:00
Boondorl
58809a3689 Fixed up game id
Store it in a proper buffer.
2025-05-09 20:39:56 -03:00
Boondorl
7877018471 Added CRC to packets
Verify that data is correctly ordered and reject packets that aren't. Also generates a random game id to ensure packets are coming from legitimate clients.
2025-05-09 20:39:56 -03:00
Ricardo Luís Vaz Silva
9e2b1f9c4c
Bone Getters Part 2/3, plus fixed warnings for MSVC
* add getters for frame poses

* fix missing joint in GetJointPose

* clean up models_iqm.cpp

* clean up usage of I_GetTimeFrac, split out matrix calculation into its own function

* clean up SetModelBoneRotationInternal

* clean up a few float <-> double and unsigned <-> signed warnings

* fix more warnings

* further clean up warnings

* split mode ObjectToWorldMatrix stuff

* initial work on bone getters, matrix hell

(the matrix/vec3 multiplications are probably wrong af, just gotta add more stuff 'till i can test it)

* clean up matrix math

* GetBone/TransformByBone

* fix GetBoneFramePose

* fix ObjectToWorldMatrix

* fix missing array resize

* raw matrix getters (for use with gutamatics/etc)

* reverse matrix mult order

* replace GetBoneLength/GetBoneDir with GetBoneBaseTRS

* fix GetBonePosition, remove GetBoneWorldMatrix as it's useless

* GetBonePosition

* deduplicate code

* rename GetBonePosition to GetBoneBasePosition to avoid confusion

* GetBoneBaseRotation

* GetBonePosition helper function

* forgot include_offsets
2025-05-09 17:06:16 -03:00
Sally Coolatta
ac42aa8337 cl_debugprediction console variable
Makes `gametic` run behind `ClientTic` by n ticks, and forces player prediction code to run. Only works if you are in a singleplayer session.

This is intended to be useful for mod development, as you can quickly test prediction issues without creating a multiplayer server. It may also come in handy if any improvements are made to the prediction code in the future.
2025-03-25 10:24:44 -04:00
Boondorl
154eea56e6 Update all players' acks in packet-server mode
Fixes potential issue when host switching in packet-server mode
2025-03-24 22:42:04 -03:00
Boondorl
134e8f2d60 Fixed potential softlock in packet-server mode
Make sure to send over the lowest player's data we got as the ack and not whatever the host specifically had
2025-03-24 22:42:04 -03:00
nashmuhandes
799011d327 Merge branch '4.14.1' of https://github.com/ZDoom/gzdoom 2025-03-13 03:00:11 +08:00
Boondorl
7e410fd5d8 Added cvar for cool downs on repeatable actions when playing online
Currently only applies to doors.
2025-03-12 13:05:31 -03:00
Boondorl
a07a6e7922 Fixed first consistency check 2025-03-12 13:05:24 -03:00
Boondorl
a7fd3852e2 Slow down host if they're too far ahead of the world
Makes packet splitting recover more elegantly during rough net conditions.
2025-03-12 13:05:24 -03:00
Boondorl
918b4a8834 Fixed clients after host not getting quitters 2025-03-12 13:05:24 -03:00
Boondorl
b213b81c92 Auto split packets in packet-server mode
Avoid fragmentation by trying to keep data in each packet to <1500b. Helps avoid possible issues with fragmentation with large player counts and bad network conditions.
2025-03-12 13:05:24 -03:00
Boondorl
f7e62a8cd6 Added client-side Thinkers
Adds support for client-side Thinkers, Actors, and ACS scripts (ACS uses the existing CLIENTSIDE keyword). These will tick regardless of the network state allowing for localized client handling and are put in their own separate lists so they can't be accidentally accessed by server code. They currently aren't serialized since this would have no meaning for other clients in the game that would get saved. Other logic like the menu, console, HUD, and particles have also been moved to client-side ticking to prevent them from becoming locked up by poor network conditions. Additionally, screenshotting and the automap are now handled immediately instead of having to wait for any game tick to run first, making them free of net lag.
2025-03-11 10:14:28 -03:00
Boondorl
e4081df0db Run net events on load barriers 2025-03-10 17:59:38 -04:00
Boondorl
ad3bcfddba Lobby Overhaul
Rewrote lobby to unify common and Doom-specific packet structure, allowing for saner handling of in-game joining. Added a new per-client stage system that allows individual clients to be handled at a time when gathering and sharing info. Reworked lobby UI to display user info and added kick/ban functionalities. Bans are only a temporary per-game IP ban (use passwords to keep unwanted users out). Increased max player count to 64 and unified engine constant.
2025-03-07 20:32:52 -05:00
Boondorl
94be307225 Netcode Overhaul
Rewrote netcode to be more stable and functional. Packet-server mode has been restrategized and will now be the default netmode when playing with 3+ non-LAN players. TryRunTics has been cleaned up with older tick control behavior removed to account for the rewritten renderer. The main thread is now more consistent when playing online to prevent potential slow downs and lock ups. Load barriers are better accounted for to prevent spikes on level transition. Improvements to chat and lobby systems including a force start game button. Added a suite of new host options such as kicking and controlling who can pause the game. Max players increased from 8 to 16 since the new code can now handle it.

Note: Demo functionality is untested. This will be rewritten at a later time alongside improvements to GZDoom's playback features (e.g. freecam mode).
2025-03-05 12:52:52 -05:00
inkoalawetrust
b54da619ad Added spawn origin flags.
- Added new spawn flags that allow for checking if an actor was spawned by the level, the console, or ACS/DECORATE/ZScript.
2025-02-20 04:13:36 -03:00
Rachael Alexanderson
047e1e8b74
- remove priority changing code entirely - replace with vid_lowerinbackground which activates FPS capping in background 2025-02-08 21:42:39 -05:00
Magnus Norddahl
306303b9a6 Fix console colors not working before an iwad has been selected 2025-01-08 23:29:00 +01:00
Rachael Alexanderson
6f927d60c8 - don't allow vid_dontdowait if neither vid_vsync is true nor vid_maxfps is set, in order to prevent coil whine 2025-01-04 12:22:47 -05:00
Rachael Alexanderson
3efaca262d - address adaptive sync flicker issue (disables 35 fps cap during game pause) 2025-01-04 12:22:47 -05:00
Ricardo Luís Vaz Silva
023328da04 allow summon to work with visual thinkers 2024-12-20 22:23:49 -03:00
Boondorl
f0aa0acf08 Fixed changeskill being unnetworked 2024-04-25 20:37:16 -04:00
Christoph Oelckers
a938e9c66c moved the NetworkEntityManager into the backend code. 2024-04-21 18:30:19 +02:00
Christoph Oelckers
ebd4ebf298 StringTable cleanup and improvements
cleaned up function interface to avoid referencing the file system in the worker functions.
replaced StringTable's operators with functions.. The main reason is that these are far easier to look up when browsing the source.
This also fixes a premature translation in SBARINFO that was done in the parsing stage, not the printing stage.
2024-04-21 10:34:44 +02:00
Boondorl
38f14ccd56
Tweaked net ID file management
Should now be easier to stub network entity functions for Raze.
2024-04-20 19:14:29 -04:00
Boondorl
8d0d130dc9
New API for assigning unique network ids to objects 2024-04-20 19:14:29 -04:00
Rachael Alexanderson
ef10467ff8
- revert changes in backend code which will not sync properly with raze
This is a combination of 2 commits.

Revert "New API for assigning unique network ids to objects"

This reverts commit e37c19b5b4.

 This is the commit message #2:

Revert "Fix for Morph virtual"

This reverts commit 0ef042562e.
2024-04-17 14:48:02 -04:00
Boondorl
e37c19b5b4 New API for assigning unique network ids to objects 2024-02-26 06:23:12 -05:00
Boondorl
5895b88799 Fixed bytes being written incorrectly 2024-01-06 15:40:31 -05:00