Commit graph

196 commits

Author SHA1 Message Date
Alibek Omarov
32aa1f91bf engine: pass argv0 to crash handler setup, which is required for libbacktrace integration
Fix indentation in crash_posix.c
2025-02-09 15:36:49 +03:00
Alibek Omarov
62e3ba2126 engine: add cvars to control mounting additional directories
Use existing ui_language cvar for mounting localization folders.
2025-02-05 18:54:28 +03:00
Alibek Omarov
b16037eabf engine: drop raw SDL joystick API, always use GameController instead. Implement actually working rumble, ensure we're freeing up all resources related to gamepads 2025-01-31 17:50:19 +03:00
Alibek Omarov
ad6db91285 engine: move xashid stuff onto client 2025-01-25 17:51:48 +03:00
Alibek Omarov
bccd3f2271 engine: pass launcher's default game directory all the way down to Platform_Init, so we mount correct extras.pk3 on Mac 2025-01-23 10:22:53 +03:00
Alibek Omarov
232d1f8583 engine: make separate mempools for cmds, cvars and basecmd 2025-01-21 11:26:35 +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
90e493fa3a engine: common: add Host_ExitInMain function that will force engine return from Host_Main() function, essentially making engine gracefully exit on Android
In future, this might be used everywhere, so users would be able to add custom
cleanup in some advanced game_launch implementation, on any platform.
2025-01-09 20:31:26 +03:00
Alibek Omarov
0d55441830 engine: properly pass shutdown reason down to close log, helps to finally get rid of global finalmsg 2025-01-09 08:04:18 +03:00
Alibek Omarov
14e79f04ac engine: prevent extra malloc in exec by checking if cfg already contains newline at EOL and appending it to cbuf if required 2024-12-28 16:03:49 +03:00
Alibek Omarov
2d1e76199b engine: host: always print Host_Error text to log, even if console hasn't been enabled 2024-12-27 18:37:25 +03:00
Alibek Omarov
a5d78ecfd7 engine: be more verbose on why the engine is going to be shut down 2024-12-27 18:30:46 +03:00
Alibek Omarov
48bdd4238e engine: always include reason to server shutdown 2024-12-26 02:13:13 +03:00
Alibek Omarov
4f98187e9a engine: move select-based stdin input function to platform/posix 2024-12-24 11:13:05 +03:00
Alibek Omarov
5007f8488c engine: host: add simple usage help for -bugcomp flag 2024-12-05 18:29:54 +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
e14cd758ad engine: turn Platform_Sleep into an inline function that directly calls platform-specific delay functions 2024-12-04 18:32:03 +03:00
Alibek Omarov
6b24b263ab engine: host: expose new -clientport settings. Realign options 2024-11-25 02:53:28 +03:00
Alibek Omarov
31a86d8af2 engine: use new Q_splitstr to work with single character delimited strings 2024-11-17 05:35:36 +03:00
Alibek Omarov
6bdb3f6ea1 engine: don't save fps_override value as it's an experimental feature 2024-10-30 19:26:37 +03:00
Alibek Omarov
2fe94bceb6 engine: limit framerate during connection to GoldSrc servers to exactly 31 FPS, like GoldSrc 2024-10-30 19:25:48 +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
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
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
1d64635783 engine: correctly check for cls.legacymode, as it's not a boolean anymore 2024-10-11 00:08:21 +03:00
SNMetamorph
50c805826f engine: implemented handling SIGTERM signal for proper stopping dedicated server 2024-10-08 01:05:26 +03:00
Alibek Omarov
2eb8f88a20 engine: move attenuation none sound spatialize fix to bugcomp mode, as Xash native games use this 2024-09-05 13:50:15 +03:00
Alibek Omarov
e70f9a67b8 engine: host: always enable console for dedicated 2024-07-26 11:08:34 +03:00
Alibek Omarov
6120c0daec engine: print command line args alongside developer level during init 2024-07-22 22:15:56 +03:00
Alibek Omarov
708c691cdb engine: fix XASH_DEDICATED check 2024-07-10 10:34:57 +03:00
Alibek Omarov
c42960ec2a engine: server: mark some cvars and movevars as server cvars, so they get reported in rules query
Bring back sv_contact cvar, as it makes sense to get this from rules query
2024-07-07 03:01:59 +03:00
Alibek Omarov
d56e53a347 Replace hardcoded functions names by __func__ macro
* while we're here, fix some possible bugs
* and fix -Wformat=2

s/__FUNCTION__/__func__/g

awawawa
2024-06-19 06:53:42 +03:00
Alibek Omarov
95b48da37d engine: allow to change hardcoded path to custom.hpk 2024-06-15 17:22:26 +03:00
Alibek Omarov
8bc76e3d58 engine: host: do not specifically check timedemo or vsync in Host_CalcSleep, because it's already has been checked in Host_CalcFPS 2024-06-15 13:57:12 +03:00
Alibek Omarov
3434005e66 engine: common: make Host_IsLocalGame and Host_IsLocalClient inlined 2024-06-13 01:20:14 +03:00
Alibek Omarov
240b6fb6f2 engine: fix possible unprivileged config execute with fake extension 2024-06-12 11:16:31 +03:00
Alibek Omarov
4163d3655a engine: reformat and reorder host_parm_s struct, remove now unused host.daemonize and host.enabledll 2024-06-12 11:16:26 +03:00
Alibek Omarov
2c7bf49fc9 engine: host: avoid some of unnecessary double-to-float conversions 2024-06-12 10:20:09 +03:00
Alibek Omarov
739592e50d engine: host: refactoring, reduce usage of global variables a bit 2024-06-12 10:20:09 +03:00
Alibek Omarov
393e31e509 engine: move finding root/readonly directory to FS initialization, remove unused host.rodir, host.rootidr 2024-06-12 10:20:09 +03:00
Alibek Omarov
4e2708c1ac engine: bring back texture replacement 2024-06-11 06:16:26 +03:00
Alibek Omarov
a6c2cfe89b engine: avoid constants in Q_strncpy third argument, where possible 2024-05-06 14:27:26 +03:00
Alibek Omarov
94d3eff9ce engine: host: fix build with Q_strchrnul returning const char * 2024-05-03 15:31:20 +03:00
Alibek Omarov
31c0934108 engine: fix parsing -bugcomp flags, assume bugcomp flags only starts with alphabetic character 2024-05-03 06:28:48 +03:00
Alibek Omarov
dd410a2de5 engine: implement small Message Rewrite Facitility that allows to run mods that directly write internal GoldSrc messages 2024-04-28 06:59:18 +03:00
Alibek Omarov
ea34bc8652 engine: turn bugcomp into flags that can be enabled/disabled separately 2024-04-21 16:52:15 +03:00
Alibek Omarov
ca3b4a9d7f engine: host: oops 2024-04-18 16:48:41 +03:00
Alibek Omarov
213650db8f engine: exit with non-zero return code if engine tests are failed 2024-04-18 16:36:18 +03:00
Alibek Omarov
2640b6d869 engine: host: remove misleading message about TAB-autocompletion in dedicated mode 2024-03-19 21:24:21 +03:00
Alibek Omarov
049bed555e engine: host: fit -help into 80 columns terminal 2024-03-19 21:13:28 +03:00