Commit Graph

373 Commits

Author SHA1 Message Date
Lion Kortlepel
6a411171f9 start implementing parsing of packets server-side 2024-01-15 22:11:44 +01:00
Lion Kortlepel
4aca87d3e6 fully implement tcp and udp send and recv of packet types 2024-01-15 20:56:44 +01:00
Lion Kortlepel
7e9bb0cbf2 start rewriting networking 2024-01-15 20:39:32 +01:00
Lion Kortlepel
443871ec0f remove usages of weak_ptr 2024-01-11 14:30:25 +01:00
Lion Kortlepel
130e1acdb3 refactor client disconnect, client interation
anywhere a client is disconnected, TNetwork::Disconnect is called now.
Nothing else is valid.
ForEachClientWeak() was fully removed.
2024-01-11 14:14:34 +01:00
Lion Kortlepel
aa29d04b60 remove unused TVehicleDataLockPair 2024-01-11 14:14:34 +01:00
Lion Kortlepel
b9f73f77c3 major refactor of Client and Server
this refactor includes changes to TClient:

- all member fields are now public, but protected with Sync (an alias
  for boost::synchronized_value
- removed all (now) obsolete getters and setters

changes to TServer and TNetwork:

- thread-safe ID generation, previously it was possible for there to be
  ID duplicates. this is now solved by moving id generation and
  assignment into the same mutex locked context.
- deprecated ForEachClientWeak and replaced some usages of it with
  ForEachClient, getting rid of the weak_ptr shit in most places
- implemented a bunch of new functions for getting rid of more weak_ptr
  everywhere
2024-01-11 14:14:31 +01:00
Lion Kortlepel
c6aa7776fc make update message adjustable by provider 2024-01-09 17:41:05 +01:00
Lion Kortlepel
0166e488d0 fix calling GlobalParser as static 2024-01-09 15:34:33 +01:00
Lion Kortlepel
0836fd3af8 fix bug in HandlePosition which caused the vehicle position not to be
saved properly
2024-01-09 15:34:33 +01:00
Lion Kortlepel
cebb2634a1 bump version 2024-01-08 17:43:54 +01:00
Lion Kortlepel
1f72a45231 bump version number 2023-12-29 01:43:03 +01:00
Lion Kortlepel
e724a2e467 Merge remote-tracking branch 'origin/master' into feature-tags 2023-12-28 13:57:49 +01:00
Lion Kortlepel
8cccbe8542 Merge remote-tracking branch 'origin/master' into 226-allow-env-to-override-serverconfig 2023-12-28 13:49:02 +01:00
Lion Kortlepel
6787843b37 pretty-print tags on startup 2023-12-28 12:58:29 +01:00
Lion Kortlepel
16d3c6f796 Merge remote-tracking branch 'origin/master' into feature-tags 2023-12-28 12:36:22 +01:00
Lion
c7e228fbae bump version to 3.2.0
due to new features like ENV reading this is now a feature release, so minor
2023-12-28 11:56:25 +01:00
Lion Kortlepel
89db370e12 use env variables by default to override config values 2023-12-25 16:16:01 +01:00
Lion Kortlepel
ac41547123 bump version to 3.1.4 2023-12-21 13:05:33 +01:00
Lion Kortlepel
81299db946 fix console initializing too early
the console was initialized too early, leading to the server waiting for
it to shut down if the authkey is invalid, among other issues.
2023-12-21 12:49:20 +01:00
Starystars67
dc4ead532d Changed default tag to Freeroam as that is the majority of servers. 2023-12-18 14:10:07 +00:00
Starystars67
8c73eb8aea Added Tags Feature to the BeamMP Server. This allows better filtering on the server list. 2023-12-10 12:50:24 +01:00
Lion Kortlepel
9f01268538 update version to 3.1.3 2023-12-09 20:01:53 +01:00
Lion Kortlepel
dea203c108 make IThreaded::~IThreaded virtual to make destruction happen 2023-12-05 18:03:13 +01:00
Lion Kortlepel
e245c9e9e2 fix pps monitor warning about virtual dtor 2023-12-05 18:02:35 +01:00
Lion Kortlepel
667da22b0e Merge remote-tracking branch 'origin/master' into new-buildsystem 2023-12-05 17:59:05 +01:00
Lion Kortlepel
a6eb2f7bfe switch to vcpkg+cmake, add debian build to workflows
using lionkor's template (MIT licensed)

This is a combination of 64 commits.
2023-12-05 17:57:19 +01:00
Lion Kortlepel
7f206fd0d4 bump version to 3.1.2 2023-12-03 17:49:12 +01:00
rgnter
222d2492ff Merge branch 'master' into optimize/add_cv_to_luaresult 2023-03-21 20:17:17 +01:00
Anonymous275
c51cf090ef fix linux build 2023-01-15 17:12:35 +00:00
Anonymous275
d677d8d58d rename Hash function to HashPassword
move HashPassword to cpp only
move check to line 285
2023-01-15 17:12:35 +00:00
Anonymous275
9f59c27b1f - add hash function
- add password config
- add debug messages for password stages
- add pass boolean for heartbeat
- adjust network codes
2023-01-15 17:12:35 +00:00
rgnter
b7b578bf3e add conditional variable to LuaResult 2022-12-18 14:45:33 +01:00
Lion Kortlepel
7f5b3919f4 make destructors of virtual classes virtual
this causes warnings in clang, and rightfully so :^)
2022-10-31 11:31:16 +01:00
Lion Kortlepel
a8b1a205f7 bump version to 3.1.1
I'm expecting to release a 3.1.1 with some fixes
2022-10-31 11:24:13 +01:00
Lion Kortlepel
7d1318653c fix boost::system::error_code 2022-10-15 23:16:16 +02:00
Lion Kortlepel
cc6b7846b2 add system include 2022-10-06 00:51:51 +02:00
Lion Kortlepel
231b13a0e7 fix a ghost client bug 2022-10-05 18:17:18 +02:00
Lion Kortlepel
7d2e4d4581 replace tcp networking with boost::asio tcp networking 2022-10-05 18:17:04 +02:00
Lion Kortlepel
6e97a3cd6e switch udp networking to boost implementation 2022-10-05 12:14:25 +02:00
Lion Kortlepel
5d3dff3c88 add identifiers (beammp id, ip) as an argument to onPlayerAuth 2022-10-03 15:31:32 +02:00
Lion Kortlepel
e638c25f70 change assertions to print the error in release builds
this should make it easier to debug crashes in the server remotely in
release builds when sentry is down.
2022-09-26 12:03:57 +02:00
Lion Kortlepel
24c98eb2b2 add more compile-time diagnostics, implement fixes for them
Before, a lot of common errors went unnoticed, due to insufficient
compiler diagnostics. This commit fixes this by adding a lot of new
diagnostics, and fixing the issues found by this.
2022-09-26 12:02:05 +02:00
20dka
b71aa2db04 advanced autocomplete for lua 2022-09-26 00:13:16 +02:00
Lion Kortlepel
36a1da3218 fix TServer::HandlePosition declaration
it was different from the implementation
2022-09-14 20:59:07 +02:00
20dka
a84d042a8a add error messages to some lua events 2022-09-14 12:45:40 +02:00
20dka
44b94c9e58 add MP.GetPositionRaw(pid, vid)
fix vehicles sometimes not deleting for all players
2022-09-14 01:54:49 +02:00
Lion Kortlepel
fd7b11f436 fix event loop timing issue
The event loop tries to run no faster than every 10ms. If it detects
that it goes faster, it would incorrectly calculate the difference, and
then wait (what I assume was) way too long or too short.
Either way, now it's fixed and it correctly works, even when introducing
new lua states.
2022-07-20 14:33:19 +02:00
Lion Kortlepel
51ccf31373 add beammp_debugf 2022-07-14 01:38:35 +02:00
Lion Kortlepel
a2cc629153 add onFileChanged (fixes #116) 2022-07-14 01:18:50 +02:00