Commit Graph

490 Commits

Author SHA1 Message Date
Regalis
7700854935 Disabled AI crew commands in multiplayer, attempting to give commands to a character with no AIController doesn't crash the game 2017-04-05 21:09:24 +03:00
Regalis
3246e2c521 Limb physics aren't disabled when a character is frozen (only collider physics) -> frozen characters can still take damage from weapons 2017-04-05 17:53:31 +03:00
Regalis
8215c4d91b MemStates without a timestamp are removed from a character when using timestamp-based interpolation (there may still be ID-based states with a timestamp of 0.0 in the buffer when switching to timestamp-based interpolation, for example when the controlled character dies)
+ vice versa when switching from timestamp-based to ID-based
2017-04-04 21:32:53 +03:00
Regalis
0f8e6440ef Clients can access the inventories of incapacitated characters (e.g. put handcuffs on a stunned player, grab stuff from a dead character's inventory) 2017-04-04 21:18:03 +03:00
Regalis
43d29de45c Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Barotrauma.csproj
2017-04-03 18:36:22 +03:00
Regalis
2b65392a3c BackgroundSpriteManager takes the rotation and pivot point of the sprites into account when determining which cells of the "sprite grid" the sprite occupies (-> partially visible sprites shouldn't be culled away anymore) 2017-03-29 23:28:09 +03:00
Regalis
2582680445 Fixed physics bodies staying active when a character is disabled in the constructor 2017-03-29 23:12:03 +03:00
Regalis
1a3c18c727 EntitySpawner sends spawn/removal messages to clients using EntityEvents.
EntityEvents and EntitySpawner used to work independently of each other, with separate IDs, and there was no guarantee that spawning and events would happen in the correct order. For example, a client could fail to read events during midround syncing because the entity has been removed, or read an event for an incorrect entity because the entity has been removed and the ID taken by some other entity.
2017-03-27 21:05:32 +03:00
Regalis
6a6486e270 Server doesn't create an entityevent if the health of a character changes very little, husk infection isn't updated after the infected character dies, clients can't create a "huskified" human NPC until the server says so 2017-03-26 22:47:08 +03:00
Regalis
aca85c2708 All characters start disabled in the multiplayer mode, and are enabled when the client starts receiving position updates for the character, OR when the server starts receiving inputs from the client controlling the character, OR if the character is controlled locally. (-> no more floating, frozen characters at the start of a round)
+ the server disables AICharacters that are far away from all players
2017-03-25 20:10:47 +02:00
Regalis
7e431c7dfd Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Items/Components/Machines/Deconstructor.cs
	Subsurface/Source/Items/Components/Machines/Fabricator.cs
2017-03-23 18:58:18 +02:00
Regalis
e9e4e5f9d3 Level cells that overlap with ruins are removed during level generation (instead of just disabling collisions with them), background sprites can spawn on ruin walls 2017-03-23 18:13:28 +02:00
Regalis
d4db37f8dd CPR syncing + some refactoring
Clients send an entityevent to the server when they start/stop doing CPR, and server includes the animation state in messages when character is dragging some other character
2017-03-22 20:05:50 +02:00
Regalis
823ad12058 Some refactoring: made PosInfo a class and moved character-specific fields to a "CharacterStateInfo" subclass 2017-03-21 19:36:28 +02:00
Regalis
2722d3cf8d Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Events/MonsterEvent.cs
2017-03-21 18:16:25 +02:00
Regalis
cd0da235a2 Swimming anim fix: legs are forced back to their correct position if the thighs are bent too close to the torso (should fix characters swimming with their legs extended up over their shoulders) 2017-03-19 19:49:59 +02:00
Regalis
18fded1d87 Fixed a typo in the "give in" button tooltip 2017-03-19 18:31:15 +02:00
Regalis
dde0160956 Fixed items that aren't selected with the default select key being impossible to interact with, unconscious characters CanBeSelected 2017-03-19 18:29:53 +02:00
Regalis
4285cdde27 ID of the entity a character is interacting with is also sent to the client controlling the character (should fix characters dragging someone at the server's end but not at the client's, or vice versa) 2017-03-15 23:07:33 +02:00
Regalis
5bdb57b98a Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Characters/AICharacter.cs
	Subsurface/Source/Characters/Animation/HumanoidAnimController.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/GameMain.cs
	Subsurface/Source/Items/Components/Signal/Connection.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Networking/GameServerLogin.cs
	Subsurface/Source/Physics/PhysicsBody.cs
2017-03-11 13:24:09 +02:00
juanjp600
c55c1b6d0e Vastly improved item syncing + Crouch syncing
Using SetTransform instead of TargetPosition + a larger margin seems to make the item syncing near-perfect.
2017-03-09 20:18:19 -03:00
juanjp600
49b440208c Merge branch 'master' of https://gitlab.com/poe.regalis/barotrauma 2017-03-07 13:44:52 -03:00
juanjp600
d6c292a2cc SharpFont + ScalableFont implementation
https://github.com/Robmaister/SharpFont

TODO: replace Code Bold.otf with the full version, fix any bugs, build on Linux, possibly move ToolBox string wrapping and limiting logic to ScalableFont class for better results.
2017-03-07 13:44:42 -03:00
Regalis
10794a5e2c Added z position to background sprites 2017-03-06 18:38:38 +02:00
Regalis
65625777e5 Monster syncing fixes:
- clients freeze and disable AI characters if no updates have been received in a while (due to the monster being far away from player-controlled characters at the servers side for example)
- server disables AI characters that are too far for updates to be sent to clients (-> targets of monster missions can't swim away from the spawnpos and cause the clients' sonars to point to an incorrect position)
2017-03-01 23:14:15 +02:00
Regalis
871c3bc93c Character colliders are disabled when the character is disabled (-> monsters won't automatically drop into abyss in monster missions) 2017-03-01 19:15:50 +02:00
Regalis
c9f09031de Re-enabled anchoring main limb to the collider when a remote player is unconscious (otherwise only the position of the collider will be synced, and the ragdoll won't follow it)
+ stunned characters can't send position updates
2017-02-25 18:06:43 +02:00
Regalis
bf3fa804df Fixed ragdolls accumulating a large movement value while being dragged (backported from commit a21d8d7) 2017-02-25 16:40:52 +02:00
Regalis
a21d8d7a53 Fixed ragdolls accumulating a large movement value while being dragged (line 902), causing them to launch off with a high velocity when they wake up
+ some cleanup
2017-02-25 14:25:21 +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
68b0f2132a Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Characters/AICharacter.cs
2017-02-17 19:31:25 +02:00
Regalis
a5e56f7d4d Hacky fix for monsters getting lodged inside the sub due to tunneling 2017-02-17 19:28:16 +02:00
Regalis
99cf438ed7 The lowest point of a character collider is calculated from its AABB (works correctly now even if the collider is rotated, allowing prone characters to be dragged through stairs), dragged characters collide with stairs when climbing up, the AI of unconscious or stunned characters isn't updated 2017-02-17 19:27:54 +02:00
Regalis
7f7ac76484 Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/GUI/GUI.cs
	Subsurface/Source/GUI/LoadingScreen.cs
2017-02-13 22:04:28 +02:00
Regalis
bfc22c7b33 Enabling characters when switching control to them (when switching to a disabled far-away monster for example) 2017-02-13 21:58:27 +02:00
Regalis
5871faa2dd Added a few new console commands: disablehud, lockx & locky (disables submarine movement on the respective axis), followsub (toggles whether the camera moves with the subs) 2017-02-13 16:23:28 +02: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
d46207916f Server doesn't send character position updates to far-away clients, clients disable characters if they haven't received position updates in a while 2017-02-07 18:59:25 +02:00
Regalis
462a8b5da8 Changed character update IDs from uint to ushort 2017-02-06 16:24:11 +02:00
Regalis
9bda79036a - server doesn't send the STARTGAME message to all clients when someone joins mid-round
- team ID is included in character spawn messages even if no-one is controlling the character anymore
- living characters are taken into account when assigning jobs for respawned characters (e.g. there can't be two captains alive at the same time)
2017-02-05 21:58:31 +02:00
Regalis
89e881cb57 Readded voting (submarine, mode, end round & kick) 2017-02-04 18:30:40 +02:00
Regalis
b5bac67c4a WIP item position syncing 2017-02-02 20:40:58 +02:00
Regalis
39f977535d Fixed ragdolls colliding with stairs when swimming even if not steering upwards, AI steering fixes 2017-02-02 20:39:51 +02:00
Regalis
32d7be07ee ClosestCharacter is saved into NetInputMem (clients can drag characters again) 2017-02-02 19:24:59 +02:00
Regalis
b87e22409a Fixed server setting character LastNetworkUpdateIDs to UInt32.MaxValue 2017-02-01 18:09:31 +02:00
Regalis
5a4201c3f2 Character status syncing fix, less frequent stun update messages 2017-01-31 20:50:40 +02:00
Regalis
15b3dd31a8 Merge branch 'master' into new-netcode 2017-01-25 20:30:26 +02:00
Regalis
e27fa1c7ee Readded team assignment logic 2017-01-15 20:39:06 +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
fdbdf9638f Fixed railgun aiming, fixed EntityEvent not being sent if a character is killed by something else than health dropping to zero 2017-01-14 14:45:19 +02:00