Commit Graph

1186 Commits

Author SHA1 Message Date
Regalis
e1a2f6af62 Fixed the name of the server being overridden with "Server" every time a client selects the lobby screen 2017-04-05 21:57:00 +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
6895cdbd7d Clients don't apply OnFire statuseffects to items. OnFire can cause items to explode, and because the client can't set the condition of the item to 0.0, it'll keep exploding until the server breaks the item. TODO: come up with a proper fix because now clients can't see oxy or fuel tanks exploding at their end. 2017-04-03 20:48:09 +03:00
Regalis
e75d596d34 Firesource syncing fixes 2017-04-03 20:22:59 +03:00
Regalis
43d29de45c Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Barotrauma.csproj
2017-04-03 18:36:22 +03:00
Regalis
2ca609855a Particle collision and project file fixes 2017-04-03 18:32:49 +03:00
Regalis
2f638a4c01 The initial loading screen is closed if an exception is thrown during loading. Causes the game to crash due to the unloaded content, but that's better than letting the game hang on the loading screen. 2017-03-30 21:56:05 +03:00
Regalis
c368d6ddf1 - fire particle tweaking
- water puts out fires more slowly and the speed depends on the height of the water surface relative to the position of the firesource (instead of the volume of the water in the room)
- the extents of the firesources are visualized when debugdraw is on
- any >0.0 damage to structures has a chance of spawning some "shrapnel" particles
2017-03-30 21:50:18 +03:00
Regalis
c58d7dfd73 Animated fire & smoke particles 2017-03-30 21:32:08 +03:00
Regalis
e661724cbb Debug console is added to GUIUpdateList after all other UI elements (because it's drawn on top of everything else) 2017-03-30 17:35:14 +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
5bdd801da4 Having multiple sub files with the same name doesn't prevent clients from selecting or requesting the correct one 2017-03-28 21:01:44 +03:00
Regalis
2a5a2bc6f6 Fixed server not sending a status update for an item if the condition of the item changes directly from 100 to 0 2017-03-27 23:44:09 +03:00
Regalis
0e5de469d3 Fixed infinite loop in WrapText if the line length is smaller than an individual character, text scale is taken into account in GUITextBlock wrapping 2017-03-27 21:08:14 +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
9ef069bf61 New head sprite 2017-03-27 01:54:48 +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
3306a1ab96 EntitySpawner only writes a limited number of entities per packet 2017-03-26 17:19:29 +03:00
Regalis
52dde81396 Removed duplicate "MapEntity.MapLoaded" call from level generation, fixed level walls occasionally overlapping with ruins 2017-03-25 20:13:15 +02: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
827644b72c Revert ccc0956, there was nothing wrong with the ID comparison 2017-03-24 22:10:48 +02:00
Regalis
dfd24045f8 EntityEventManagers send an empty event if the entity doesn't exist anymore when writing the message (may happen, for example, when a client is still waiting for some message about the item when it's destroyed in a deconstructor).
Not sending the events at all would be a better solution, but then we'd need to shift the IDs of all the consecutive events and make sure it doesn't mess anything up with any of the clients. Not necessarily worth the effort, considering how rare these "empty events" are.
2017-03-24 19:12:09 +02:00
Regalis
067db912f4 - EntitySpawner recursively deletes contained items when an item is deleted
- items in the inventories of the characters inside the shuttle are deleted when resetting the respawn shuttle
- fixed host's character not being taken into account when assigning jobs for respawning characters if the host is not respawning
2017-03-24 18:49:55 +02:00
Regalis
ccc09560a1 Fixed another off-by-one error in EntitySpawner ID comparisons, clients reset their ChatMessage ID when (re)connecting to the server 2017-03-24 17:56:56 +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
4d19d0afc1 Deconstructors & fabricators drop created items on the floor if there's no more room in the inventory, deconstructor doesn't reset the activation button after deconstructing an item if there are still more items to go 2017-03-23 18:55:39 +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
885a8c610c Text scale in GUITextBlocks and ItemLabels can be changed, text wrapping fix (words that are too wide for one line shouldn't cause overflows anymore) 2017-03-22 23:22:54 +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
d42d017aab Added IsActive field to scripted events (allows disabling event-specific music when needed) 2017-03-21 18:20:19 +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
c016bee124 Sound volume setting affects the volume of the splash screen video 2017-03-21 17:32:29 +02:00
Regalis
dcd566f2dc Clients can't set the condition of an item unless the server says so, fixed low item condition being rounded down to zero when writing into a network msg 2017-03-21 17:31:22 +02:00
Regalis
ec31e86350 Server sets the condition of an item back to 100 when the item is fixed 2017-03-20 21:16:21 +02:00
Regalis
fe4a8b419d Chatmessage GUITextBlock height matches the height of the message (-> multi-line messages don't overlap), fixed the name of the server being added to server chatmessages if there are no recipients 2017-03-20 20:52:10 +02:00
Regalis
2c688f40e3 Syncing RespawnManager state with clients 2017-03-20 20:44:20 +02:00
Regalis
7c6ea5b1c0 LightSource vertices are recalculated if another submarine within the range of the light has moved relative to the sub the light is in 2017-03-20 17:15:12 +02:00
Regalis
d6074d23ab MonsterEvent switches state back to "not started" if the sub gets far enough from the monsters (prevents monster music from staying on), SoundPlayer plays a random default music clip if a suitable clip isn't found for the highest priority task 2017-03-19 20:34:21 +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
b38512865d GUIListBoxes don't add children that aren't in the view to GUIUpdateList (-> can't scroll the listbox with the scroll wheel when the cursor is above/below the box) 2017-03-19 19:19:04 +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
40f5f352f5 - pasted entities are assigned to the main sub (-> entities copypasted from another sub are saved)
- fixed submarinebody attempting to generate a physics body for a sub with no walls if there are some other walls loaded
- MathUtils.GiftWrap doesn't throw an exception if passed an empty list of points
2017-03-15 23:59:23 +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
8d8620047d Fixed clients who leave a server and re-join becoming desynced and not being kicked by the server.
The clients didn't reset their ChatMessage.LastID, which caused an exception to be thrown when clamping the chatmsg ID server-side, preventing the server from updating the lastRecvEntityEventID of the client later in the method. The server wouldn't kick the client, because ServerEntityEventManager wouldn't handle cases where a client is waiting for an event that doesn't exist anymore.
2017-03-14 22:43:15 +02:00