Commit graph

152 commits

Author SHA1 Message Date
Denis Pauk
7ee871dc76 cin: add lmp image format support 2024-07-31 00:12:53 +03:00
Denis Pauk
fb85150702 maps: move entity add null terminate to sv_init 2024-05-04 17:18:48 +03:00
Denis Pauk
f7ec7d268e server: use game api version for protocol detect 2024-04-24 00:55:53 +03:00
Denis Pauk
067a30e83d savegame: fix load/save Q64 maps 2024-04-20 18:40:32 +03:00
Denis Pauk
8d21ed6874 renders: remove support of QBSP map format
Map should be converted from any format to QBSP before render by
Mod_Load2QBSP
2024-04-18 00:29:14 +03:00
Denis Pauk
446224467d Fix memory use after free detected by ASAN 2024-04-15 00:30:30 +03:00
Denis Pauk
2c0fca8458 filesystem: add sin pack file support
Based on: https://github.com/yquake2/pakextract
2024-03-31 23:55:49 +03:00
Denis Pauk
d87b1b512d game: fix configstring convert before connection creation 2024-03-27 23:51:06 +02:00
Denis Pauk
c57fd107d6 server: extend gun frame and index to short 2024-03-24 14:39:17 +02:00
Denis Pauk
cc2f531faa server: extend count of sound indexes 2024-03-24 14:18:26 +02:00
Denis Pauk
6aa0b2a92b server: QII97 protocol version check unification 2024-03-24 13:22:42 +02:00
Denis Pauk
f7dc2777c5 server: support of load original game library 2024-03-24 12:32:30 +02:00
Denis Pauk
32047010a2 server: convert config string to protocol range 2024-03-24 01:19:16 +02:00
Denis Pauk
3906f6d146 cin: support tga/jpg/png static image 2024-03-17 23:21:49 +02:00
Denis Pauk
28668972ff client: add custom protocol with short model index 2024-02-27 00:37:26 +02:00
Denis Pauk
b21391954d game: fix shambler effect 2024-02-11 23:51:33 +02:00
Denis Pauk
85704fa134 sv_send: return new size of buffer before use 2024-02-10 15:38:42 +02:00
Denis Pauk
322c3ee9e8 sv_send: realloc send buffer 2024-02-10 15:23:38 +02:00
Denis Pauk
014dd11b2e clean up function definitions 2024-01-07 19:22:09 +02:00
Denis Pauk
7372623056 cleanup function definitions 2024-01-01 17:36:53 +02:00
Denis Pauk
8d35e72606 client: support png skins in multiplayer 2023-11-26 16:47:49 +02:00
Denis Pauk
67adb452dc Loki Games intro game alias support (movie@menu) 2023-11-02 00:03:11 +02:00
Denis Pauk
585af3a0bd client: Add network/demo protocol version print 2023-10-30 00:41:35 +02:00
Denis Pauk
64215c04f6 Fix endline in files, without code changes
Run: sed -i 's/[[:blank:]]*$//' */*.{c,h}
2023-10-29 01:58:20 +03:00
Denis Pauk
f83d40ffe3 cin: cleanup debug message and support roq
RoQ format requires ffmpeg.
Reuse ffmpeg for mpg,smk also.
2023-10-27 20:19:51 +03:00
Denis Pauk
258d041b5d cin: Add ogv video support 2023-10-27 19:43:41 +03:00
Denis Pauk
586d62d4de server: badlands hack 2023-10-17 00:16:05 +03:00
Denis Pauk
31c09bca3c Left CMod_LoadSubmodels with static allocation
Subcmodel is still statically allocated as big
ammount of code expect to access it after model cleanup
2023-10-09 00:00:02 +03:00
Denis Pauk
56a205c606 Use hunk allocation for CMod_LoadNodes 2023-10-08 18:42:58 +03:00
Denis Pauk
b56df03b76 Initial server model load code with hunk alloc 2023-10-08 00:47:53 +03:00
Denis Pauk
ea3667ae9c show count of submodels and radius of model 2023-09-30 16:30:18 +03:00
Denis Pauk
ff70128bb9 Make all names in game interface const where possible 2023-09-22 00:58:40 +03:00
Denis Pauk
bd5685d201 Add Heretic 2 mpeg support
2aa2b7aec8
2023-09-17 12:11:41 +03:00
Denis Pauk
c898573885 Add support of smacker files
https://sourceforge.net/projects/libsmacker/files/libsmacker-1.2/

libsmacker is released under the Lesser GNU Public License, v2.1.
2023-09-17 11:54:57 +03:00
David CARLIER
437c16c0d1 "constifying" where underlying C calls expect compile time constants. 2023-09-16 18:16:52 +02:00
David CARLIER
5b895615a4 fix clang 16 build as C11 _NoReturn/noreturn attributes conflict.
And remove a handful of unused vars.
2023-04-16 08:19:33 +01:00
Yamagi
81647f79ec Remove the unused msg cvar and server side infrastructure.
In Quake I this coould be used to filter messages by priority. id
Software never implemented it for Quake II, it's just a left-over.
Remove it.

The `msg` cvar was exploited in attacks against the client. A malicious
server send a `msg` cvar as stufftext -> it gets saved into the config
-> since it's retrivable over the network through the userinfo stuff
this can be used to track users, etc.
2023-01-07 19:15:01 +01:00
Daniel Gibson
17728f12c3 Workaround for #910 (explosions sometimes not drawn when in water)
Sometimes, when half-submerged in opaque water (head/camera still
above water), explosions and similar weren't drawn, because
1. The check whether a client gets a message to draw an explosion (etc)
   uses the clients origin, not the camera position
2. Apparently the map compiler was buggy and (only in some places!)
   didn't correctly mark areas in the PVS/PHS (PHS is for hearing) as
   connected even though they should be (when underwater you should be
   able to hear things in the region above the water, even if the water
   is opaque and you can't see it).

This is an experimental(!) workaround that does a second check with a
higher origin if the first check fails and the client is currently
(considered) under water.
It's totally possible that this breaks other things, I don't know..
By the way, a good place to test this is the first water area in jail1
2022-11-06 17:56:44 +01:00
Daniel Gibson
4d6bdcc853 If CM_LeafCluster() returned -1, don't use that as array index, fix #894
It seems to return -1 if the leaf is in the void; sometimes it
also seems to happen when you're just close to a wall, maybe due to
(mis)prediction.
ASan complains about this, but in practice it probably can't cause
issues, as the byte left to the mask array (from CM_ClusterPVS() or
CM_ClusterPHS()) will either belong to another global variable or
padding between them. Fixed it anyway.
2022-10-08 16:34:28 +02:00
Yamagi
ec398e2df0 Mark game mode cvar as CVAR_SERVERINFO and CVAR_LATCH.
* `coop` and `deathmatch` were marked as CVAR_LATCH, `singleplayer` was
  not. Fix that by adding the flag to `singleplayer`.
* `coop` and `deathmatch` were marked CVAR_SERVERINFO in the server
  intitialization code. Mark both of them and `singleplayer` with
  CVAR_SERVERINFO as soon as we're initializing them the first time.

Pointed out by @BjossiAlfreds.
2021-11-13 12:22:14 +01:00
Yamagi
9f558dbc80 Initialize singleplayer as CVAR_LATCH.
Changing the game mode during a session screams for problems.
2021-11-13 12:22:14 +01:00
BjossiAlfreds
91e2cfdada gamemode command for getting info and switching gamemodes 2021-11-13 11:45:48 +01:00
BjossiAlfreds
37cfb61b1f Gamemode management improvements
Restored original gamemode prioritization to dm > coop > sp, fixed a bug where server start menu did not clear singleplayer cvar, and rewrote how server init manages gamemode cvars
2021-11-13 11:41:29 +01:00
BjossiAlfreds
59f0462cc1 Fixed updated gunangles and gunoffset not always being sent to client 2021-10-14 02:06:52 +00:00
Yamagi
c9913eb538 Detect if an autosave is loaded and advance world by 100 frames.
Autosaves are special. The are a byproduct of the level change process.
When loaded they aren't respawning the player at it's last position, the
player is relocated to func_playerstart. Since entities spawn at their
start position, the player may end up in the wrong spot.

One example is train.bsp -> base2.bsp. The platform spawns in upper
position, the player in lower position. The platform comes down and
crushes the player.

Most of these cases work by luck when the client isn't paused during
load, because the world advances a few frames before the player is
spawned. Implement a better fix: Detect if an autosave is loaded (name
is save0 or current) and treat it like a map change, advance the world
by 100 frames. We cant use the `autosave` boolean, because it's in the
game savefile.

Fix suggested by @BjossiAlfreds, closes #711.
2021-05-29 17:16:42 +02:00
Yamagi
baae6bed89 Send protocol version to client.
Knightmare of KMQ2 requested this as an easy way to support client site
prtocol auto detection.

While here fix the protocol version number in the error string.
2021-03-28 18:48:38 +02:00
Yamagi
2fae58d56b Implement singleplayer in the dedicated server.
When set to `1`, both `deathmatch` and `coop` are forced to `0`.
`maxclients` is forced to `1`. This makes it possible to play single
player campaigns over the dedicated server.

Closes #614.
2021-01-17 11:07:46 +01:00
Denis Pauk
db20a6ce18 Add ioquake3 vstr/nextdemo support 2020-10-06 23:38:12 +03:00
Yamagi
634748a5b5 Add missing return type for SV_ListMaps_f() 2020-08-23 10:34:52 +02:00
JBerg
b746f4520d added listmaps command 2020-08-18 23:18:22 -04:00