Commit Graph

87 Commits

Author SHA1 Message Date
Joonas Rikkonen
224e9238db EntityEvents are written and sent even if the entity has been removed at the time of writing. Otherwise the clients may not receive some important events, e.g. when an item applies a statuseffect to something or triggers an explosion and is removed immediately afterwards. I'm not 100% confident that this won't cause any additional issues, so it still needs more testing. See #839 2018-10-29 20:38:10 +02:00
Joonas Rikkonen
9d92b696f0 Fixed clients getting kicked if they receive an entity event that's more recent than the one they're expecting. This happens often even when there's no actual error, for example if the client happens to receive messages in an incorrect order (the messages are sent using the Unreliable delivery method). Instead of getting themselves kicked, the clients should just ignore the event and wait until they receive the correct one. 2018-10-28 21:12:30 +02:00
Joonas Rikkonen
ef9afedf42 Added a level equality check to client error handling to make it easier to diagnose bugs like #848 in the future. 2018-10-18 00:18:57 +03:00
Joonas Rikkonen
9f7fbb0cbe Fixed client error reporting 2018-10-17 23:48:00 +03:00
juanjp600
13dc008cb5 Client communicates event syncing errors to the server
This should help
2018-10-16 17:11:20 -03:00
itchyOwl
5d2a193471 Line endings. 2018-09-03 10:23:36 +03:00
Joonas Rikkonen
565f14801b Normalized line endings to CRLF 2018-09-02 19:25:48 +03:00
Joonas Rikkonen
6cb2a7260c Clients dispose fileTransfers when shutting down (otherwise the files will stay open and cause "used by another process" exceptions when attempting to receive them again) 2018-08-21 16:43:05 +03:00
Joonas Rikkonen
0dca8bc940 Clients can be given access to server logs. Closes #366 2018-08-15 12:57:46 +03:00
Joonas Rikkonen
4866a89253 Servers can disable the disguise feature. Closes #568 2018-08-14 16:06:23 +03:00
Joonas Rikkonen
bcd44f79e9 Merge branch 'level-mirroring' 2018-08-08 15:30:41 +03:00
Joonas Rikkonen
5100956bae Levels are mirrored when traveling backwards through a connection in the campaign mode. Closes #519 2018-08-08 15:30:32 +03:00
Joonas Rikkonen
e60ebc1930 Handling and logging exceptions thrown by ItemComponent constructors, added stack traces to a couple of error messages 2018-08-06 14:53:28 +03:00
Joonas Rikkonen
af3fa80011 Clients only include the last 20 console messages in the "invalid object header" error messages, and the console messages are not displayed in the console itself. Closes #569 2018-08-06 12:32:00 +03:00
Joonas Rikkonen
60a563fe75 EntityEvent fixes:
- Clients wait for midround syncing to finish before applying the remote state to connection panels and inventories (because the wires connected to the connection panel or items in the inventory may not exist before the EntitySpawner events have been received).
- Server writes 0 as the projectile ID if the projectile doesn't exist anymore when a Turret event is sent.
- More info in networkevent error messages.
2018-07-30 13:35:26 +03:00
Joonas Rikkonen
6209f48fff More error logging to diagnose invalid header errors 2018-07-27 16:11:19 +03:00
Joonas Rikkonen
40f4e94613 Fixed incorrect debug info when receiving a message with an invalid object header. The method wrote the bytes/bits read SINCE the previous object (= just one byte, the invalid object header) instead of what was read in the previous object. The error message also ignored empty entity events. 2018-07-25 17:00:31 +03:00
Joonas Rikkonen
be5f168b76 Sending error messages during EntityEvent writing/reading and entity removal to GameAnalytics 2018-07-23 21:16:57 +03:00
Nilanth Animosus
5177c5b1eb Fixed clients being unable to see vote counts
The clients would check their saved submarines instead of the submarines the server had when receiving the vote count.
2018-07-21 18:38:27 +01:00
Joonas Rikkonen
f1c4bd3c67 - Some of the non-game-crashing error messages are sent to GameAnalytics.
- Changed crash severity from Error to Critical.
- Exception handling when loading submarine preview images.
- Checking if position is valid in Ragdoll.SetPosition.
2018-07-19 22:12:50 +03:00
Joonas Rikkonen
c901b75ff1 Fixed round ending tickbox not being visible client-side if the client is not controlling character (despite servers now allowing votes from players who've spawned at least once during the round). Closes #500 2018-07-19 10:47:39 +03:00
Joonas Rikkonen
568cf1a02f Fixed memory leak caused by submarine preview images, changed Submarine.SavedSubmarines to a property that prevents removing submarines from outside the class without disposing the preview image. Closes #498 2018-07-18 14:23:43 +03:00
Joonas Rikkonen
b61898b16f Fixed clients assigning a wrong name to submarines with dots in their name (e.g. Sub Mk.Iv), because the part after the dots was considered a file extension and stripped out in the submarine constructor. Closes #472 2018-07-16 21:09:01 +03:00
Joonas Rikkonen
734b86bfba Fixed clients being unable to give non-permanent or range bans. Closes #481 2018-07-16 11:24:24 +03:00
Joonas Rikkonen
f931d81aed Mission refactoring (mission prefabs) and option to select which types of missions can be selected when mission type is set to random (TODO: a way to set the allowed types from the UI). 2018-05-17 23:45:29 +03:00
Joonas Rikkonen
8c4531188b Fixed scrollable area of GUIListBoxes not changing when children are hidden (e.g. when filtering messages in the server log), fixed new log messages appearing in the server log even if the type of message has been filtered out. 2018-04-09 17:31:03 +03:00
itchyOwl
b599206294 Add a GUI slider for setting the auto ban duration. Define the max auto ban length in the server settings. (Issue #128) 2018-03-27 11:29:36 +03:00
Joonas Rikkonen
10ce4bd20d Fixed messageboxes opened by the mp campaign setup UI not being shown until the UI is closed (e.g. shuttle & incompatible content package warnings), renamed MultiplayerCampaign -> MultiPlayerCampaign for consistency. See #315 2018-03-06 16:43:36 +02:00
Joonas Rikkonen
08ade1dc6f Fixed clients not being notified when a campaign is exited and a new one started, causing them to think they still have up-to-date save files for the new campaign and get kicked out due to desync as soon as a round starts. (See #315) 2018-03-06 14:18:37 +02:00
Joonas Rikkonen
cd6fc87eb4 Fixed object header issues and "trying to read past the buffer size" errors caused by NetEntityEvents for removed entities.
EntityEventManager sends an empty event with an ID of 0 if the entity doesn't exist anymore when writing the event. The recipient should simply skip over these messages and read the next one, but clients only did so if the event is the next unreceived one, causing the rest of the messages to be read incorrectly (which could lead to various sorts of problems in addition to the header and buffer size errors). The server didn't deal with the empty events correctly either, it increased the last received ID even if the received event was not the one the server is waiting for, potentially causing other non-empty events to be ignored.

+ Added an error message if the size of an NetEntityEvent is larger than 255 bytes. Not only is that excessively large for an event, but the length of the event is written as a byte and larger ones may again cause messages to be read incorrectly. Most events should be nowhere near 255 bytes, but now that the descriptions and tags of a spawned item are included in the item spawn messages there's the possibility that some events are too large.
2018-03-01 19:30:27 +02:00
Joonas Rikkonen
77940fa992 Added some debug logging, Character.Revive removes the existing AITarget from the character before creating a new one 2018-02-26 18:05:03 +02:00
Joonas Rikkonen
1c68d5a4d7 - Fixed clients using character directories to count the number of disallowed monsters, which made it possible for them to disallow incorrect monsters.
- Fixed MonsterEvent checking if the name of the character directory contains the name of the disallowed character directory, which could for example cause them to disallow "someMonsterAlt" if "someMonster" is disallowed.
2018-02-26 16:53:22 +02:00
Joonas Rikkonen
83c02504ea Fixed clients failing to select a received submarine/shuttle file, preventing them from starting a round until they rejoin the server. Closes #271 2018-02-22 14:18:06 +02:00
Joonas Rikkonen
6e231b7e7d Lighting is forced back on when a client starts a round (-> can't disable lighting by using the console command before joining a server). Closes #238 2018-01-28 19:15:23 +02:00
Joonas Rikkonen
ad18eb0db0 Fixed vote count text overlapping with the submarine preview button in NetLobbyScreen 2018-01-26 10:36:34 +02:00
Joonas Rikkonen
8544dea9db Fixed clients being able to votekick/kick/ban themselves in the server lobby. 2018-01-16 17:39:20 +02:00
Joonas Rikkonen
633bd85e27 Fixed clients keeping a reference to the currently running GameSession after being kicked out of the server, causing an error if they rejoin and stay in the lobby while the server ends the round (because the gamesession attempts to generate a RoundSummary even though all subs have been unloaded). Closes #87 2018-01-16 17:23:52 +02:00
Joonas Rikkonen
0f7befa09e Fixed occasional invalid object header errors when attempting to send a status NetworkEvent for a character (easy way to reproduce was to kill multiple characters during the same frame with an explosion). 2018-01-16 17:02:01 +02:00
Joonas Rikkonen
466e6f8833 Fixed client-side null exception when the client is in the lobby and a round ends with the mission successfully completed 2018-01-11 18:56:45 +02:00
Joonas Rikkonen
bd1cd15dd4 Added votekick button to the server lobby. Closes #190 2018-01-10 20:43:31 +02:00
Joonas Rikkonen
9f58d1b74d Cargo items can be set to spawn inside specific types of containers instead of being scattered on the cargo room floor. 2018-01-10 15:56:11 +02:00
Joonas Rikkonen
f9500fa6e1 Fixed monster spawn & extra cargo settings being impossible to select due to the menus being outside of their parent GUIComponent 2018-01-10 14:21:37 +02:00
Joonas Rikkonen
662ead0bb4 ToggleHUD console command hides the mp chat box. Closes #208 2018-01-09 11:19:21 +02:00
Joonas Rikkonen
3d73f28362 - TextManager automatically replaces "\n" strings with a newline.
- Removed instantiating traitor start popup from client-side TraitorManager (instead the client receives the start message from the server).
- GUIMessageBoxes don't leave unnecessary empty space for the header if the header text is empty.
- More hard-coded text removal.
2017-12-27 16:07:00 +02:00
juanjp600
064c8da7e7 Unknown object headers will now crash the game with a copy of the previous object to be read 2017-12-21 20:26:33 -03:00
Joonas Rikkonen
9ed2871ede Renamed a couple of properties for consistency & removed unnecessary CPR blood particle scaling 2017-12-20 20:26:22 +02:00
Joonas Rikkonen
dde320b387 Merge pull request #101 from Crystalwarrior/moRags
Body shoulder-grab, better CPR anims, CPR and Crit overhaul!
2017-12-20 19:37:38 +02:00
Joonas Rikkonen
ce37411a29 Merge branch 'permission-overhaul'. Closes #49
Conflicts:
	Barotrauma/BarotraumaShared/Source/DebugConsole.cs
	Barotrauma/BarotraumaShared/Source/Networking/ChatMessage.cs
2017-12-20 19:36:17 +02:00
Joonas Rikkonen
b3c3970209 Server responses to clients using console commands ("granted permissions to client", error messages, etc) are displayed in the client's debug console instead of the chat box. Client command usage is included in server logs. 2017-12-20 19:18:32 +02:00
Alex Noir
07aeac4fdc Traitor Count/Coefficient and Ragdoll and Karma server settings buttons!!! oh my GOD!!! 2017-12-09 19:09:10 +03:00