Commit Graph

80 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
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
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
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
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
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
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
1f07b18e5b Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Items/Components/DockingPort.cs
	Subsurface/Source/Items/Components/Signal/Wire.cs
	Subsurface/Source/Items/Item.cs
2016-12-29 22:18:27 +02:00
Regalis
c6380c3774 Broken junction boxes can't pass power from a box to another (wtf how have I not noticed this) 2016-12-01 17:34:02 +02:00
Regalis
adde3461ea Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Characters/Animation/HumanoidAnimController.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/Items/Components/Door.cs
	Subsurface/Source/Items/Components/Power/PowerContainer.cs
	Subsurface/Source/Items/Components/Signal/Wire.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Networking/ChatMessage.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Networking/GameServerLogin.cs
	Subsurface/Source/Networking/GameServerSettings.cs
	Subsurface/Source/Networking/NetworkMember.cs
2016-11-24 19:52:40 +02:00
Regalis
50d706c67b - changed how PowerContainers determine how much power to provide to the grid, batteries can now match the load of the grid
- light-emitting alien structures that hold the artifacts instead of just having the artifacts lay on the floor (can also be used for turning artifacts into power sources if installed in a sub)
2016-11-21 16:28:30 +02:00
juanjp600
d2c17274fe GUI elements now respect render order + some minor distance comparison optimization 2016-11-15 22:26:36 -03:00
Regalis
3d234aef73 Sending NetEntityEvents from client to server, ItemComponent class doesn't implement the INetSerializable interfaces (only the derived classes do), reactor syncing 2016-11-13 19:34:23 +02:00
Regalis
498c72c64a Server sends ServerEntityEvents to clients, NetEntityEvents can contain an object array which will be passed to the serializable entity (now only used for ItemComponent indices) 2016-11-13 13:56:48 +02:00
Regalis
c314b37029 Some classes for syncing entity state changes. Similar to the NetworkEvents in the old netcode, but the logic is split into separate classes which prevent the server from reading updates for entities that aren't IClientSerializable.
todo: add NetEntityEventManagers to server & client, some logic to prevent sending events that don't need to be sent (e.g. duplicate event state updates)
2016-11-12 20:56:06 +02:00
Regalis
8d1db582ad Fixed flickering lights 2016-11-10 17:46:46 +02:00
Regalis
ac65a431a8 Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Items/Components/Signal/Wire.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Items/ItemInventory.cs
	Subsurface/Source/Networking/GameServer.cs
2016-11-09 17:58:56 +02:00
Regalis
1617cd8f7a Item/statuseffect optimization:
- PowerTransfer components cache power connections instead of rechecking them every frame
- items store connections in a dictionary with the name of the connection as a key (-> finding the correct connection when sending a signal is more efficient)
- storing item tags & StatusEffect targetNames in HashSets
2016-11-08 21:14:29 +02:00
juanjp600
f0acf69065 Merge remote-tracking branch 'barotrauma/master' into new-netcode
# Conflicts:
#	Subsurface/Properties/AssemblyInfo.cs
#	Subsurface/Source/Characters/AI/EnemyAIController.cs
#	Subsurface/Source/Characters/AICharacter.cs
#	Subsurface/Source/Characters/Character.cs
#	Subsurface/Source/Items/Components/Signal/Connection.cs
#	Subsurface/Source/Items/Item.cs
#	Subsurface/Source/Map/Structure.cs
#	Subsurface/Source/Networking/GameClient.cs
#	Subsurface/Source/Networking/GameServer.cs
#	Subsurface/Source/Screens/NetLobbyScreen.cs
2016-11-05 18:18:20 -03:00
Regalis
eb2c51c2f1 Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method) 2016-10-31 20:50:20 +02:00
Regalis
9fed308705 InGame update messages include a timestamp which is passed to the ClientRead methods
Now only used in character position syncing, but some other entities may also have an use for it (e.g. discarding outdated data)
2016-10-18 19:04:32 +03:00
juanjp600
f5268c7c6c Fixes
It compiles now, but it's probably really broken.
2016-10-11 21:37:23 -03:00
juanjp600
e1296e4a8e Backported vsync changes from new-netcode, WIP hull visibility culling
The hull culling functions are there, they just aren't being used right now because there are some annoying bugs.
2016-10-02 22:24:31 -03:00
juanjp600
4cd6888622 Added some missing UpdateGUI implementations 2016-09-18 11:41:17 -03:00
juanjp600
bfd8bc6b35 Server serialization functions require client 2016-09-07 17:32:20 -03:00
Regalis
cf77a59c97 Implemented some of the itemcomponent read/write methods, made submarines server serializable 2016-09-02 17:59:08 +03:00
juanjp600
af220dbc2a Removed Fill/ReadNetworkData
These functions needed to be replaced because they rely heavily on reliability.

Instead, new functions called (Write/Read)Data(Server/Client) will be added. 

