Commit graph

295 commits

Author SHA1 Message Date
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
Boondorl
df9b2cd9bf Added 64-bit networking support
Mainly for use with doubles as ZScript can now take advantage of it. Enforced sizing on ints passed to and read from net functions.
2024-01-05 23:33:15 +01:00
Boondorl
a8e350aed8 Renamed Networking Functions
New names more appropriately match the size of the value they write to/read from the stream.
2024-01-05 23:33:15 +01:00
Boondorl
202d0d747f Added NetworkBuffer
Allows for a command to be built before sending it off. Added wrapper functions for certain data types. Changed command from a number to a Name.
2024-01-05 16:42:13 +01:00
Boondorl
9565c94cd2 Added SendNetworkCommand
Allows for a custom message to be sent over the network without the need for SendNetworkEvent. This includes all the possible valid types of byte, word, long, float, and string.
2024-01-05 16:42:13 +01:00
Christoph Oelckers
48ba63c022 added even more explicit GetChars() calls. 2023-10-03 15:55:08 +02:00
Christoph Oelckers
b695e845e1 - eliminated several pointless string copies in network code. 2023-08-12 10:56:34 +02:00
Christoph Oelckers
ee5b6e45f8 - made D_WriteUserInfoStrings memory safe.
Its callers are anything but for now but this function was the main blocker for refactoring so it had to come first.
2023-03-26 09:27:26 +02:00
Boondorl
7517b64aee Updated to Interface Event
Changed SendConsoleEvent to SendInterfaceEvent to make functionality clearer. Added InterfaceProcess virtual to EventHandlers. Added CCMD for sending interface events.
2022-11-13 21:04:38 +01:00
Christoph Oelckers
ff37d710e2 - overhaul of savegame path management.
* use a different subfolder for each IWAD's saves.
* do not allow load and save CCMDs to escape the save folder. Absolute paths and '..' are being blocked now.
* unified savegame path and filename generation in one single function. All ad-hoc file name generation was replaced.
* -loadgame will also use the designated savegame folder now.
2022-11-05 13:28:31 +01:00
Christoph Oelckers
8aaab153fa - add a system interface for CheckCheatmode and moved some sound code to the backend. 2022-10-02 16:48:56 +02:00
Christoph Oelckers
12adee5256 - fixed a few includes 2022-10-02 13:57:36 +02:00
Christoph Oelckers
f0fbdba593 - disable implicit conversions from float to TAngle 2022-08-26 18:01:26 +02:00
Christoph Oelckers
aaf9618e61 - make sure ticdup is initialized.
Apparently sometimes it still does not happen.
2022-06-22 10:30:09 +02:00
Christoph Oelckers
86a5545fa8 - fixed division by zero with unvalidated ticdup values. 2022-06-09 08:36:11 +02:00
Christoph Oelckers
d6886ed44f - route the StartScreen#::Net... functions through a global interface.
These will require different treatment later, so best only have one place where each method is called.
2022-06-01 08:37:00 +02:00
Christoph Oelckers
390bf58698 - first stage of migrating intermissions to screenjobs. 2022-04-26 20:50:35 +02:00
Christoph Oelckers
1d0aed219e - replaced MIN/MAX in all non-common code. 2021-10-30 10:16:52 +02:00
Christoph Oelckers
6406427eb7 - added check for M_IsAnimated to TryRunTics. 2020-12-11 11:51:52 +01:00
Christoph Oelckers
348f9ae68c - moved i_net into 'common' to bring it in line with Raze. 2020-09-27 12:30:54 +02:00
Christoph Oelckers
712d80006a - split game dependent parts out of menudef.cpp. 2020-06-14 00:27:32 +02:00
Christoph Oelckers
ddef3f7b98 - made video base code game independent 2020-04-28 22:54:53 +02:00
Christoph Oelckers
ace3e29473 - removed the implicit conversion operators from FName.
These were creating dangerous interdependencies. It is better to do explicit conversions when needed.
As an added plus, this means that zstring.h no longer depends on name.h which was very annoying.
2020-04-11 14:00:13 +02:00
Christoph Oelckers
e82565373f - separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.
- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.
2019-12-16 23:52:39 +01:00
Christoph Oelckers
6f821a9198 - fixed compilation on Windows. 2019-10-07 18:59:18 +02:00
Christoph Oelckers
c95a07d2c4 - missed one exit. 2019-10-07 01:10:37 +02:00
Christoph Oelckers
0a611e1992 - refactored the exit calls out of the networking code
These ones were particularly bad examples of misusing the exit handlers by temporarily installing one themselves and then calling exit to clean stuff up.

