Commit graph

4283 commits

Author SHA1 Message Date
smallmodel
fecd1eb505
Preallocate and set the maximum buffer size to receive the request 2025-03-13 23:37:20 +01:00
smallmodel
9536a8ec64
Specify a small timeout for each request 2025-03-13 22:41:01 +01:00
smallmodel
06a12246f5
Notify the request thread of shutdown only if it's waiting
This avoids a deadlock that would occur if notify_all() is called before the thread is waiting
2025-03-13 22:37:21 +01:00
smallmodel
456b660b2a
Improve the update checker so it can be opt-out (#696)
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 1m4s
* Add a cvar to enable/disable update checking

* Refactor update checker

This splits the thread part from the main part to clarify the code

* Move and update the configuration documentation, for a more general approach
2025-03-13 21:09:42 +01:00
smallmodel
c854df8ffa
Don't start the update thread if it shouldn't be active or if the network doesn't work 2025-03-12 23:58:24 +01:00
smallmodel
22a34d8d68
Fix compile error when libcurl is not installed 2025-03-12 23:18:11 +01:00
ysdragon
f164e889cc
Add optional reason to kick/ban commands
And enhance `SV_IsBanned` to return ban reason and update `SV_DirectConnect` to display it
2025-03-12 07:30:40 +02:00
ysdragon
1e2a331518
Add reason field to serverBan structure with defined maximum length 2025-03-12 07:30:22 +02:00
smallmodel
158ff62aaa
Fix small typo
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 59s
2025-03-12 00:02:44 +01:00
smallmodel
79af8a46d1
Increase update thread sleep time
This prevents wasting time in scheduling the thread
2025-03-11 23:57:40 +01:00
smallmodel
e0b7d4cc60
Display a message box to the client when a new update is available 2025-03-11 23:37:51 +01:00
smallmodel
4fe11b5ea9
Always return false for CheckNewVersion() if libcurl is not used 2025-03-11 23:37:34 +01:00
smallmodel
0b590ab147
Add a way to create a message box 2025-03-11 23:32:22 +01:00
smallmodel
7a20bb4deb
Add a new method that return version numbers 2025-03-11 23:32:18 +01:00
smallmodel
c87c242098
Add a getter for m_font 2025-03-11 23:31:16 +01:00
smallmodel
5b9efaa2a0
Remove cpp-httplib
Some checks failed
Build branch / build-all (push) Failing after 23s
CodeQL / Analyze (push) Has been cancelled
2025-03-06 20:21:23 +01:00
smallmodel
58f7e6f1fe
Use cURL instead of cpp-httplib 2025-03-05 23:40:05 +01:00
smallmodel
9538dcb6e7
Print network name change
Some checks failed
Build branch / build-all (push) Failing after 26s
CodeQL / Analyze (push) Has been cancelled
2025-03-03 22:36:46 +01:00
smallmodel
0080f55ef8
Round to integer to avoid blurry text
Some checks failed
Build branch / build-all (push) Failing after 20s
CodeQL / Analyze (push) Has been cancelled
2025-03-02 14:12:54 +01:00
smallmodel
aac91e8763
Refactor and simplify Alias_ListSort 2025-03-02 13:55:44 +01:00
smallmodel
5c0adf9a28
Refactor Alias_FindRandomRange 2025-03-02 13:49:01 +01:00
smallmodel
9963a99868
Fix a stack overflow issue (#686)
The length check now include the null-terminated character
2025-03-02 13:40:36 +01:00
smallmodel
515a531abf
Use the length returned by Com_sprintf 2025-03-02 13:26:47 +01:00
smallmodel
d3d16ab7b6
Use the index of the entry in the player list, rather than the client number 2025-03-02 13:24:08 +01:00
smallmodel
d08027360f
Formatting 2025-03-01 23:34:24 +01:00
smallmodel
c1c70a53be
Transition to idle after grouprooms or masterinfo requests are finished 2025-02-28 18:12:34 +01:00
smallmodel
f89bfba5dc
Replace tabs by spaces 2025-02-28 18:11:09 +01:00
smallmodel
e98c725043
Fix player having no damage alpha in mohaas and mohaab (#678) 2025-02-24 22:11:41 +01:00
smallmodel
08d0a378f8
Fix compilation fail when DEBUG_MEM is set (#677) 2025-02-24 13:38:33 +01:00
smallmodel
01381ed084
Add HTTP support and update checking
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 16s
2025-02-24 02:20:31 +01:00
smallmodel
2c72908f76
Use the correct allocator when archiving a con_set object
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 17s
The default c++ allocator was be used to allocate an array of pointers, but then when destroying the array, Z_Free was called which would throw an error
2025-02-22 23:31:20 +01:00
smallmodel
32ba71693c
Remove some unnecessary endian swap 2025-02-22 22:56:57 +01:00
smallmodel
7fff3192a6
Fix server object mistakenly casted to int 2025-02-22 22:34:19 +01:00
smallmodel
83aa818c00
Don't add the same server twice 2025-02-22 22:24:19 +01:00
smallmodel
56d61bdef3
Implement support for parsing group rooms and master info 2025-02-22 22:13:23 +01:00
smallmodel
ebd86b32bd
Improve code clarity 2025-02-22 22:12:34 +01:00
smallmodel
08c718d232
Add support for server list encryption and tell the master server to return the server list encrypted 2025-02-22 20:39:10 +01:00
smallmodel
512831dea9
Properly unregister events from the level object
Some checks failed
Build branch / build-all (push) Failing after 18s
CodeQL / Analyze (push) Has been cancelled
Unregister() was mistakenly being called on the DM_Manager object when it should have been called on the level object, to unregister events like axiswin, allieswin, draw
2025-02-20 20:36:19 +01:00
smallmodel
a36bbb0cda
Remove useless qr fields
Some checks failed
Build branch / build-all (push) Failing after 39s
CodeQL / Analyze (push) Has been cancelled
2025-02-19 20:39:56 +01:00
smallmodel
8a9e0f0b01
Update master server address
It's now using master.openmohaa.org, which provides more flexibility for configuring the domain
2025-02-19 20:39:44 +01:00
smallmodel
076fd69131
Use the engine allocator to allocate/delete memory from the table of pointers 2025-02-19 20:11:07 +01:00
smallmodel
587f7f544e
Add REF_DLL for mem_blockalloc 2025-02-19 20:03:23 +01:00
smallmodel
178c486b83
Use NewEntry/DeleteEntry like con_set 2025-02-19 18:16:53 +01:00
smallmodel
004f88dae9
Use a better method for storing class lists
This prevents allocating a ClassDef just to act as a root list. The classlist would never be freed (memory leak)
2025-02-18 22:39:52 +01:00
smallmodel
97fe824b80
Clear subtitles for all nodes when deleting the alias list 2025-02-18 22:35:48 +01:00
smallmodel
758176dd32
Delete the waitTillSet when destroying the class 2025-02-18 21:52:35 +01:00
smallmodel
854c1980cc
Make EventQueueNode part of LightClass 2025-02-18 21:46:34 +01:00
smallmodel
840002b63a
Save and restore bots when needed
When the map was changing, it allocated an array of saved bots which would never be used due to the game module being freed, it caused a memory leaka
2025-02-18 21:35:23 +01:00
smallmodel
47a447dbb0
Remove all state scripts that were created
This fixes a memory leak that also occurs in the original game
2025-02-18 21:08:44 +01:00
smallmodel
a1d47cf64a
Add placement new/placement delete 2025-02-18 20:54:24 +01:00