Commit Graph

17 Commits

Author SHA1 Message Date
Joonas Rikkonen
2af78d096e (8b3cd3de5) Fixed clients never removing network events the server has already received (!), don't create a new client event if there's already an identical event waiting to be sent 2019-04-11 18:23:17 +03:00
Joonas Rikkonen
27917ee376 7b471b5...483f2ad
commit 483f2ad4fd9d91b9763d25df592a899cdf39ba67
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Sun Mar 24 19:19:01 2019 +0200

    Instead of making coilgun bolts continuously deteriorate to give them a lifetime of 5 seconds, simply create a delayed status effect that removes them after 5 seconds of being launched.

commit 00b8d48d4d1d933e76a6c0d7df5320c50dc0a07d
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Sun Mar 24 19:16:40 2019 +0200

    Wait at least 0.15 seconds before creating a new condition update event for an item. Some rapidly deteriorating items (e.g. coilgun bolt, faraday artifacts) would otherwise cause new events to be created at an excessively high rate.

commit 84e6948a4898dd040b2a84eb5f1ad97c20dfc69f
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Sun Mar 24 19:14:58 2019 +0200

    Server can send multiple network event packets per update if there's too many events to fit in one packet (up to 4 packets per update).

commit 40797e91d67f965ac6d292367fef5386214abbdb
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Sun Mar 24 17:34:49 2019 +0200

    NetEntityEvent changes:
    - Don't restrict the number of events per message, but instead write as many events as the packet can fit (up to a maximum of 1024 bytes to leave some space for other types of data (event IDs, chat messages and such)).
    - Decrease the delay after which events can be resent (RTT * 1.5 -> RTT).

commit bfefbb5d7da3ce6a5fe9cb7ff733ec5df37a8a15
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Sun Mar 24 14:31:03 2019 +0200

    Fixed FixDurationLowSkill & FixDurationHighSkill parameters in Repairable being case-sensitive, causing almost none of the xml values to be used. + Moved client-specific repairable methods to the client project, and server-specific to the server project.

commit 311f67c6c6b8d2cd9f4f4ca820e42316938c4f17
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Sun Mar 24 14:09:10 2019 +0200

    Fixed "trying to add a dead character to crewmanager" errors when attempting to revive a character killed by some other affliction than internal damage, bleeding or burns. Closes #1341
2019-03-24 19:21:41 +02:00
Joonas Rikkonen
6a12058148 8a2a718...633e54b
commit 633e54b2ffb4e5ec13c1fa5ce8170f5e726f8e10
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Tue Mar 19 18:02:21 2019 +0200

    Include level equality check value in round start messages, so clients immediately know if the level generated at their end doesn't match the one generated by the server (which will cause ID mismatches and more hard-to-diagnose desync kicks during the rounds). Related to #848

commit 68e410705115ece2fcc4ca9c7d9856cc1dd5c1f8
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Tue Mar 19 18:01:01 2019 +0200

    Readded client error handling from ef9afed. Not sure how it got removed, probably a messed up merge somewhere down the line when working on the client-server-separation branch or when merging the Steam version work from dev to master. In any case this should help diagnose desync kicks such as #1293.
2019-03-19 18:03:43 +02:00
Joonas Rikkonen
6c0679c297 38f1ddb...178a853: v0.8.9.1, removed content folder 2019-03-18 20:39:27 +02:00
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
juanjp600
13dc008cb5 Client communicates event syncing errors to the server
This should help
2018-10-16 17:11:20 -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
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
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
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
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
64ad5e5003 Removed unnecessary using directives 2017-07-05 18:35:09 +03:00
juanjp600
4d225c65f2 Updated to MonoGame 3.6 + Directory refactor
- Barotrauma's projects are in the Barotrauma directory
- All libraries are in the Libraries directory
- MonoGame is now managed by NuGet, rather than referenced from the installed files (TODO: consider using PCL for easier cross-platform development?)
- NuGet libraries are not included in the repo, as getting the latest versions automatically should be preferred
- Removed Content/effects.mgfx as it didn't seem to be used anywhere
- Removed some references to Subsurface directory
- Renamed Launcher2 to Launcher
2017-06-27 09:52:57 -03:00