Commit Graph

141 Commits

Author SHA1 Message Date
Regalis
df9f89e383 Submarine position syncing 2016-10-25 20:50:47 +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
juanjp600
104ac73b97 Added login process to client
Doesn't work yet, gotta figure this out.
2016-09-01 11:42:21 -03:00
juanjp600
b9a246ca68 New login process + a little bit of cleanup
No reliability required :) Will get to the client soon
2016-08-31 18:26:17 -03:00
juanjp600
55a2db7c70 Removed more networking code 2016-08-30 21:33:10 -03:00
juanjp600
7bdcc51bae Made game compilable
Networking functionality is fully disabled now.

I think it's time to start rewriting everything. OH BOY
2016-08-30 21:13:36 -03:00
juanjp600
0a0f8e19b4 Merged branch new-netcode into new-netcode 2016-08-30 20:37:12 -03:00
juanjp600
9416eb64d7 Completely destroyed game
Looks like a lot more than just netcode is getting rewritten. Removing coroutines because there are better ways of handling asynchronous tasks, removing filestream because that's to be reimplemented later
2016-08-30 19:59:14 -03:00
juanjp600
37ffd64490 Disabled networkevent
Changing the way each item handles its own network updating
2016-08-30 19:28:32 -03:00
juanjp600
6e83ef7626 Merge remote-tracking branch 'refs/remotes/origin/master'
Conflicts:
	Subsurface/Barotrauma.csproj
	Subsurface/Source/Characters/AI/EnemyAIController.cs
	Subsurface/Source/Characters/AICharacter.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/Items/Components/DockingPort.cs
	Subsurface/Source/Items/Components/Door.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Physics/PhysicsBody.cs
2016-08-30 18:04:49 -03:00
juanjp600
af220dbc2a Removed Fill/ReadNetworkData
These functions needed to be replaced because they rely heavily on reliability.

Instead, new functions called (Write/Read)Data(Server/Client) will be added. 

Separating client and server code into completely separate functions will help ensure that proper security checks are performed.
2016-08-29 20:02:46 -03:00
juanjp600
83f8ad0555 Clientside fix for empty password
Thanks for finding this Reg
2016-08-29 18:40:27 -03:00
juanjp600
bf686ae997 A few more security checks 2016-08-29 18:38:06 -03:00
Regalis
a0a5e2df33 v0.5.0.1 + re-enabled the black wall damage indicators, client permissions disabled 2016-08-29 23:43:08 +03:00
juanjp600
e284ff5f38 Heavier password encryption
I don't think this fixes actual bugs but the encryption seemed kinda weak.
2016-08-29 07:13:19 -03:00
Regalis
fe8cce1723 Using Levenshtein distance to measure the similarity of chat messages, (float)0.0 -> 0.0f 2016-08-28 16:53:24 +03:00
Regalis
3d2d06d2e5 WriteCharacterData/ReadCharacterData methods can be used for any type of character (less duplicate code) 2016-08-26 20:48:57 +03:00
juanjp600
12f849be01 Removed references to reliable sender
Now the game is broken, progress is being made :)
2016-08-25 18:55:32 -03:00
Regalis
712953cc9e WIP client special permissions (kick, ban, end round) 2016-08-24 11:47:46 +03:00
Regalis
dc67eeebd4 Humans can be spawned through console in multiplayer 2016-08-23 14:19:50 +03:00
Regalis
ef0098d52a Anti-gamerfood measures:
- clients don't send server passwords as plaintext: the server sends a nonce which the client encrypt using the password as the key
- IPs are visible in netstats
- amount of client jobpreferences limited to 3 at the servers side
- sanitizing client names
2016-08-19 18:18:07 +03:00
Regalis
7e14ca6186 Possible to use the same sub as the main submarine and the respawn shuttle, fixed duplicate client names in netlobby if reconnecting before the server has disconnected the client, fixed "end round" button not appearing when joining mid-round 2016-08-14 20:13:40 +03:00
Regalis
fbe6c91d67 - previous networkevent of an item isn't overridden if the event is for a different itemcomponent
- batteries are restored to full capacity and all items repaired when resetting the respawn shuttle
- some respawnmanager refactoring (characters/items arent created in WriteNetworkEvent anymore)
- syncing respawnmanager state with clients who join mid-round
- LOS is turned back on when respawning
2016-08-13 18:42:55 +03:00