Commit Graph

521 Commits

Author SHA1 Message Date
Regalis
8d78e1743b WallAttackPos isn't reset when updating EnemyAIController targets if the target doesn't change 2017-05-31 17:46:05 +03:00
Regalis
7910b13120 Hulls, gaps, structures & waypoints implement ShallowRemove (= a method that's used to remove entities without severing links between them when copypasting).
Copied waypoints used to stay in the waypoint list, causing an exception to be thrown in PathFinder.GenerateNodes due to duplicate IDs.
2017-05-29 19:49:58 +03:00
Regalis
9281795866 Null reference fixes 2017-05-29 18:41:56 +03:00
Regalis
52daeea109 Fixed limb lightsource flipping (or actually disabled flipping altogether and just made the lightsource follow the rotation of the limb) 2017-05-29 18:41:36 +03:00
Regalis
b81ab4a480 Fixed a null exception in AIObjectiveFindSafety 2017-05-29 17:09:15 +03:00
Regalis
744e2bd031 Fixed characters walking slightly above the floor 2017-05-28 22:37:24 +03:00
Regalis
44349b97b0 Fixed a null exception when a dragged character is removed 2017-05-25 17:05:28 +03:00
Regalis
6223861f7a Fixed clients' characters deselecting items when a status networkevent is received from the server 2017-05-24 19:27:51 +03:00
Regalis
b6a62eebae Item selection syncing fix 2017-05-23 17:36:45 +03:00
Regalis
93940ff5a8 - AI crew can avoid firesources in nearby hulls, not just the one they're currently inside
- fixed fires, oxygen and water level not being taken into account in path cost calculations
- particle collision fix
2017-05-20 17:11:45 +03:00
Regalis
e3b595b9e0 Cleanup (removing unused variables & other redundancies, rethrowing exceptions instead of wrapping them in a new exception instance) 2017-05-20 15:35:13 +03:00
Regalis
095054182e Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/GUI/GUITextBlock.cs
	Subsurface/Source/GameMain.cs
	Subsurface/Source/Items/Components/Machines/Radar.cs
	Subsurface/Source/Networking/GameClient.cs
2017-05-17 18:51:22 +03:00
Regalis
0aca8dbf9d Humanoid animations work better on uneven floors (e.g. "fake stairs" made from wall pieces).
If the floor in front of the character is higher than where the character is standing, the character slows down and lifts its feet more. The position of the feet is also clamped below the waist, preventing the character from doing a backwards somersault when running over "fake stairs".
2017-05-14 20:15:31 +03:00
Regalis
c2d918073e Serverlog message types (which atm only determine the color of the message) 2017-05-09 19:56:12 +03:00
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