Commit Graph

488 Commits

Author SHA1 Message Date
Regalis
0e5cfbb579 Reactor autotemp is logged 2017-06-02 17:25:42 +03:00
Regalis
ff322bd7a2 Fixed "component doesn't have a GUIFrame" errors when selecting an artifact holder (or any other selectable item with non-selectable components) 2017-06-01 19:38:20 +03:00
Regalis
4651e666bf All Powered components of an item are taken into account in grid power/load calculations, not just the first one 2017-05-30 17:04:14 +03:00
Regalis
dc80ee810c Separate servelog message type for inventory usage 2017-05-28 22:36:55 +03:00
Regalis
b7518fa812 Item connections are cached in the Item constructor instead of OnMapLoaded (-> buttons created mid-round work now) 2017-05-26 20:03:38 +03:00
Regalis
8b4b35e84b Changelog update, stuff 2017-05-24 17:38:26 +03:00
Regalis
4d0a6677e9 Server notifies clients when an OnFire statuseffect causes an item to break (-> clients can see oxygen/fuel tanks exploding again) 2017-05-24 17:30:20 +03:00
Regalis
c2b6632877 Server sends position updates for items when their sleep state changes, removed some redundancies from item update methods 2017-05-23 18:45:59 +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
1b17372f92 Clients update item rects when a position update is received from the server 2017-05-17 20:44:53 +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
1d3da3e70b Fixed clients being unable to toggle doors when they've predicted the state of the door and waiting for a confirmation from the server, reading a position update for an item with no body doesn't throw an exception 2017-05-10 21:19:10 +03:00
Regalis
ad90cf804d - respawn, fabricator & deconstructor logging
- fixed listbox child hiding 4 real now
- dockingport logging fix (name of the sub instead of submarine.ToString)
2017-05-09 21:39:39 +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
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
e0f7f429e5 New sonar overlay image 2017-05-04 20:57:06 +03:00
Regalis
464078e565 Clients can't send wire positions to the server 2017-05-03 21:28:09 +03:00
Regalis
00bbd1d607 Sonar tweaking 2017-05-03 21:09:05 +03:00
Regalis
043c2fbc5e Moved TotalElapsedTime from GameMain to the Timing class 2017-05-03 19:15:43 +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