Commit graph

52 commits

Author SHA1 Message Date
smallmodel
a5bb4c1874
Free up debug strings when deallocating game-data
This fixes a memory leak, which also occurs in the original game
2025-02-18 20:43:03 +01:00
smallmodel
f165ebf9a3
Refactor G_ExitLevel 2024-12-16 23:03:15 +01:00
smallmodel
89140f775e
Archive entities at the order they were created
This fixes an issue where turrets would Think() before the base they are mounted on (like tanks), which means the turret would set its origin before the base (tank) does. This issue also occurs on the original game
2024-11-23 15:19:05 +01:00
smallmodel
de0e4954f8
Call G_MoveClientToIntermission() instead of setting the immobile flag 2024-11-10 15:53:06 +01:00
smallmodel
a644e8a09c
Check for GT_SINGLE_PLAYER instead of 0 2024-11-03 00:40:59 +01:00
smallmodel
6ff92f0a7e
Process the ubersound folder differently depending on the target version
- On 1.11 and below, the ubersound folder is parsed either only in dedicated server mode or in client-only mode
- On 2.0 and above, alias are cleared and the ubersound folder is always parsed in multiplayer on both client and server
2024-10-31 23:57:18 +01:00
smallmodel
d3212c55a0
Properly parse and cache ubersounds, and don't cache resources that must be always loaded to avoid filling up sound indexes 2024-10-29 21:02:16 +01:00
smallmodel
48fa5c0ce6
Parse all scr files inside the ubersound folder 2024-10-28 23:29:04 +01:00
smallmodel
bf68808eae
Set the skel index for each updated entity so poses only update when needed
This fixes poses being updated even if they don't need update (no frame changed), which resulted in some performance loss and some rare accuracy issues when AI fire weapons
2024-10-28 00:55:37 +01:00
smallmodel
24309095ff
Rework bot save/load:
- Only save and restore the userinfo
- Restore bots when the server spawns
- Read client session data like real players
2024-10-11 22:54:40 +02:00
smallmodel
0b07858bfc
Refactor PlayerBot to use a separate controller class, alongside classes that manage bots 2024-10-08 22:17:22 +02:00
smallmodel
5019d1e4f9
Spawn bots after the server has spawned 2024-10-06 21:43:42 +02:00
smallmodel
c6675f2013
Remove special features code to avoid any confusion 2024-09-22 20:06:31 +02:00
smallmodel
f9d264058b
Use safe version of sprintf and strcpy 2024-09-20 23:08:53 +02:00
Sébastien Noel
a010e648ee Fix a few typos 2024-09-19 10:52:47 +02:00
smallmodel
cde7cbc3a3
Implement G_ClientDrawTags 2024-09-02 19:52:32 +02:00
smallmodel
4d1380b5c4
Implement G_ClientDoBlends and FindIntermissionPoint 2024-09-02 19:52:30 +02:00
smallmodel
f84ed6b794
Fix crash when loading from save, caused by incorrect client-game state size
Closes #343
2024-08-23 11:48:50 +02:00
Trung Lê
3b2e4ff9c1
Revert to original code 2024-08-21 00:18:38 +10:00
Trung Lê
1f4b7718e8
Refactoring gameExport_s::ReadLevel() and gameExport_s::WriteLevel() 2024-08-20 23:41:43 +10:00
smallmodel
422bf647a7
Save the client-game state into the archive file (feature from moh spearhead 2.0)
This saves cgame data such as emitters and vss sources
2024-07-15 23:45:32 +02:00
smallmodel
81b86d61da
Fix read-only cvar being improperly archived
This caused cvars like `paused` being wrongly restored. If the `paused` value is 1 or above, like when saving from the menu, the game would get stuck loading the level because it's paused, no frame could be executed.
It also fixes cvars like `sv_fps`, `g_playermodel` not being archived when they should.
Fixes #326
2024-07-15 20:39:22 +02:00
smallmodel
cb59edc963
Handle script exceptions in G_ServerSpawned 2024-06-09 16:56:42 +02:00
smallmodel
b77f62ab58
Load/Save SimpleArchivedEntity
This fixes #213 where elevator wouldn't go up because of missing waypoint
2024-02-19 23:23:15 +01:00
smallmodel
5064f2c16d
Added g_target_game 2024-01-02 18:30:46 +01:00
smallmodel
08c040d4ea
Reset smoke sprites during restart 2023-11-13 19:34:13 +01:00
smallmodel
22eadf2c08
Removed code that prevent pausing in debug builds 2023-11-07 19:20:26 +01:00
smallmodel
f52fcc6f0e
Process the parent of each entity correctly 2023-10-31 23:22:43 +01:00
smallmodel
abd757f3bc
Actor health must be above to 0 for NPC to count 2023-10-30 23:01:43 +01:00
smallmodel
78c481d725
Added g_shownpc support 2023-10-30 23:00:07 +01:00
smallmodel
1095e3d509
call arc.Close() after checking if it was Loading 2023-09-14 00:19:17 +02:00
smallmodel
7eb8ef42b7
Update smoke sprites and bad places every frame 2023-09-12 23:59:51 +02:00
smallmodel
3d936dede1
Don't change the protocol when in special game 2023-09-09 16:46:51 +02:00
smallmodel
88438d6db4
Removed signal handlers from g_main.cpp as it's handled by the main app directly 2023-09-01 22:49:58 +02:00
smallmodel
ecc3c9f7b4
Renamed SVF_HIDEOWNER to SVF_SENT 2023-08-28 23:00:58 +02:00
smallmodel
296249b203
Fixed wrong SVF flags 2023-08-28 22:13:16 +02:00
smallmodel
ec8eaacc69
Fixed "vstr" in the nextmap argument 2023-08-19 19:49:28 +02:00
smallmodel
7a57a25c58
Reworked the bot system 2023-08-19 17:58:54 +02:00
smallmodel
b9f1530eec
G_ShutdownGame: shutdown events and deallocate game data 2023-08-19 15:23:48 +02:00
smallmodel
4de1b7c73b
When showing entities number, add maxs.z offset 2023-08-17 16:09:46 +02:00
smallmodel
ce1b3aaee9
Fixed ArchiveAliases
Archive PathSearch
2023-08-16 19:13:38 +02:00
smallmodel
efed6d0eac
Fixed script developer printf 2023-08-16 02:43:22 +02:00
smallmodel
3daee90b5b
Moved functions from game.cpp/game.h to where they should be (g_main, g_utils) 2023-08-15 01:41:35 +02:00
smallmodel
c4738966fe
Using g_utils.cpp from fakk 2023-08-15 01:27:35 +02:00
smallmodel
77a9cd5a9a
Call Director.Unpause() to execute running scripts 2023-08-12 03:04:31 +02:00
smallmodel
ba931cbedf
Added all mohaas/mohaab cvars 2023-08-10 12:04:45 +02:00
smallmodel
51374729d3
Clear g_iInThinks each frame
Display the memory usage if the g_showmem cvar is set
2023-07-30 14:27:15 +02:00
smallmodel
5333c7ff4a
Removed empty line before opening braces 2023-07-05 20:52:55 +02:00
OM
87b238e6de Renamed gameImport to game_import_t, and gameExport_t to game_export_t 2023-07-02 19:22:17 +02:00
OM
7b34f064d0 Moved gi.protocol to a new variable called g_protocol 2023-07-02 19:17:15 +02:00