changelevel: start a map even if none is running Implements https://gitlab.com/xonotic/darkplaces/-/issues/408 Although the original implementation of this convenience 688396cea66f09e7ce20d3e3b077261dd1d3db7e labeled it as a hack, it was robust, simple and worked fine in div0-stable, so removing it in cb11bdeed238603b11d8dac4908cfdbabe298079 was a regression. Also removes some redundant string copying. Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
server: always use correct case for map names Previously whatever was typed in as the map/changelevel argument was used even if it didn't match the case of the filename in the pak, which meant QC could see multiple instances of the same map that differed only by case, causing problems for gameplay stats. Now DP will always use the same case as the real .bsp filename for the `mapname` globals, and the sv_world* and cl_world* cvars, and the server status and getinfo/getstatus responses. This matches the behaviour of QC code which retrieved the name from the VFS, such as the `gotomap` and voting code in Nexuiz and Xonotic. Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
sv_cheats: fix two segfaults when setting it to 0 Assuming the SVQC program is always running crashes when it's not. Testing if the edict pointer is NULL isn't a valid way to stop at the end of the client slots, which caused this to crash when Xonotic SVQC was running. See 1814b2df58302baa47df6718b09465265dfc7e5c Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
com: rename BSD strlcpy and strlcat The C standard reserves str* and mem* for the implementation. Checking for BSD or OS X is not a robust way to determine if libc provides these (eg glibc may implement them). Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
build: fix buildstring The revision was always "-", there was code duplication and inconsistency, the meaning of some strings was unclear. Frees up some space in the `status` "version:" line by moving gamenetworkfiltername to "protocol:" which seems like a more relevant section anyway. Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
protocol/dp8: Implement parting messages * Extended CL_Disconnect and SV_DropClient for this purpose. * Add a string parameter to svc_disconnect and clc_disconnect, which shall contain the parting message.
edict: Move free and freetime into prvm_edict_t itself
host: Clean it up. Give some functions new names and new homes. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13135 d7cf8633-e32d-0410-b094-e92efae38249
cmd: Merge cmd_client and cmd_server into cmd_local. Third time's a charm. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13129 d7cf8633-e32d-0410-b094-e92efae38249
sv_ccmds: Comment fix git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13076 d7cf8633-e32d-0410-b094-e92efae38249
Fix a few warnings in VS2019. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13071 d7cf8633-e32d-0410-b094-e92efae38249
Revert "cmd: Merge cmd_server and cmd_client into cmd_local again" This reverts commit aadd101471d0227217f84d3dc6ed03fec4aacd4c. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13043 d7cf8633-e32d-0410-b094-e92efae38249
cmd: Merge cmd_server and cmd_client into cmd_local again git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13035 d7cf8633-e32d-0410-b094-e92efae38249
Merge the sendcvar command into one. Call the old functions using hooks. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13034 d7cf8633-e32d-0410-b094-e92efae38249
host: Add two hooks for disconnecting and toggling the menu git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12996 d7cf8633-e32d-0410-b094-e92efae38249
model_shared: Rename dp_model_t to model_t, to avoid confusion with the dpm format git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12984 d7cf8633-e32d-0410-b094-e92efae38249
sv_ccmds: Move what are actually client commands to the client. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12973 d7cf8633-e32d-0410-b094-e92efae38249
server: Eliminate references to cls.state in server code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12940 d7cf8633-e32d-0410-b094-e92efae38249
Unify the command and cvar flags, under the CF_ prefix. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12923 d7cf8633-e32d-0410-b094-e92efae38249
Rename qboolean to qbool git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12920 d7cf8633-e32d-0410-b094-e92efae38249