Commit Graph

62 Commits

Author SHA1 Message Date
Joonas Rikkonen
8c4531188b Fixed scrollable area of GUIListBoxes not changing when children are hidden (e.g. when filtering messages in the server log), fixed new log messages appearing in the server log even if the type of message has been filtered out. 2018-04-09 17:31:03 +03:00
itchyOwl
b599206294 Add a GUI slider for setting the auto ban duration. Define the max auto ban length in the server settings. (Issue #128) 2018-03-27 11:29:36 +03:00
Joonas Rikkonen
10ce4bd20d Fixed messageboxes opened by the mp campaign setup UI not being shown until the UI is closed (e.g. shuttle & incompatible content package warnings), renamed MultiplayerCampaign -> MultiPlayerCampaign for consistency. See #315 2018-03-06 16:43:36 +02:00
Joonas Rikkonen
08ade1dc6f Fixed clients not being notified when a campaign is exited and a new one started, causing them to think they still have up-to-date save files for the new campaign and get kicked out due to desync as soon as a round starts. (See #315) 2018-03-06 14:18:37 +02:00
Joonas Rikkonen
cd6fc87eb4 Fixed object header issues and "trying to read past the buffer size" errors caused by NetEntityEvents for removed entities.
EntityEventManager sends an empty event with an ID of 0 if the entity doesn't exist anymore when writing the event. The recipient should simply skip over these messages and read the next one, but clients only did so if the event is the next unreceived one, causing the rest of the messages to be read incorrectly (which could lead to various sorts of problems in addition to the header and buffer size errors). The server didn't deal with the empty events correctly either, it increased the last received ID even if the received event was not the one the server is waiting for, potentially causing other non-empty events to be ignored.

+ Added an error message if the size of an NetEntityEvent is larger than 255 bytes. Not only is that excessively large for an event, but the length of the event is written as a byte and larger ones may again cause messages to be read incorrectly. Most events should be nowhere near 255 bytes, but now that the descriptions and tags of a spawned item are included in the item spawn messages there's the possibility that some events are too large.
2018-03-01 19:30:27 +02:00
Joonas Rikkonen
77940fa992 Added some debug logging, Character.Revive removes the existing AITarget from the character before creating a new one 2018-02-26 18:05:03 +02:00
Joonas Rikkonen
1c68d5a4d7 - Fixed clients using character directories to count the number of disallowed monsters, which made it possible for them to disallow incorrect monsters.
- Fixed MonsterEvent checking if the name of the character directory contains the name of the disallowed character directory, which could for example cause them to disallow "someMonsterAlt" if "someMonster" is disallowed.
2018-02-26 16:53:22 +02:00
Joonas Rikkonen
83c02504ea Fixed clients failing to select a received submarine/shuttle file, preventing them from starting a round until they rejoin the server. Closes #271 2018-02-22 14:18:06 +02:00
Joonas Rikkonen
6e231b7e7d Lighting is forced back on when a client starts a round (-> can't disable lighting by using the console command before joining a server). Closes #238 2018-01-28 19:15:23 +02:00
Joonas Rikkonen
ad18eb0db0 Fixed vote count text overlapping with the submarine preview button in NetLobbyScreen 2018-01-26 10:36:34 +02:00
Joonas Rikkonen
8544dea9db Fixed clients being able to votekick/kick/ban themselves in the server lobby. 2018-01-16 17:39:20 +02:00
Joonas Rikkonen
633bd85e27 Fixed clients keeping a reference to the currently running GameSession after being kicked out of the server, causing an error if they rejoin and stay in the lobby while the server ends the round (because the gamesession attempts to generate a RoundSummary even though all subs have been unloaded). Closes #87 2018-01-16 17:23:52 +02:00
Joonas Rikkonen
0f7befa09e Fixed occasional invalid object header errors when attempting to send a status NetworkEvent for a character (easy way to reproduce was to kill multiple characters during the same frame with an explosion). 2018-01-16 17:02:01 +02:00
Joonas Rikkonen
466e6f8833 Fixed client-side null exception when the client is in the lobby and a round ends with the mission successfully completed 2018-01-11 18:56:45 +02:00
Joonas Rikkonen
bd1cd15dd4 Added votekick button to the server lobby. Closes #190 2018-01-10 20:43:31 +02:00
Joonas Rikkonen
9f58d1b74d Cargo items can be set to spawn inside specific types of containers instead of being scattered on the cargo room floor. 2018-01-10 15:56:11 +02:00
Joonas Rikkonen
f9500fa6e1 Fixed monster spawn & extra cargo settings being impossible to select due to the menus being outside of their parent GUIComponent 2018-01-10 14:21:37 +02:00
Joonas Rikkonen
662ead0bb4 ToggleHUD console command hides the mp chat box. Closes #208 2018-01-09 11:19:21 +02:00
Joonas Rikkonen
3d73f28362 - TextManager automatically replaces "\n" strings with a newline.
- Removed instantiating traitor start popup from client-side TraitorManager (instead the client receives the start message from the server).
- GUIMessageBoxes don't leave unnecessary empty space for the header if the header text is empty.
- More hard-coded text removal.
2017-12-27 16:07:00 +02:00
juanjp600
064c8da7e7 Unknown object headers will now crash the game with a copy of the previous object to be read 2017-12-21 20:26:33 -03:00
Joonas Rikkonen
9ed2871ede Renamed a couple of properties for consistency & removed unnecessary CPR blood particle scaling 2017-12-20 20:26:22 +02:00
Joonas Rikkonen
dde320b387 Merge pull request #101 from Crystalwarrior/moRags
Body shoulder-grab, better CPR anims, CPR and Crit overhaul!
2017-12-20 19:37:38 +02:00
Joonas Rikkonen
ce37411a29 Merge branch 'permission-overhaul'. Closes #49
Conflicts:
	Barotrauma/BarotraumaShared/Source/DebugConsole.cs
	Barotrauma/BarotraumaShared/Source/Networking/ChatMessage.cs
2017-12-20 19:36:17 +02:00
Joonas Rikkonen
b3c3970209 Server responses to clients using console commands ("granted permissions to client", error messages, etc) are displayed in the client's debug console instead of the chat box. Client command usage is included in server logs. 2017-12-20 19:18:32 +02:00
Alex Noir
07aeac4fdc Traitor Count/Coefficient and Ragdoll and Karma server settings buttons!!! oh my GOD!!! 2017-12-09 19:09:10 +03:00
Joonas Rikkonen
9599137e83 Console command permissions can be changed in the client permission menu, permitted commands are displayed in the client-side permission popup 2017-12-07 18:25:08 +02:00
Joonas Rikkonen
9bc0931be5 Clients can execute permitted console commands server-side now. The console commands have three different actions: the default action, one that's executed client-side when a client uses it, and one that's executed server-side when a clients requests it. If the client-side action is omitted, the client relays the command to the server as-is. If the third action is omitted, the server executes the default action. 2017-12-06 19:53:05 +02:00
Alex Noir
0e586651e7 Adds a [PM] tag
Fixes .Private message type colors being silly
2017-12-05 18:50:36 +03:00
juanjp600
c6ca3572ba Added an option to respawn directly in the main sub 2017-12-05 03:03:37 -03:00
juanjp600
e323e9dc71 Fixed chat messages being assigned to the wrong sender when their bodies have been eaten 2017-12-03 19:06:01 -03:00
Joonas Rikkonen
0840a29ff3 Started overhauling the client permission system to make it a bit more flexible. Now the clients can have the permission to use specific console commands (atm these commands are relayed to the server as-is).
TODO: make it possible to give clients console command permissions via the menus and the console, save command permissions, deal with commands that don't work as intended when simply relayed to the server and executed server-side, add "ranks" (preconfigured or custom sets of permissions, e.g. moderator, admin, etc).
2017-12-03 22:54:28 +02:00
Joonas Rikkonen
f55d028799 Chatbox can be deselect by pressing enter while it's empty 2017-12-02 17:47:05 +02:00
Joonas Rikkonen
1c09f757a2 Renaming fields in the Client class for consistency 2017-11-23 20:43:22 +02:00
Joonas Rikkonen
4689bec441 Clients send the latest received campaign ID to the server when in the lobby instead of requesting it once with a reliable message. -> Now the server reattempts sending the save file if the transfer fails at either end. 2017-11-23 20:16:47 +02:00
Joonas Rikkonen
fce7d43ef3 Fixed characters not appearing in the round summary in mp, minor CrewManager refactoring 2017-11-20 20:46:54 +02:00
Joonas Rikkonen
04e3710a65 Renaming fields for consistency 2017-11-14 22:45:22 +02:00
Joonas Rikkonen
f7298c241e Progress:
- Input fields for vectors & colors in SerializableEntityEditor.
- SerializableProperty tooltips.
- GUINumberInput supports floats.
- EditingHUD for structures (atm the only editable property is the color of the sprite)
2017-11-12 20:24:11 +02:00
Joonas Rikkonen
8e556f1c76 - Renamed a bunch of ObjectProperty-related stuff (ObjectProperty -> SerializableProperty, IPropertyObject -> ISerializableEntity, the "SerializableProperty" attribute -> Serialize).
- Rectangle serialization.
- Option to restrict numeric properties to a range of values.
- WIP generic ISerializableEntity editor.
2017-11-08 21:15:03 +02:00
Joonas Rikkonen
1ff2054ca8 Converted the GetAttribute methods in the ToolBox class to extension methods 2017-10-04 18:38:40 +03:00
Joonas Rikkonen
f127c410b0 Option for clients to spectate the game without respawning 2017-09-25 21:31:21 +03:00
Joonas Rikkonen
5eb1544f1e Clients can be given a permission to select the sub or the game mode 2017-09-24 17:11:10 +03:00
Joonas Rikkonen
04b0c63f30 Campaign mode can't be voted for. The host has to manually create/select the campaign save, so switching to the campaign mode when the host isn't present would cause problems. 2017-09-24 13:41:54 +03:00
Joonas Rikkonen
5a4bc0242d Voting UI fixes:
- The vote count texts are removed when voting is disabled.
- Server sends vote status to joining clients (-> clients see the number of votes immediately, not after someone votes something).
- Server refreshes vote count texts when a client disconnects.
2017-09-21 20:37:30 +03:00
Joonas Rikkonen
f291a22976 - Autorestart works in campaign mode.
- The server select a random destination when the campaign starts and after each round, so the campaign can be played even if there's no host/client to choose the destinations. (TODO: make it possible to vote for the destination?)
- Reverting to the previous save if the entire crew is dead works correctly now.
- Clients load the campaign saves after receiving them (-> discovered locations/connections are synced with clients).
2017-09-19 22:05:42 +03:00
Joonas Rikkonen
9114ae658f - Modified item buying logic: selected items are purchased immediately without having to click the "buy" button, and they stay in the list of purchased items until the round is started. (-> It's possible to see which items have been purchased and cancel purchases).
- Clients can be given a permission to manage the campaign (atm selecting which location to head towards and buying items).
- Syncing cargomanager state with clients.
- Misc fixes.
2017-09-17 15:55:24 +03:00
Joonas Rikkonen
348d81a66f MP campaign fixes 2017-09-13 20:34:10 +03:00
Joonas Rikkonen
63bca3c7ea Syncing campaign state & save files with clients (WIP) 2017-09-11 21:32:48 +03:00
Joonas Rikkonen
c1f5e3cbda Progress on multiplayer campaign:
- Moved SaveUtils to the shared project.
- Moved the "new game"/"load game" menu logic to a separate class.
- Somewhat functional campaign UI in the server lobby (only the map view is usable atm though).
2017-08-31 18:53:37 +03:00
Joonas Rikkonen
a75fd12020 Started moving single player campaign logic to an abstract CampaignMode class to make it reusable in the eventual multiplayer campaign 2017-08-28 20:19:21 +03:00
Joonas Rikkonen
729108c7b9 Replaced usages of "shift" with "round" for consistency 2017-08-28 17:59:08 +03:00