Regalis
70e862e92f
- both clients and server limit the number of chat messages written per packet
...
- added an error message if MTU is exceeded
- if the server disconnects a client while reading a message from them, the rest of the message is ignored
2017-06-01 22:07:01 +03:00
Regalis
c40c3a1a98
Clients don't modify the colors of the texts in the netlobby sub list, only their alpha
2017-05-25 18:27:47 +03:00
Regalis
53bfbb3ea7
Fixed stack overflow when attempting to cancel a file transfer client-side
2017-05-20 15:35:55 +03:00
Regalis
e3b595b9e0
Cleanup (removing unused variables & other redundancies, rethrowing exceptions instead of wrapping them in a new exception instance)
2017-05-20 15:35:13 +03:00
Regalis
9c1a76707f
conflict fix
2017-05-17 18:56:45 +03:00
Regalis
3e5f8a43a0
Merge branch 'master' into new-netcode
...
Conflicts:
Subsurface/Source/GUI/GUIButton.cs
Subsurface/Source/GameSession/CrewManager.cs
Subsurface/Source/GameSession/GameSession.cs
Subsurface/Source/Items/Item.cs
Subsurface/Source/Networking/GameServer.cs
Subsurface/Source/Screens/MainMenuScreen.cs
Subsurface/Source/Screens/ServerListScreen.cs
2017-04-24 19:10:51 +03:00
Regalis
df7daa5925
Fixed incorrectly positioned character info boxes in the info menu
2017-04-24 19:08:25 +03:00
Regalis
31f7eca717
Merge branch 'master' into new-netcode
...
Conflicts:
Subsurface/Source/GUI/GUIButton.cs
Subsurface/Source/GameSession/CrewManager.cs
Subsurface/Source/GameSession/GameSession.cs
Subsurface/Source/Items/Item.cs
Subsurface/Source/Networking/GameServer.cs
Subsurface/Source/Screens/MainMenuScreen.cs
Subsurface/Source/Screens/ServerListScreen.cs
2017-04-23 21:40:11 +03:00
Regalis
f4c01f68ed
Fixed incorrectly length in character position updates (1 bit off), clients read pad bits in position updates
2017-04-12 23:44:58 +03:00
Regalis
0301457a8f
A fix to occasional "unknown object header" errors.
...
If an entity had been removed and it's ID taken by some other entity, clients who hadn't received a message about the removal and the new entity would end up reading ENTITY_POSITION messages for the new entity incorrectly. Reading an incorrect number of bits from the message would also prevent the clients from reading the rest of the data in the packet properly.
Now the server doesn't send position updates to clients during midround syncing (because there's no guarantee they know about the entity yet). Clients also force the read position to the correct place after reading a position update in case something goes wrong when reading the msg.
2017-04-09 19:04:49 +03:00
Regalis
3844dd9dac
GUIStyle logic changes: instead of having a predetermined GUIComponentStyle for each type of GUIComponent, any GUIComponent can use any style. The GUIComponent constructors take the name of the style as a parameter, and if no style is specified, the default style for the GUIComponent in question will be used.
2017-04-08 16:46:53 +03:00
juanjp600
e1d5d63dbd
Sync monster spawn settings
2017-04-06 16:50:11 -03:00
juanjp600
4ad373294c
Update client.UnreceivedEntityEventCount on every event write
...
I noticed that if the main event IDs went over 10000 and there were more than 450 unique events, the server would sometimes skip the next event the client needed. Sometimes the client would also not realize that the last event it received was the final init event, so it would reject all further events because of a huge ID discrepancy. The init events will likely need to be reworked, but updating UnreceivedEntityEventCount seems to help somewhat.
2017-04-06 12:37:38 -03:00
Regalis
b1ef7ffd05
Replaced excessively paranoid filename validation regex in FileReceiver with Path.GetInvalidFileNameChars, server is notified if a client cancels a file transfer for whatever reason
2017-04-05 23:20:20 +03:00
Regalis
5bdd801da4
Having multiple sub files with the same name doesn't prevent clients from selecting or requesting the correct one
2017-03-28 21:01:44 +03:00
Regalis
1a3c18c727
EntitySpawner sends spawn/removal messages to clients using EntityEvents.
...
EntityEvents and EntitySpawner used to work independently of each other, with separate IDs, and there was no guarantee that spawning and events would happen in the correct order. For example, a client could fail to read events during midround syncing because the entity has been removed, or read an event for an incorrect entity because the entity has been removed and the ID taken by some other entity.
2017-03-27 21:05:32 +03:00
Regalis
ccc09560a1
Fixed another off-by-one error in EntitySpawner ID comparisons, clients reset their ChatMessage ID when (re)connecting to the server
2017-03-24 17:56:56 +02:00
Regalis
2c688f40e3
Syncing RespawnManager state with clients
2017-03-20 20:44:20 +02:00
Regalis
8d8620047d
Fixed clients who leave a server and re-join becoming desynced and not being kicked by the server.
...
The clients didn't reset their ChatMessage.LastID, which caused an exception to be thrown when clamping the chatmsg ID server-side, preventing the server from updating the lastRecvEntityEventID of the client later in the method. The server wouldn't kick the client, because ServerEntityEventManager wouldn't handle cases where a client is waiting for an event that doesn't exist anymore.
2017-03-14 22:43:15 +02:00
Regalis
2d7d7f3d8d
Fixed turret syncing, clients don't get a notification about changed permissions if they're assigned the same permissions they already have
2017-03-13 20:52:31 +02:00
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
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
6bae2cf47b
File transfers (somewhat) working. Todo: testing, show active transfers in the UI
2017-03-07 23:01:01 +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
ecb7500df9
Converted UInt32 ID's to UInt16
...
TODO: test everything, make sure nothing broke
2017-03-06 16:25:12 -03:00
juanjp600
7935ecce46
- fixed crash in UpdateVoteStatus
...
- fixed clients reconnecting automatically after being kicked for desync
2017-03-01 17:04:51 -03: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
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
89e881cb57
Readded voting (submarine, mode, end round & kick)
2017-02-04 18:30:40 +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
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
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
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
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
5d83a33876
Notifying clients when the round ends
2017-01-06 19:06:11 +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
1f454d593e
Inventory syncing, objHeader is passed to the ClientRead/ServerRead methods so they can determine how to read the msg (is it an inventory update, position, input, etc)
2016-12-10 16:39:58 +02:00
Regalis
adde3461ea
Merge branch 'master' into new-netcode
...
Conflicts:
Subsurface/Properties/AssemblyInfo.cs
Subsurface/Source/Characters/Animation/HumanoidAnimController.cs
Subsurface/Source/Characters/Character.cs
Subsurface/Source/Items/Components/Door.cs
Subsurface/Source/Items/Components/Power/PowerContainer.cs
Subsurface/Source/Items/Components/Signal/Wire.cs
Subsurface/Source/Items/Item.cs
Subsurface/Source/Networking/ChatMessage.cs
Subsurface/Source/Networking/GameClient.cs
Subsurface/Source/Networking/GameServer.cs
Subsurface/Source/Networking/GameServerLogin.cs
Subsurface/Source/Networking/GameServerSettings.cs
Subsurface/Source/Networking/NetworkMember.cs
2016-11-24 19:52:40 +02:00
Regalis
c3b84ca835
Re-enabled client permission settings in NetLobbyScreen, fixed clients not setting their permissions when receiving PacketTypes.Permissions
2016-11-21 17:46:03 +02:00
Regalis
4cef011131
Hull volume helper is hidden when no hulls are selected, using the HasPermission method for consistency
2016-11-21 16:55:56 +02:00
juanjp600
ba7fcad8f2
Readded special client permissions
...
Also added a command that requires a password to gain the permissions.
I think they were never vulnerable in the first place, gamerfood was just trying to intimidate us.
2016-11-20 22:01:37 -03:00
juanjp600
7a3bce3973
Hull volume helper in editor + Character name matches client name + Better-looking Watcher light source
...
Also '' is a thing of the past, use \" instead
2016-11-20 18:47:22 -03:00
Regalis
3d234aef73
Sending NetEntityEvents from client to server, ItemComponent class doesn't implement the INetSerializable interfaces (only the derived classes do), reactor syncing
2016-11-13 19:34:23 +02:00
Regalis
498c72c64a
Server sends ServerEntityEvents to clients, NetEntityEvents can contain an object array which will be passed to the serializable entity (now only used for ItemComponent indices)
2016-11-13 13:56:48 +02:00