Commit Graph

91 Commits

Author SHA1 Message Date
Alibek Omarov f07eea5073 engine: server: allow server unloading for Win32 targets until we figure out the issues with MetaMod 2023-10-28 11:14:12 +03:00
Alibek Omarov 78bc177e05 engine: server: remove unused host struct field 2023-10-28 11:06:18 +03:00
Alibek Omarov 8fb908e3d4 engine: server: disable SV_UnloadProgs, only call it when shutting down engine 2023-10-28 11:06:18 +03:00
Alibek Omarov a5ee631191 engine: server: sv_game: disable searching closer to server library memory region for Android 2023-10-27 14:31:16 +03:00
Alibek Omarov 1c9f333420
engine: server: fix attempting to free pool instead of an allocated memory 2023-08-30 18:52:44 +03:00
Alibek Omarov 52bd923d9d engine: server: use generic host pool for temporary string allocation in case of PhysicAPI 2023-08-29 19:10:33 +03:00
Alibek Omarov 72fe214f49 engine: server: pre-process string before passing it to PhysicAPI AllocString, for compatibility with existing Xash3D games 2023-08-07 21:11:20 +03:00
Alibek Omarov 57499dea33 engine: server: static-ize sv_phys functions, set GAME_EXPORT attribute for PhysicAPI functions 2023-06-19 07:32:22 +03:00
Alibek Omarov 6b223f1325 engine: server: static-ize functions in sv_game. Set GAME_EXPORT attribute to server GameAPI functions 2023-06-19 07:11:49 +03:00
Alibek Omarov c966589a50 engine: server: static-ize few game API functions, set GAME_EXPORT attribute 2023-06-15 19:22:13 +03:00
Alibek Omarov 4c02c25506 engine: server: do not assert if SetFatPVS/PAS were called without active player
Fixes issues with POD-Bot based bots.
2023-06-15 19:17:34 +03:00
Alibek Omarov f49a2bc8f3 engine: server: move pfnWriteString character replacement hack to the ALLOC_STRING, the same way as GoldSrc does 2023-05-29 14:40:54 +03:00
Alibek Omarov 9e0d389d9e engine: server: moved server cvars to static allocation 2023-05-27 21:52:58 +03:00
Alibek Omarov 5627dbbf34 engine: server: greatly simplify pfnWriteString implementation, it shouldn't modify input string 2023-05-27 20:02:09 +03:00
Alibek Omarov a81fa84321 engine: server: replace some obvious va uses to temp buffer and Q_snprintf 2023-03-13 06:00:38 +03:00
Alibek Omarov 5ef97ae99e engine: convert Info_SetValueForKey with va to Info_SetValueForKeyf 2023-03-13 05:37:45 +03:00
Alibek Omarov ba1cf25314 engine: convert MSG_WriteString with va to MSG_WriteStringf 2023-03-13 05:13:52 +03:00
Alibek Omarov 375c06400c engine: server: avoid unaligned access in pfnMessageEnd 2023-02-17 22:48:56 +03:00
Alibek Omarov 0984368a31 engine: server: GoldSrc compliant pfnServerExecute(), don't execute config.cfg for server! 2023-02-11 07:22:04 +03:00
fgsfds 25a1cb8ce7 Nintendo Switch support (again) 2023-02-05 02:09:32 +01:00
Alibek Omarov 6df25392b8 engine: server: redirect special sounds, detected by leading asterisk, into CHAN_STREAM
In GoldSrc this magic symbol means that we should not override channel this
sound is playing on. Originally handled on client but for both static and dynamic sounds
so let's redirect channel on server side instead.
2023-01-27 06:19:31 +03:00
Alibek Omarov df1c9a5029 engine: simplify blue shift swapped lump check, change TestBmodelLumps to avoid reading past mod buffer 2023-01-03 07:01:39 +03:00
Alibek Omarov cd813bbfbe engine: server: do not apply sound precache check for sentences, as they may start with 0 index 2022-12-13 11:12:08 +03:00
SNMetamorph 5d73c6cb84 engine: server: backported enttools from old engine 2022-11-10 11:56:10 +03:00
Alibek Omarov 5678d9a253 engine: server: support MAP_ANON synonym for MAP_ANONYMOUS, disable allocating string pool near server library for OSX 2022-09-12 08:42:50 +03:00
Alibek Omarov d202a6c572 engine: server: emulate pfnPEntityOfEntIndex bug only with explicitly enabled GoldSrc bug compatibility 2022-08-15 06:00:00 +03:00
Alibek Omarov c326853617 engine: server: restore original PEntityOfEntIndex function, but still bug-compatible with GoldSrc 2022-07-21 01:52:10 +03:00
Alibek Omarov f0a856d9c8 engine: server: fix writing message size for engine messages, as it's expected to be 2-bytes 2022-06-26 15:05:06 +03:00
Alibek Omarov 6f36edfd16 engine: various const qualifier fixes 2022-05-29 04:22:43 +03:00
Alibek Omarov 8445567ab4 engine: server: remove unused arguments passed to Con_Printf 2022-05-29 02:27:39 +03:00
Alibek Omarov 33d79ddb24 engine: server: fix possible array overruns 2022-05-25 17:57:47 +03:00
Alibek Omarov 51526948c0 engine: server: make PEntityOfEntIndex bug-compatible with GoldSrc
Add new undocumented GoldSrc eiface function, PEntityOfEntIndexAllEntities,
a bug-free version of PEntityOfEntIndex

