Commit Graph

162 Commits

Author SHA1 Message Date
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
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
Regalis
eb2c51c2f1 Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method) 2016-10-31 20:50:20 +02:00
Regalis
5cc605bc01 Dust particles are drawn in the same batch as the background sprites (-> far-away particles are rendered behind the sprites), limiting character name length in the crew info menu, the "submarine not found in your folder" -tooltip is updated after downloading a sub file 2016-10-29 15:38:40 +03:00
Regalis
980f8e0d33 - option to select which location autopilot navigates towards
- generating "dummy locations" for the MP gamesessions (visible in sonar and mission descriptions)
- EndGame network message tells the clients if the mission was successful (because the message may arrive before the sub has reached the exit or before some character has died at the client's end)
2016-10-26 19:22:40 +03:00
Regalis
6f9160e4a7 Removing & spawning entities in the same order as the server, EntitySpawner does both removing and spawning 2016-10-26 16:44:59 +03:00
Regalis
df9f89e383 Submarine position syncing 2016-10-25 20:50:47 +03:00
Regalis
07f8c966ab Submarine position is synced using the same logic as the characters, AICharacter position syncing 2016-10-25 19:01:19 +03:00
Regalis
641e579e92 Backported animcontroller-overhaul 2016-10-22 15:18:16 +03:00
Regalis
e2d0e7fe24 Moved collider position correction logic to the physicsbody class (so that it can be used for sub & item syncing), character position msg length is written in bytes instead of bits, misc cleanup/refactoring 2016-10-19 20:49:18 +03:00
Regalis
9fed308705 InGame update messages include a timestamp which is passed to the ClientRead methods
Now only used in character position syncing, but some other entities may also have an use for it (e.g. discarding outdated data)
2016-10-18 19:04:32 +03:00
Regalis
b68eeda8a8 WIP position syncing 2016-10-17 22:34:59 +03:00
Regalis
170e1a0da8 ItemRemover -> EntityRemover, clients reset spawner & remover when starting a new round 2016-10-12 20:46:47 +03:00
Regalis
60b36e020c Changed ItemSpawner to EntitySpawner, used for syncing both item and character spawning 2016-10-12 19:25:01 +03:00
Regalis
ac3539da63 Item spawn syncing 2016-10-12 18:29:44 +03:00
juanjp600
f5268c7c6c Fixes
It compiles now, but it's probably really broken.
2016-10-11 21:37:23 -03:00
juanjp600
72033a581e Merge remote-tracking branch 'refs/remotes/barotrauma/master'
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/GUI/GUI.cs
	Subsurface/Source/GameMain.cs
	Subsurface/Source/GameSettings.cs
	Subsurface/Source/Items/CharacterInventory.cs
	Subsurface/Source/Items/Components/ItemComponent.cs
	Subsurface/Source/Items/Components/Machines/Pump.cs
	Subsurface/Source/Items/Components/Machines/Radar.cs
	Subsurface/Source/Items/Components/Machines/Steering.cs
	Subsurface/Source/Items/Components/Power/PowerContainer.cs
	Subsurface/Source/Items/Inventory.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Items/ItemSpawner.cs
	Subsurface/Source/Map/Levels/WaterRenderer.cs
	Subsurface/Source/Map/LinkedSubmarine.cs
	Subsurface/Source/Map/Map/Map.cs
	Subsurface/Source/Map/Structure.cs
	Subsurface/Source/Map/Submarine.cs
	Subsurface/Source/Map/WayPoint.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Physics/PhysicsBody.cs
	Subsurface/Source/Screens/GameScreen.cs
2016-10-11 20:19:25 -03:00
juanjp600
344947c3c4 Search and destroy mission
Featuring ugly code
2016-09-26 22:09:06 -03:00
Regalis
bc5ace4f53 Clients spawn all characters at round start (not just their own), spawnpoints that aren't inside the main sub are ignored when selecting spawnpoints for the clients 2016-09-26 20:02:23 +03:00
Regalis
c402ba208b Spawning client characters with correct characterinfo 2016-09-26 17:06:20 +03:00
juanjp600
02d98f5d29 Merge remote-tracking branch 'refs/remotes/barotrauma/master'
Conflicts:
	Subsurface/Source/Networking/FileStreamReceiver.cs
	Subsurface/Source/Networking/FileStreamSender.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Networking/GameServerLogin.cs
	Subsurface/Source/Networking/NetworkEvent.cs
	Subsurface/Source/Screens/NetLobbyScreen.cs
2016-09-24 21:28:37 -03:00
juanjp600
d537e8795a Replace '' (two single quotes) with \" (double quote)
We must correct post-traumatic Blitz disorder
2016-09-24 21:26:08 -03:00
juanjp600
44e12ffed2 Basic player input syncing
There's currently a bug where the inputs might be read out of order or more than once, which leads to desync. I'll feel really dumb when I find what's going on here.

Also, I'm using placeholder player spawning because CharacterInfo doesn't seem to be fully functional yet.
2016-09-22 21:20:46 -03:00
Regalis
4fbb83e2e7 The server can start the game 2016-09-09 19:49:13 +03:00
juanjp600
1b85dc3646 Fixed lobby chat 2016-09-08 09:43:44 -03:00
juanjp600
7c9ae5134c Move chat message serialization to the ChatMessage class 2016-09-07 21:41:59 -03:00
juanjp600
ba388ae298 Merge remote-tracking branch 'refs/remotes/barotrauma/new-netcode'
Conflicts:
	Subsurface/Source/Networking/GameServer.cs
2016-09-07 17:33:45 -03:00
juanjp600
bfd8bc6b35 Server serialization functions require client 2016-09-07 17:32:20 -03:00
Regalis
ccf6e6d544 Syncing game mode, mission type, traitor setting, level seed & autorestart 2016-09-07 19:17:31 +03:00
juanjp600
a02931054a Sync sub selection 2016-09-05 17:15:41 -03:00
juanjp600
ef2b0d8721 Whitelist + conflict resolve 2016-09-03 14:57:36 -03:00
juanjp600
e3433c725e Server name, message and submarine list syncing 2016-09-02 22:24:14 -03:00
juanjp600
e0b6642767 Minor fixes and tweaks 2016-09-01 22:22:45 -03:00
juanjp600
51dd858af1 Client reads lobby chat from server 2016-09-01 22:05:13 -03:00
juanjp600
028c3a8bc1 Added lobby chat syncing 2016-09-01 20:45:43 -03:00
juanjp600
fc457e0f18 Detect disconnect while password box is open 2016-09-01 15:43:27 -03:00
juanjp600
f845a21de8 Fixed login process
Time to get the lobby working
2016-09-01 13:45:46 -03:00