Commit Graph

21 Commits

Author SHA1 Message Date
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 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 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 7d2e4d4581 replace tcp networking with boost::asio tcp networking 2022-10-05 18:17:04 +02:00
Lion Kortlepel 36a1da3218 fix TServer::HandlePosition declaration
it was different from the implementation
2022-09-14 20:59:07 +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 265dd710cf add status command 2021-12-02 01:25:17 +01:00
Lion Kortlepel eae27633db Add commandline arguments, implement --config, --version, --help 2021-11-26 19:04:21 +01:00
Lion Kortlepel 7079e80b71 Lua: Remove leading space in onChatMessage (fix #35) 2021-11-19 12:43:27 +01:00
Lion Kortlepel fdc205f521 Add ScopedTimer, Remove some comments 2021-10-31 01:27:21 +02:00
Anonymous-275 15f7a6ba85 Unicycle edit check 2021-03-31 19:49:52 +03:00
Anonymous-275 08660d83dc Unicycle bypass vehicle limit 2021-03-31 19:18:32 +03:00
Anonymous-275 f323d50e34 Decreased the scope of read mutex 2021-03-31 00:05:05 +03:00
Lion Kortlepel 40cae31885 Merge TUDPServer and TTCPServer into TNetwork
this gets rid of a bunch of unclear cases which I mistakenly created
while refactoring for this rewrite. One example is having to call into
TTCPServer to do UDP sending in some cases.
2021-03-18 23:44:14 +02:00
Anonymous275 9b1bf071a8 Fixed lua crash caused by lion with optimizations 2021-03-18 23:44:14 +02:00
Lion Kortlepel bca4b3f140 fix client insert/create issue 2021-03-18 23:44:14 +02:00
Lion Kortlepel d360403c56 finish rewrite, builds fully 2021-03-18 23:44:14 +02:00
Lion Kortlepel 4cda6e8bc3 fully implement lua 2021-03-18 23:44:14 +02:00
Lion Kortlepel 459814a6ec add lua engine, lua file, server, client, vehicle data, other stuff 2021-03-18 23:44:14 +02:00