Ref: https://github.com/ValveSoftware/halflife/issues/2272
2022-05-21 03:03:59 +03:00
Alibek Omarov 36d757c74a engine: server: fix message trace output 2022-01-27 03:48:54 +03:00
Alibek Omarov 2fa964e939 engine: server: restore sv_trace_messages from old engine 2022-01-27 03:32:52 +03:00
Alibek Omarov ca3544d559 engine: server: don't assert for NULL player in FatPAS/PVS if we don't need it 2021-12-18 03:32:40 +03:00
Alibek Omarov a8c877c841 engine: server: fix ParseFile calls 2021-10-08 17:31:32 +03:00
SNMetamorph ec95948b69 engine: server: implemented instant game library loading 2021-10-03 04:38:05 +03:00
Alibek Omarov a547526e86 engine: fix some signed char cases 2021-07-20 15:18:55 +03:00
Alibek Omarov 49a20a9ac5 engine: server: fix memleak after previous commit 2021-06-02 22:06:17 +03:00
Alibek Omarov 8966172ce0 engine: server: avoid crash if map entity doesn't have classname (tfc map flagwar for example) 2021-06-01 23:45:55 +03:00
Alibek Omarov 42f47f51b5 server: implement GetFileSize and GetApproxWavePlayLen from HLSDK 2.4 2021-03-07 02:46:38 +03:00
Alibek Omarov 585ae28dd2 server: fix some int <> unsigned int conversions 2021-03-07 02:00:46 +03:00
Ivan Avdeev 012d1fa8bd fix USE_MMAP usage
should fix CI failures
2021-02-26 16:04:45 +03:00
Ivan Avdeev 1b426b67e7 partially fix amd64 build on windows
Quality of this commit is questionable. I have no idea whether what I did
here makes sense or not.
But it compiles and runs (provided with hlsdk-xash3d amd64 build, which
is another story).

This omits necessary waf changes that are necessary to make a valid
64-bit build. Apparently it's not enough to just pass `-8` on Windows,
you also need to hack wscript to add `x64` target to MSVC. I'll do that
later when I figure out how.

This change is a precursor for RTX Vulkan effort --
VK_KHR_ray_tracing_pipeline and friends are only available on 64-bit
nvidia drivers (no idea about AMD, pls send GPUs onegai).
2021-02-26 16:04:45 +03:00
Gleb Mazovetskiy 5e0a0765ce Trim all trailing whitespace
The `.editorconfig` file in this repo is configured to trim all trailing
whitespace regardless of whether the line is modified.

Trims all trailing whitespace in the repository to make the codebase easier
to work with in editors that respect `.editorconfig`.

`git blame` becomes less useful on these lines but it already isn't very useful.

Commands:

```
find . -type f -name '*.h' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
find . -type f -name '*.c' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
```
2021-01-04 20:55:10 +03:00
Andrey Akhmichin 1332381e2d engine: server: simplified strings operations. 2020-12-29 20:20:25 +03:00
mittorn 3a416636f1 engine: mark GAME_EXPORT's 2020-01-19 08:15:54 +07:00
mittorn bbd033c254 lib: restore dll loader support 2020-01-19 07:38:37 +07:00
Alibek Omarov 0fe18ae6dc engine: fix -Wmaybe-uninitialized 2019-12-24 02:47:51 +03:00
Alibek Omarov 9421457b3a engine: big refactoring commit, instead of using platform-specific platform-specific macros, use appropriate macros set by public/build.h 2019-11-24 03:52:08 +03:00