Separating client and server code into completely separate functions will help ensure that proper security checks are performed.
2016-08-29 20:02:46 -03:00
Regalis
ec59c47041 Docking ports have a power connector that can be used for distributing power between docked subs, already connected wires in respawn shuttles and the tutorial subs can't be disconnected, flares burn longer 2016-08-13 17:52:35 +03:00
Regalis
dc7956274c - camera follows the closest sub
- WIP "respawn shuttle"
- submarine size affects its mass
- electricity fixes
2016-06-18 14:46:40 +03:00
Regalis
bd4292c3e5 - PowerContainer capacity is initialized before charge to allow setting the charge higher than default capacity
- soundplayer doesn't crash the game if it can't stream a music clip
- some new structure prefabs
- more effective corrigodone (health med)
2016-06-07 18:24:23 +03:00
Regalis
b4af92ace2 Small optimization: items have a list of components that have to be drawn 2016-05-24 21:17:38 +03:00
Regalis
ed529052a2 - relaycomponent inherits from powertransfer, so that they're included when calculating the load/power for the grid
- deactivated powertransfer components don't carry power
- fixed reactor graph lines going over the graph if load > 10 000
2016-05-24 19:17:42 +03:00
Regalis
a477dad1b2 Renamed the CollisionMisc collision category to CollisionItem, teleporting items inside/outside the sub if their physicsbody leaves/enters a hull, powercontainer charge can be changed in editor (i.e. batteries can be set to fully loaded) 2016-05-19 19:47:26 +03:00
Regalis
d3ab7946a8 Using ToLowerInvariant instead of ToLower (the game works for Turkish players now!)
http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html
2016-04-27 17:14:09 +03:00
Regalis
3347fcdd20 Server notifies clients about junction boxes breaking (+ clients aren't allowed to break them), fixed explosion lightSource positioning 2016-04-22 17:28:22 +03:00
Regalis
5f05db7ca4 - fixed "signal loops" causing StackOverFlowExceptions (now the signals can only take 10 "steps" between components per frame)
- parameter for changing the output value of And/Or components when the input conditions aren't met
- or components work properly now
- a limited number of signals (100) can be queued in a delay component
2016-04-02 02:25:44 +03:00
Regalis
3402dad741 v0.3.5.1:
- fixed UI controls not working in launcher
- fixed battery cells not reloading inside batteries
- moloch spawns earlier in tutorial
- fixed wrong updaterversion in launcher (caused the launcher to always show a warning)
2016-03-14 18:34:57 +02:00
Regalis
d1580328ed Some cleanup using ReSharper (mostly removing redundancies) 2016-03-12 15:32:34 +02:00
Regalis
cd4e3a3d2a Fixed password box not working, connecting powered items with multiple parallel wires works, velocity/depth indicators on nav, stuff 2016-02-18 21:09:10 +02:00
Regalis
bec6d95198 Server log, ai characters steer away from the abyss 2016-02-14 16:47:23 +02:00
Regalis
6de5bac61b Only limbs with enough mass can cause impact damage to the sub, basictutorial changes, prevent ragdolls from teleporting inside submarinebody 2016-02-07 23:18:51 +02:00
Regalis
201dc1b733 Supercapacitors have much higher max output but smaller capacity, fixed not being able to drag wire nodes in editor, batteries working properly now 2016-02-07 12:32:19 +02:00
Regalis
ec7bd3523c Separate recharge and power_out connections in batteries (todo: configure recharge connections as power connections) 2016-02-05 22:10:51 +02:00
Regalis
278371638e - Fixed structure-gap links not being saved
- Saving gap orientation
- Waypoint generation works with small hulls and even if SubBody doesn't exist
- Fixed charactermode when a editing mid-round
- Fixed powercontainer charge progressbar position
2016-01-24 21:28:27 +02:00
Regalis
c78784068c -fixed a typo in fabricableItem requirement & added checking for said typos
- fixed being able to set battery recharge sped over the limits
- fixed vents being added to OxygenGenerator.ventlist multiple times
- fixed item.Submarine not being set if pulling an item from a fabricator
- some tutorial fixes
- fixed TraitorMode endmessage not being shown if the sub isn't at the end and neither character is dead
- SalvageQuest fails if the item has been destroyed
-
2016-01-21 20:59:26 +02:00
Regalis
1a5b3fa66a Endworm attacks working, itemlabel text saving bugfix, deconstructors & fabricators need power, engine sprite, disable wire node dragging in character mode, only hit with one meleeweapon at a time, fixrequirement text overflow fix, mapentities can hace multiple categories, Gap.FindHull fix, Waypoint ladder & gap saving, stuff 2016-01-18 20:09:38 +02:00
Regalis
0fc085c86d Item UI replacements, fabricator bugfix, randomly spawning artifacts, AI can fix leaks, LimbAttacks do damage once (not each frame for the duration of the attack) 2016-01-14 21:06:08 +02:00