Commit Graph

381 Commits

Author SHA1 Message Date
Regalis
5bdb57b98a Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Characters/AICharacter.cs
	Subsurface/Source/Characters/Animation/HumanoidAnimController.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/GameMain.cs
	Subsurface/Source/Items/Components/Signal/Connection.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Networking/GameServerLogin.cs
	Subsurface/Source/Physics/PhysicsBody.cs
2017-03-11 13:24:09 +02:00
Regalis
c851770386 Fixed "trying to read past the buffer size" errors caused by item updates sent by clients, midround syncing timeout period is calculated based on the number of events the client needs to receive 2017-03-11 12:49:08 +02:00
Regalis
a1342fdc45 Server-side file transfer UI, server notifies the recipient of a file transfer if the transfer is cancelled, fixed TextGetter not working on wrapped GUITextBlocks 2017-03-10 19:16:17 +02:00
Regalis
6a31d56175 Fixed mid-round joining clients automatically getting kicked out because they're missing old events
Now they're kicked out if they're not in sync within 10 seconds of joining, TODO: calculate a reasonable timeout based on the amount of events and/or give the client more time if they keep receiving events
2017-03-09 21:40:58 +02:00
Regalis
c956e7aa7f Fixed one missed UInt32 -> Uint16 conversion in ServerEntityEventManager 2017-03-09 21:35:02 +02:00
Regalis
e406b76cd5 Some more logic to handle missing sub files and active file transfers when starting a round:
- server waits for transfers to finish before starting the round (up to a max 20 seconds, can be skipped by the host)
- clients enable the spectate button when the round starts (in case they fail to start the round due to a missing sub file or an error)
- clients notify the server if a transfer is cancelled

+ FileReceivers can't be instantiated if a server is running
2017-03-09 19:56:27 +02:00
Regalis
ca402396a0 Client-side file transfer UI, FileSender has a limit on how many transfers can be active simultaneously (todo: queue transfers?), some extra debug logging & small fixes 2017-03-08 22:56:11 +02:00
Regalis
64e866d771 Fixed an off-by-two error in entityspawner 2017-03-07 23:02:33 +02:00
Regalis
6bae2cf47b File transfers (somewhat) working. Todo: testing, show active transfers in the UI 2017-03-07 23:01:01 +02:00
Regalis
5450ff498a Progress on file transfers (class for receiving files, FileSender can transfer multiple files to the same recipient simultaneously) 2017-03-07 20:03:40 +02:00
juanjp600
d6c292a2cc SharpFont + ScalableFont implementation
https://github.com/Robmaister/SharpFont

TODO: replace Code Bold.otf with the full version, fix any bugs, build on Linux, possibly move ToolBox string wrapping and limiting logic to ScalableFont class for better results.
2017-03-07 13:44:42 -03:00
juanjp600
11b7903d4a Fixed some ServerEntityEventManager ID comparisons
I'm probably still missing some comparisons.
2017-03-06 16:31:51 -03:00
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
Regalis
c96fcf7f34 Clients can't use headsets that are in the inventory 2017-03-03 20:31:07 +02:00
juanjp600
ee16f0708b -try-catch blocks for GUIComponents fixedChildren lists
-player name and IP address in debug messages
-crash logs now output up to 15 messages
2017-03-03 15:14:18 -03:00
juanjp600
ba026a8f88 Added list of homoglyphs for name comparison
Unicode is now allowed in player names, but it can't be easily exploited anymore
2017-03-02 12:09:08 -03:00
Regalis
65625777e5 Monster syncing fixes:
- clients freeze and disable AI characters if no updates have been received in a while (due to the monster being far away from player-controlled characters at the servers side for example)
- server disables AI characters that are too far for updates to be sent to clients (-> targets of monster missions can't swim away from the spawnpos and cause the clients' sonars to point to an incorrect position)
2017-03-01 23:14:15 +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
27a883349c Server keeps a reference to the StartGame coroutine and checks if it has stopped running before the round has started, and if so, resets autorestart timer and start button (i.e. an exception at any point during startup will trigger the reset) 2017-02-27 21:30:39 +02:00
Regalis
12466e304e Fixed server failing to start a round if there's a selected cargo spawnpoint is not inside a hull 2017-02-25 15:03:10 +02: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