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
8c659e2a08
Server checks if midround syncing is needed when a client is in the game (i.e. loaded the sub, etc), not when the client requests the start message. Some clients take longer to start the round than others, and they may miss unique messages even if they were in the lobby when the round started.
...
Clients also get extra 10 seconds to receive newly created events after the midround syncing is done
2017-03-13 21:50:01 +02:00
Regalis
9e3d51edf4
ServerEntityEventManager doesn't prevent creating a duplicate event if the previous one has already been sent to someone, handling exceptions in WriteEvent
2017-03-11 15:39:11 +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
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
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
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
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
502211c6a7
Resetting entity event IDs (lastSentToAll & client-specific IDs) when a round ends
2017-02-20 20:26:12 +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
4589c2bcfb
Syncing changes to ingame editable item properties (light colors etc)
2017-01-27 18:28:07 +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
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
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
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
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
020aac55ea
AICharacter position syncing
2016-12-29 22:01:50 +02:00
Regalis
3411448ae8
Submarine position syncing improvements
2016-12-10 19:53:35 +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
9192dad6ea
EntityEventManagers wait for 1.5*roundtriptime before resending messages (less unnecessary resends), skipping to the next event in a packet if an exception is thrown while reading an event
2016-12-09 20:00:41 +02:00
Regalis
bea523187b
The host can send chat messages, fixed client not being passed to ServerRead methods
2016-12-09 16:45:08 +02:00
Regalis
e4744e8385
Resetting EventManager IDs when ending the round, NaN/INF check when setting camera position
2016-11-24 20:48:20 +02:00
Regalis
0c9a55e9e0
- server doesn't create a new EntityEvent if there's a duplicate event waiting to be sent
...
- hull, radar, steering & pump syncing
2016-11-14 16:58:21 +02: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
724172fe7c
Server doesn't attempt to resend unacked EntityEvents until Connection.AverageRoundTripTime has passed
2016-11-13 14:45:00 +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
Regalis
c314b37029
Some classes for syncing entity state changes. Similar to the NetworkEvents in the old netcode, but the logic is split into separate classes which prevent the server from reading updates for entities that aren't IClientSerializable.
...
todo: add NetEntityEventManagers to server & client, some logic to prevent sending events that don't need to be sent (e.g. duplicate event state updates)
2016-11-12 20:56:06 +02:00