Now they just return an error code to D_DoomMain to perform a regular exit.
2019-10-07 00:55:14 +02:00
Christoph Oelckers
86ab366958 - some reformatting on exit code, mainly to make searching for the content easier. 2019-10-01 19:06:28 +02:00
Christoph Oelckers
66db894866 - split off all music code from s_sound.cpp 2019-08-23 17:15:19 +02:00
alexey.lysiuk
c3fedd4218 - fixed crash on starting ACS script without level
https://forum.zdoom.org/viewtopic.php?t=65287
2019-07-08 11:17:03 +03:00
alexey.lysiuk
f5d80d0d8b - made setting actor TID more explicit
Now it's no longer possible to manipulate TID hash from arbitrary location
For example, this prevents linking of destroyed object into the hash
TID member is still public but writing to it is limited to a few very specific cases like serialization and player traveling between levels

https://forum.zdoom.org/viewtopic.php?t=64476
2019-05-10 11:49:57 +02:00
Magnus Norddahl
ff6b67d8a1 Merge remote-tracking branch 'origin/master' into vulkan2 2019-04-17 16:07:54 +02:00
Magnus Norddahl
5171f90e35 - add r_ticstability for a smoother experience playing mods with high think times 2019-04-17 16:07:32 +02:00
Magnus Norddahl
9f0f659db0 - remove old vid_maxfps implementations as they were garbage anyway and the new one works on all the platforms 2019-03-26 11:10:17 +01:00
Christoph Oelckers
cda248df66 - localized some user-facing texts that were still string literals. 2019-03-19 00:37:43 +01:00
Christoph Oelckers
60c5350e8b - added an option to use the new console font for centered messages.
Like the notification messages, this is optional to not affect existing settings.
2019-03-11 19:54:03 +01:00
Christoph Oelckers
66eb4e5048 - separation of static and map-local event handlers into separate lists.
Having everything lumped together made this a maintenance hassle because it affected how the level has to be stored.
This hasn't been tested yet, so it may not work as intended!
2019-02-02 16:43:11 +01:00
Christoph Oelckers
484485f3cf - made the event manager an object so it can be instantiated multiple times. 2019-02-02 10:46:34 +01:00
Christoph Oelckers
45dc9a7b47 - renamed the level variables.
currentUILevel is now primaryLevel.
For ZScript, currentVMLevel was added. This is also exported as 'level' and will change as needed.
This also means that no breaking deprecations will be needed in the future, because in order to sandbox a level only 4 variables need to be handled: level, players, playeringame and consoleplayer.
The remaining global variables are not relevant for the level state.

The static 'level' has been mostly removed from the code except some places that still need work.
2019-02-02 00:25:51 +01:00
Christoph Oelckers
6c006a5fbd - added the missing Level parameters to AActor::StaticSpawn and P_ExecuteSpecial.
I think these were the last two still missing it, all remaining uses of the global level variable are in code that doesn't get run through a level tick and are supposed to access the primary level.
2019-02-01 22:02:16 +01:00
Christoph Oelckers
f6a91e1722 - moved the I_Error prototypes to doomerrors.h to avoid having to include the low level system header for this. 2019-01-31 19:38:04 +01:00
Christoph Oelckers
e30f116faf - moved bglobal into FLevelLocals
This is still all static data, only the location has changed, but none of the access.
2019-01-30 01:38:18 +01:00
Christoph Oelckers
f410762695 - missed two lines. 2019-01-30 00:29:42 +01:00