Commit Graph

471 Commits

Author SHA1 Message Date
Regalis
bee570e2e3 - the server log view is not cleared when saving the log (but old messages are removed when going over the max number of lines)
- log can be viewed in the server lobby, not just in-game
- logging pump, reactor & battery state usage
- GUIListBox.MouseRect doesn't return an empty rect anymore -> listboxes without selectable content can be scrolled with the mouse wheel
2017-05-08 21:30:54 +03:00
Regalis
464078e565 Clients can't send wire positions to the server 2017-05-03 21:28:09 +03:00
Regalis
89941229f8 A reference to the character who triggered a signal is passed to all the recipients of the signal. Allows more accurate server logging: using doors, docking ports or turrets is now properly logged. 2017-04-28 18:10:47 +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
1dad5d9bf4 Passive sonar: when not active, the sonar shows nearby sources of sound and a faint outline of the structures around them. Now it's much easier to monitor how much noise the sub is making and to hide from enemies.
+ Changed the visuals of the sonar a bit. The current rendering method is very inefficient though, todo: write a shader
2017-04-24 21:13:54 +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
67a3020430 Logging when clients use an item on themselves or hit someone with a melee weapon 2017-04-17 19:52:25 +03:00
Regalis
1bd856b7a5 ItemComponent update events aren't created if the component isn't found in the item's component list (may happen if an event is created when setting a property of a component during initialization) 2017-04-12 23:47:26 +03:00
Regalis
9a36df0f52 ItemComponent syncing fixes:
- Relay and lightcomponent states are synced (otherwise clients won't be notified if the state is, for example, toggled by a signal from a button).
- Clients don't play door sounds if a signal attempts to set the state to the same value as the predicted state, but DO play if a correction from the server changes the state from the predicted one.
- Clients are notified if a reactor receives a shutdown signal.
- Powercontainer updates are sent if the charge changes by 1%, not by 1 unit.
2017-04-11 20:38:07 +03:00
Regalis
347f549ac1 Reactors, sonars, nav terminals, pumps and batteries use similar delayed correction logic as doors and inventories.
I.e. the clients delay correcting the state of the item until the local player stops manipulating the state (atm the delay is 1 sec). Prevents pumping speeds, steering directions and whatnot from switching to an old state and back - now the corrections should not be visible to the players unless the client predicts the state wrong.
2017-04-11 00:48:53 +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
887735ff32 - DockingPort syncing fix: server waits until the port is locked before sending hull/gap IDs, clients can't lock the port until the server tells them to
- fixed crew commands being disabled in single player instead of multiplayer
- server-side ID error logging fix
2017-04-09 20:51:57 +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
bfe043c154 Fixed door sounds playing twice client-side (first when the client activates the door and again when the correct state is received from the server) 2017-04-05 23:51:45 +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
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
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
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
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
2c688f40e3 Syncing RespawnManager state with clients 2017-03-20 20:44:20 +02:00
Regalis
2d7d7f3d8d Fixed turret syncing, clients don't get a notification about changed permissions if they're assigned the same permissions they already have 2017-03-13 20:52:31 +02:00
Regalis
0874a0b059 PowerContainer syncing, clients can't launch a turret until the server tells them to 2017-03-11 15:40:18 +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
Regalis
c851770386 Fixed "trying to read past the buffer size" errors caused by item updates sent by clients, midround syncing timeout period is calculated based on the number of events the client needs to receive 2017-03-11 12:49:08 +02:00
juanjp600
4f589603d1 Further improvements to item position syncing
Still needs some work
2017-03-09 23:49:12 -03: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
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
juanjp600
ecb7500df9 Converted UInt32 ID's to UInt16
TODO: test everything, make sure nothing broke
2017-03-06 16:25:12 -03:00
Regalis
f04a00f6e1 Merge branch 'lighting-optimization' 2017-03-02 19:39:55 +02:00
Regalis
a5017193bf Items don't attempt to set the positions of contained items with SetTransform if SetTransformIgnoreContacts fails (because the former calls the latter anyway, causing another exception). Still haven't managed to reproduce the exception 2017-03-02 19:38:31 +02:00
juanjp600
f2db3c6b20 Merge remote-tracking branch 'barotrauma/master' into lighting-optimization 2017-03-01 15:02:23 -03:00
juanjp600
3868b70387 Fixed windowed door shadows 2017-03-01 13:41:37 -03:00
Regalis
f8304ceb7e Workaround for exceptions in SetTransformIgnoreContacts
http://undertowgames.com/forum/viewtopic.php?f=21&t=5915#p112558
2017-02-27 20:55:23 +02:00
juanjp600
f3c58a2494 Made item syncing look slightly less erratic on client's side
Still kinda glitchy, we might need a more elaborate approach later
2017-02-25 12:22:38 -03:00
Regalis
3fcaff0288 Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
2017-02-22 23:33:14 +02:00
Regalis
75d047b57e Item position updates include whether the physics body is sleeping, clients disable sleeping bodies 2017-02-22 21:27:52 +02:00
Regalis
d50eba55a6 Fixed controller.userPos being recalculated incorrectly when flipping the sub (due to userPos being relative to the center of the item since commit 49d4108e) 2017-02-21 20:24:02 +02:00
Regalis
13a9b7ea88 More accurate velocity in item update messages (+ fixed incorrect message length) 2017-02-20 20:43:14 +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
4c5da19ab4 Clients predict the state of a door when a signal is received (and revert back to the correct state if no verification is received from the server in 1 sec) 2017-02-08 19:56:42 +02:00
Regalis
304c67f904 EntityEvent type written into item update messages using WriteRangedInteger, item position updates include the velocity of the item 2017-02-07 21:18:22 +02:00
Regalis
e2a872ad90 Fixed ItemContainer not setting the position of a contained item when it's placed in the ItemInventory, minor refactoring 2017-02-07 21:06:42 +02:00
Regalis
b5bac67c4a WIP item position syncing 2017-02-02 20:40:58 +02:00
Regalis
7674647928 Clients don't apply a received inventory state on the inventory until >1 second has passed since they sent their local state (prevents the inventory from briefly reverting to an old state if items are moved around in quick succession) 2017-02-02 18:35:28 +02:00