Commit Graph

507 Commits

Author SHA1 Message Date
Regalis
64c109f13b Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Characters/AI/EnemyAIController.cs
	Subsurface/Source/DebugConsole.cs
	Subsurface/Source/Items/Components/Machines/Radar.cs
	Subsurface/Source/Items/Item.cs
2017-04-27 21:33:44 +03:00
Regalis
6397bc432e UI tweaks 2017-04-27 21:08:20 +03:00
Regalis
90f354f6d7 Clients notify the server when they "give in" (i.e. kill their character when unconscious) 2017-04-26 23:39:41 +03:00
Regalis
5eb01d4c50 EnemyAIController tweaking:
- removed the "distance accumulator" which was used to make characters reset their attack target if they haven't moved enough within a specific interval. The intention was to make characters less likely to get stuck but it seems to cause more problems than it solves.
- more frequent target updates
- characters can target entities they're previously targeted from further away (even if the target isn't within range anymore)
2017-04-24 19:49:27 +03:00
Regalis
31f7eca717 Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/GUI/GUIButton.cs
	Subsurface/Source/GameSession/CrewManager.cs
	Subsurface/Source/GameSession/GameSession.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Screens/MainMenuScreen.cs
	Subsurface/Source/Screens/ServerListScreen.cs
2017-04-23 21:40:11 +03:00
Regalis
499284dc91 UI layout tweaks 2017-04-20 17:39:32 +03:00
Regalis
7df4bff249 Fixed exceptions if a character is removed when an AI character is attacking it 2017-04-17 17:59:22 +03:00
Regalis
b24f0877a1 Fixed characters occasionally teleporting around at the clients' end after respawning. The position syncing logic assumed that all coordinates above the level are in sub-relative space, even though the world position of the respawn shuttle can also be above the level. 2017-04-17 17:56:17 +03:00
Regalis
8964c0df5c Syncing character skill levels 2017-04-13 00:35:36 +03:00
Regalis
f4c01f68ed Fixed incorrectly length in character position updates (1 bit off), clients read pad bits in position updates 2017-04-12 23:44:58 +03:00
Regalis
fac31b4892 - Fixed railgun sounds not playing at the clients' end
- Server sends updates for batteries when their charge changes (not strictly necessary assuming the rest of the electrical grid stays in sync, but just in case)
- Reactor state is synced with clients if modified through the debug console
- Increased maximum item velocity to 64 units/s, all item are clamped to the max vel
2017-04-10 20:13:33 +03:00
Regalis
dc6ed7daf1 Separate component style for item UIs + option to select the style in the item config files, removed a bunch of hard-coded UI element color changes 2017-04-10 18:11:33 +03:00
Regalis
0301457a8f A fix to occasional "unknown object header" errors.
If an entity had been removed and it's ID taken by some other entity, clients who hadn't received a message about the removal and the new entity would end up reading ENTITY_POSITION messages for the new entity incorrectly. Reading an incorrect number of bits from the message would also prevent the clients from reading the rest of the data in the packet properly.

Now the server doesn't send position updates to clients during midround syncing (because there's no guarantee they know about the entity yet). Clients also force the read position to the correct place after reading a position update in case something goes wrong when reading the msg.
2017-04-09 19:04:49 +03:00
Regalis
3844dd9dac GUIStyle logic changes: instead of having a predetermined GUIComponentStyle for each type of GUIComponent, any GUIComponent can use any style. The GUIComponent constructors take the name of the style as a parameter, and if no style is specified, the default style for the GUIComponent in question will be used. 2017-04-08 16:46:53 +03:00
Regalis
f863eb331d Moved stun from AnimController to the character class, server notifies clients when the stun ends, husk infection included in character status messages 2017-04-07 19:56:25 +03:00
Regalis
77614dfa4e Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Characters/Animation/Ragdoll.cs
2017-04-06 21:59:52 +03:00
Regalis
00b7193b6b Minor optimizations: GUITextBlocks don't reposition and wrap the text when only the position of the text block changes (almost killed my laptop by spamming a bit too many messages to the debug console), less unnecessary floor raycasts 2017-04-06 21:58:19 +03:00
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