Commit graph

408 commits

Author SHA1 Message Date
Alibek Omarov
eb51d17cd2 engine: server: enable sv_zmax clamping back to avoid overflowing zmax value encoded in delta 2025-02-08 16:38:11 +03:00
Alibek Omarov
add02dc6f9 engine: fix potential UB in netadr_t 2025-02-06 20:54:18 +03:00
Alibek Omarov
c86c45503f engine: replace few more Xash3D strings by XASH_ENGINE_NAME macro 2025-01-23 10:33:22 +03:00
Alibek Omarov
1e075d25b7 engine: make LZSS compression optional for 49 protocol, disable it for local clients (singleplayer) 2025-01-22 21:18:19 +03:00
Alibek Omarov
375998dffb Cleanup xash3d_types.h from engine-specific macros and types 2025-01-22 15:10:18 +03:00
Alibek Omarov
2065ef143a engine: server: fix ent_create under PrimeXT 2025-01-21 16:09:56 +03:00
Alibek Omarov
1d4f7b2f94 engine: server: slight refactoring, make SV_ModelHandle inlined, move PlayerIsFrozen to sv_client, fix packet loss data type 2025-01-14 12:09:23 +03:00
Alibek Omarov
38c82a3f76 engine: don't bother calculating crc32 for local clients for better performance (thanks @tyabus for the idea) 2025-01-14 11:55:28 +03:00
Alibek Omarov
69341e36a3 public: expose commit and branch as global variables instead of functions 2025-01-13 20:02:59 +03:00
Alibek Omarov
a0b46da04b engine: consolidate all box clipnodes used in studio models, pmove and server in a single place 2025-01-09 08:02:39 +03:00
Alibek Omarov
8a41be9d47 engine: server: finally, make a union for large leaf indices in edict_t so we can run bsp2 maps without recompiling 2025-01-09 08:02:39 +03:00
Alibek Omarov
47aff9e30b engine: hack mnode_t struct so we can have 24-bit face and children indices to support BSP2 format in runtime 2025-01-09 08:02:39 +03:00
Alibek Omarov
734c07ddab engine: split clipnodes struct into two with 16-bit indicies and 32-bit indicies to support BSP2 format in runtime 2025-01-08 14:46:07 +03:00
Alibek Omarov
9811988cce engine: server: set mapname globals field before making first call into DLL, as some mods tend to read it too early 2024-12-26 02:50:30 +03:00
Alibek Omarov
48bdd4238e engine: always include reason to server shutdown 2024-12-26 02:13:13 +03:00
Alibek Omarov
65750f0cf3 engine: server: hack save fields that use types unsupported by Half-Life Unified SDK through array types 2024-12-26 00:36:28 +03:00
Alibek Omarov
72d0d70587 engine: server: get rid of NULL sentinels at the end of arrays 2024-12-22 07:12:32 +03:00
Alibek Omarov
a834f4996f engine: move client adding functions to their appropriate subsystems and make them static. Make in-engine functions inlined. 2024-12-20 05:47:46 +03:00
Alibek Omarov
7f2ebd1b5e engine: server: add command sv_list_messages to print all registered user messages 2024-12-20 02:37:38 +03:00
Alibek Omarov
68b2d9f269 engine: server: fix possible message number inconsistency if server requested it twice 2024-12-20 02:37:01 +03:00
Alibek Omarov
93c5853356 engine: server: merge SV_FindBestBaseline for normal entities and static entities into single function 2024-12-18 06:57:43 +03:00
Alibek Omarov
ca0c5f929a engine: slight refactoring of lightstyle handling functions 2024-12-17 17:04:26 +03:00
Alibek Omarov
75adb2e686 engine: server: for entities physics code directly use cvar values rather than movevars. Leave movevars to player movement only 2024-12-08 01:39:24 +03:00
Alibek Omarov
0a85734ae7 engine: server: avoid useless copying in SV_GetClientIDString for bots or local clients 2024-12-05 19:49:51 +03:00
Alibek Omarov
f7062498c2 engine: turn old pfnGetGameDir behavior into a bugcomp flag get_game_dir_full
This function is kinda nasty, some mods (like old RCBot builds) expect a slash,
some newer mods (like Sandbot) doesn't. To preserve compatibility with both old
and new mods, just add it as bug compatibility flag.
2024-12-05 18:14:15 +03:00
Alibek Omarov
18a973d4f2 engine: server: always set sv_background to zero on server shutdown rather than on server dll unload 2024-12-03 21:02:37 +03:00
Alibek Omarov
38ef16b08b engine: server: do not unload server library on win327 2024-12-01 11:21:02 +03:00
Alibek Omarov
1f5c97964b engine: return full path in server's pfnGetGameDir, if possible 2024-11-30 09:28:30 +03:00
Alibek Omarov
e7f939c87b engine: always add .wad extension to wadlist names to simplify how it's being used 2024-11-23 14:01:09 +03:00
Alibek Omarov
c5471fe6fd engine: server: make SV_IsPlayerIndex and SV_HavePassword inline 2024-11-17 13:36:40 +03:00
Alibek Omarov
0ceb0d9e11 engine: provide compatible replacement for CompareFileTime function 2024-11-17 04:33:13 +03:00
Alibek Omarov
779cb2f721 engine: server: use calloc in SV_AllocString, allocate strings at stringspool preventing memory leaks. Fix strings deduplication on 64-bits. 2024-11-13 23:36:53 +03:00
Alibek Omarov
88c42d50f2 engine: server: always allocate svgame.stringspool, it's used to track temp string allocations like in SV_CopyString
Potentially fixes memory leakage on 64-bit when game uses instanced baselines or consistency lists
2024-11-13 23:35:45 +03:00
Alibek Omarov
a749bb8ef1 engine: server: reset str64 statistics on server deactivate 2024-11-13 23:32:05 +03:00
Alibek Omarov
723cd8e26c engine: server: adjust 64-bit string pool size depending on max_edicts value (65k for each 1024 edicts) 2024-11-13 23:30:54 +03:00
Alibek Omarov
d15949d2e8 Rename _format to FORMAT_CHECK 2024-11-07 14:24:07 +03:00
Alibek Omarov
38e8a581b6 engine: server: fix possible NULL dereference 2024-11-06 01:39:46 +03:00
Alibek Omarov
371639f0dc engine: introduce fps_override to unlock the 200 FPS limit in multiplayer games to 1000 2024-10-30 18:28:55 +03:00
Alibek Omarov
2656eb1aeb engine: fix A2S_GOLDSRC_INFO, it must always include Source Engine Query and a null terminator 2024-10-26 20:24:31 +03:00
Alibek Omarov
cff8ee13e6 engine: rcon refactoring. Use sizebuf_t to concatenate commands. Only call redirect when we're executing command. 2024-10-26 19:37:30 +03:00
Alibek Omarov
128a1f59a9 engine: cleanup XASH_64BIT usage. Always use it from build.h 2024-10-24 16:39:09 +03:00
Alibek Omarov
47318b0c14 engine: server: minor fix, use __func__ instead of the function name in debug message 2024-10-21 02:32:07 +03:00
Alibek Omarov
e3e4bcc015 engine: global refactoring of connectionless packets, now they can be customized from single protocol.h header 2024-10-19 14:05:00 +03:00
Alibek Omarov
da76abda75 engine: even more refactorings to avoid global cls.legacymode usage, now with GoldSrc server autodetection 2024-10-16 07:31:27 +03:00
Alibek Omarov
0b59fa9416 engine: swap Cvar_VariableInteger and simple integer checks for performance 2024-10-16 06:57:46 +03:00
Alibek Omarov
245dc97cfb engine: semi-correct printing GoldSrc client messages 2024-10-15 06:12:31 +03:00
Alibek Omarov
5402a9611e engine: common: fix discarded const qualifier 2024-10-14 19:41:36 +03:00
Alibek Omarov
f52c825bf5 engine: make some global variables static and const, make even more functions static if possible 2024-10-14 19:19:46 +03:00
Alibek Omarov
505ad6d69b engine: server: reinitalize delta in case if delta was shutdown by client and some tables were omitted (movevars after using GoldSrc server) 2024-10-14 06:56:17 +03:00
Alibek Omarov
c5a291d9c7 engine: minor refactoring 2024-10-14 05:17:21 +03:00