Commit Graph

363 Commits

Author SHA1 Message Date
juanjp600
29d06bbfc8 Fix build errors 2017-03-06 16:26:52 -03:00
juanjp600
00aa9aecb1 Merge branch 'new-netcode' of https://gitlab.com/poe.regalis/barotrauma into new-netcode 2017-03-06 16:25:29 -03:00
juanjp600
ecb7500df9 Converted UInt32 ID's to UInt16
TODO: test everything, make sure nothing broke
2017-03-06 16:25:12 -03:00
Regalis
cf859eee7c WIP file transfer logic 2017-03-06 20:31:24 +02:00
juanjp600
7935ecce46 - fixed crash in UpdateVoteStatus
- fixed clients reconnecting automatically after being kicked for desync
2017-03-01 17:04:51 -03:00
juanjp600
983ab9c05b Fixed potential null exception 2017-03-01 16:42:12 -03:00
juanjp600
e681a2d29a Clients that are waiting for very old events are kicked 2017-03-01 16:40:07 -03:00
Regalis
3fcaff0288 Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
2017-02-22 23:33:14 +02:00
Regalis
d7aba531d7 Server port included in refresh and remove requests to master server, spectators see indicators for both subs during combat missions 2017-02-21 20:57:04 +02:00
juanjp600
6f821874a1 Fixed Scorpion + Fixed chat when controlling monsters + Shameless plug ;) 2017-02-21 13:58:30 -03:00
Regalis
502211c6a7 Resetting entity event IDs (lastSentToAll & client-specific IDs) when a round ends 2017-02-20 20:26:12 +02:00
Regalis
04f86865f7 Changed GUIMessageBox.MessageBoxes from a queue to a list to make it easier to remove messageboxes that aren't currently visible, fixed clients creating multiple "permissions changed" messageboxes if there's another messagebox on the screen 2017-02-18 15:58:46 +02:00
Regalis
6c8f5b8999 The server maintains a list of unique EntityEvents created during the round and sends them to clients who join mid-round 2017-02-18 15:09:13 +02:00
Regalis
0e66f2a69c Fixed exceptions in ServerEntityEventManager if there are no clients on the server, clients who are in the lobby can't prevent outdated EntityEvents from being removed 2017-02-18 13:18:48 +02:00
juanjp600
c46856167c Stopped server events that hadn't been sent to everyone from being removed 2017-02-16 20:34:29 -03:00
juanjp600
ae67be1775 Removing "sent" duplicates when a new event is added 2017-02-15 13:48:13 -03:00
Regalis
52bf73722f ServerEntityEventManager doesn't process received events until the character inputs of the client for the corresponding frame have been processed (fixes character movement lagging behind EntityEvents at the servers side)
+ split character networking logic into a separate file, characters drop items at the position of their collider instead of hands
2017-02-09 23:09:42 +02:00
Regalis
d46207916f Server doesn't send character position updates to far-away clients, clients disable characters if they haven't received position updates in a while 2017-02-07 18:59:25 +02:00
Regalis
b98ebe6e21 Readded client permissions 2017-02-06 21:07:24 +02:00
Regalis
4b8d1054b1 Changed lobby & chatMsg IDs to from uint to ushort, added a utility class that handles the wrap around of IDs 2017-02-05 22:55:19 +02:00
Regalis
9bda79036a - server doesn't send the STARTGAME message to all clients when someone joins mid-round
- team ID is included in character spawn messages even if no-one is controlling the character anymore
- living characters are taken into account when assigning jobs for respawned characters (e.g. there can't be two captains alive at the same time)
2017-02-05 21:58:31 +02:00
Regalis
89e881cb57 Readded voting (submarine, mode, end round & kick) 2017-02-04 18:30:40 +02:00
Regalis
b5bac67c4a WIP item position syncing 2017-02-02 20:40:58 +02:00
Regalis
05c5880269 Displaying the names of the connected players in the server lobby 2017-02-01 18:10:48 +02:00
Regalis
0cd2d7a0b9 Readded traitors 2017-01-30 19:49:13 +02:00
Regalis
4589c2bcfb Syncing changes to ingame editable item properties (light colors etc) 2017-01-27 18:28:07 +02:00
Regalis
e27fa1c7ee Readded team assignment logic 2017-01-15 20:39:06 +02:00
Regalis
b0231105a2 Reimplemented private chat messages 2017-01-15 17:49:31 +02:00
Regalis
8f50cca026 Syncing StatusEffects applied by meleeweapons or using an item on self 2017-01-15 14:49:15 +02:00
Regalis
f7ac98ab5f Broken items can be repaired, fixed clients never removing firesources (causing the lights to stay after the flames have been extinguished) 2017-01-14 20:30:46 +02:00
Regalis
bd7766d3e7 Server clears EntityEventManager before starting a new round, not just when ending it (fixes events breaking during the next round if an item created an event when unloading the previous sub) + some additional error checks 2017-01-14 20:26:41 +02:00
Regalis
6252db7928 - fixed server validating its own name instead of the name of a client who's logging in
- clients automatically reconnect to the server when the connection is lost and return back to server list if they fail to reconnect
- showing the error msg as a GUIMessageBox and returning to main menu if starting a server fails
2017-01-14 16:57:47 +02:00
Regalis
9b03b2bcc1 Server ignores UPDATE_INGAME messages if the game isn't running, server doesn't set any of the clients' lastRecvIDs above the ID of the latest chatMsg/event/etc (clients can't have received something the server hasn't sent yet) 2017-01-13 18:07:00 +02:00
Regalis
08053bec85 Clients can join the game mid-round 2017-01-12 20:42:15 +02:00
Regalis
ed675dc75e Lobby update ID isn't included in ingame update messages, resetting lastRecvGeneralUpdate in InitClientSync 2017-01-11 23:37:30 +02:00
Regalis
037bd09c2c - clients ignore lobby updates if they already received a more up-to-date one
- server tells clients their ID in the first lobby update
- clients take control of a spawned character if their ID matches the ownerID of the character (-> respawning works now)
2017-01-11 21:31:19 +02:00
Regalis
b9006983e4 Item condition syncing 2017-01-11 18:01:07 +02:00
Regalis
3041138f03 Inventory.TryPutItem doesn't put an item in the inventory (or create a NetEntityEvent) if the item is already in it 2017-01-10 20:50:31 +02:00
Regalis
df59f0d089 Fixed speech bubbles, server sends the ID of a speaking character instead of the name 2017-01-10 18:40:12 +02:00
Regalis
ff96f152ce Resetting EntityEvent & EntitySpawner IDs when starting a new round, LOS effect is enabled when a client takes control of a character 2017-01-09 18:22:37 +02:00
Regalis
05cb5989dc Chat range also affects the server host if they're controlling a character, fixed missing sender names in the server lobby 2017-01-07 20:24:01 +02:00
Regalis
402c745fc3 Reimplemented chat range & radio messages. Each client now has their own chatMsgQueue, so all chat messages don't have to be sent to all clients. 2017-01-07 19:22:48 +02:00
Regalis
44cbd0d9bf Fixed AI characters constantly flipping over the X-axis when inside, fixed clients not receiving a msg about characters spawned by RespawnManager 2017-01-07 16:51:51 +02:00
Regalis
5d83a33876 Notifying clients when the round ends 2017-01-06 19:06:11 +02:00
Regalis
65d64af041 Server reads CHARACTER_INPUT messages even if the client isn't allowed to move (but ignores the inputs), otherwise it would fail to read the rest of the packet 2017-01-06 18:19:51 +02:00
Regalis
518eea746e Transforming in-sub MemPos/MemLocalPos coordinates to outside coordinates if the character is outside and vice versa, server doesn't start sending ingame updates until they receive the first ingame update message from the client (no need to send updates while the client is loading or if they fail to start the round) 2017-01-05 18:16:58 +02:00
Regalis
1eea373117 NetEntityEvent fixes:
- comparing event data equality with Object.Equals instead of == because == returns false for boxed value types
- fixed old unacked messages not being resent if there are newer unacked messages that have been resent less than 1.5 * RTT ago
2017-01-03 20:10:03 +02:00
Regalis
c318e629ff Health, bleeding, oxygen & stun syncing, sending aim and use inputs and cursor positions to clients so other players will be able to see when someone is shooting, hitting with a wrench etc 2017-01-02 22:12:50 +02:00
Regalis
1f07b18e5b Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Items/Components/DockingPort.cs
	Subsurface/Source/Items/Components/Signal/Wire.cs
	Subsurface/Source/Items/Item.cs
2016-12-29 22:18:27 +02:00
Regalis
020aac55ea AICharacter position syncing 2016-12-29 22:01:50 +02:00