Commit Graph

15 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
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
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 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 817bd4b588 start fixing mod download 2022-06-28 03:20:42 +02:00
Lion Kortlepel 0acbb70d10 add ip to identifiers, changed value format 2021-08-02 14:01:01 +02:00
Lion Kortlepel a85ce18589 Implement possible ghost player fix
coauthor @Anonymous-275
2021-04-04 01:44:40 +02:00
Anonymous-275 e7ae71513c moved an if block again feeling good 2021-03-31 01:39:50 +03:00
Lion Kortlepel fc201efa4b possibly fix some issues with not disconnecting disconnected players 2021-03-30 17:04:40 +02: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