Commit Graph

380 Commits

Author SHA1 Message Date
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
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
d017817878 Updating wire sections if the wires are moved during loading 2016-11-09 16:23:48 +02:00
Regalis
f4a942414d More efficient culling, workaround for null exception in CombatMission.GetTeamName 2016-11-06 19:41:32 +02:00
Regalis
bddc673fed Mapentity visibility culling based on their parent sub (-> subs outside the camera view aren't rendered) 2016-11-06 18:59:05 +02:00
Regalis
92985f3ed9 Position updates not sent for subs docked to the second main sub 2016-11-06 16:56:05 +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
juanjp600
35dafc4792 Merge remote-tracking branch 'barotrauma/master' into new-netcode
# Conflicts:
#	Subsurface/Source/Characters/Character.cs
#	Subsurface/Source/Items/Components/Machines/Steering.cs
#	Subsurface/Source/Map/Structure.cs
#	Subsurface/Source/Networking/GameClient.cs
#	Subsurface/Source/Networking/GameServer.cs
2016-11-05 18:09:44 -03:00
Regalis
a32198ff80 v0.5.3.1 2016-11-04 16:27:53 +02:00
Regalis
c3b3d57b57 Fixed brainfart, asserting that structure and wallsection rects have non-negative dimensions 2016-11-03 19:09:14 +02:00
Regalis
505b4f5f1a The sprites of structures with no body are flipped correctly 2016-11-03 18:24:03 +02:00
Regalis
19683e749d Waypoint generation fix (submarine collider is ignored when doing visibility checks), regenerated waypoints in vanilla subs 2016-11-01 19:06:33 +02:00
Regalis
1b818b6422 Fixed timestep logic is disabled during loading (less choppy loading screens & no pause at the start of the game), damageable structures visible in LOS again, footstep sound tweaking 2016-11-01 19:05:09 +02: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
5cc605bc01 Dust particles are drawn in the same batch as the background sprites (-> far-away particles are rendered behind the sprites), limiting character name length in the crew info menu, the "submarine not found in your folder" -tooltip is updated after downloading a sub file 2016-10-29 15:38:40 +03:00
Regalis
48c07cfce5 - doors aren't ignored when checking visibility during waypoint generation or when finding a starting node for a path
- AICharacter will mark their path unreachable if their path is blocked by a door they cant open (may happen if someone closes the door after calculating the path)
- fixed exception when creating a Steering component when there's no active GameSession (i.e. in the editor)
2016-10-27 21:18:45 +03:00
Regalis
0422beebde Small optimization: structures that haven't taken damage aren't rendered using the damage shader 2016-10-27 19:39:07 +03:00
Regalis
2f3d3ba9ea LOS color is based on ambient light, added a parallax effect to background particles 2016-10-27 19:25:15 +03:00
Regalis
6f9160e4a7 Removing & spawning entities in the same order as the server, EntitySpawner does both removing and spawning 2016-10-26 16:44:59 +03:00
Regalis
df9f89e383 Submarine position syncing 2016-10-25 20:50:47 +03:00
Regalis
62dd055e8d Merge branch 'master' into animcontroller-overhaul
Conflicts:
	Subsurface/Content/Characters/Crawler/crawler.xml
	Subsurface/Source/Characters/AICharacter.cs
	Subsurface/Source/Characters/Animation/FishAnimController.cs
	Subsurface/Source/Characters/Animation/Ragdoll.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/Map/Submarine.cs
	Subsurface/Source/Map/SubmarineBody.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Physics/PhysicsBody.cs
2016-10-25 20:09:25 +03:00
Regalis
07f8c966ab Submarine position is synced using the same logic as the characters, AICharacter position syncing 2016-10-25 19:01:19 +03:00
Regalis
ac8edb5b2a Fixed monster/artifact events being out of sync between the server and the clients 2016-10-25 18:58:56 +03:00
Regalis
c33a4ba5e5 AmbientLightHulls optimization (only spread to adjacent hulls once, not once per every gap between the hulls) 2016-10-25 15:40:19 +03:00
Regalis
641e579e92 Backported animcontroller-overhaul 2016-10-22 15:18:16 +03:00
Regalis
92b61ee816 Merge branch 'master' into animcontroller-overhaul 2016-10-19 21:15:44 +03:00
Regalis
8cb9450217 CaveGenerator doesn't attempt to create triangles whose area is too small for Farseer to handle 2016-10-19 16:55:16 +03: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
Regalis
efcc466fdd - added colliders to all monster configs
- disabling monster collider & placing it at mainlimb when stunned/dead/frozen
- monsters can't swim above water
- misc fixes
2016-10-17 16:32:57 +03:00
Regalis
f3e74a6a41 Collider-controlled swimming, fixes 2016-10-16 20:07:34 +03:00
Regalis
db8c2b9f8e Changed colliders from limbs to normal physics bodies, removed RefLimb 2016-10-15 20:08:51 +03:00
Regalis
62c88be214 Controlling humanoid movement with one capsule-shaped physics body that other limbs (attempt to) follow
Broken and WIP
2016-10-14 00:13:19 +03:00
juanjp600
506ef2f2aa Attempted fix for drawableComponents crash + LOS tweaks 2016-10-12 19:24:39 -03:00
juanjp600
7e6ef65eb3 Improved LOS effect
It's pretty inefficient (I need to figure out how to set up new shaders), and it might let the player see too much, but it looks way better than pure black.
2016-10-12 16:54:41 -03:00
Regalis
170e1a0da8 ItemRemover -> EntityRemover, clients reset spawner & remover when starting a new round 2016-10-12 20:46:47 +03:00
Regalis
60b36e020c Changed ItemSpawner to EntitySpawner, used for syncing both item and character spawning 2016-10-12 19:25:01 +03:00
juanjp600
72033a581e Merge remote-tracking branch 'refs/remotes/barotrauma/master'
Conflicts:
	Subsurface/Properties/AssemblyInfo.cs
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/GUI/GUI.cs
	Subsurface/Source/GameMain.cs
	Subsurface/Source/GameSettings.cs
	Subsurface/Source/Items/CharacterInventory.cs
	Subsurface/Source/Items/Components/ItemComponent.cs
	Subsurface/Source/Items/Components/Machines/Pump.cs
	Subsurface/Source/Items/Components/Machines/Radar.cs
	Subsurface/Source/Items/Components/Machines/Steering.cs
	Subsurface/Source/Items/Components/Power/PowerContainer.cs
	Subsurface/Source/Items/Inventory.cs
	Subsurface/Source/Items/Item.cs
	Subsurface/Source/Items/ItemSpawner.cs
	Subsurface/Source/Map/Levels/WaterRenderer.cs
	Subsurface/Source/Map/LinkedSubmarine.cs
	Subsurface/Source/Map/Map/Map.cs
	Subsurface/Source/Map/Structure.cs
	Subsurface/Source/Map/Submarine.cs
	Subsurface/Source/Map/WayPoint.cs
	Subsurface/Source/Networking/GameClient.cs
	Subsurface/Source/Networking/GameServer.cs
	Subsurface/Source/Physics/PhysicsBody.cs
	Subsurface/Source/Screens/GameScreen.cs
2016-10-11 20:19:25 -03:00
Regalis
9540972db4 Added a near-indestructible ruin wall variant that has a higher chance of being used in rooms further away from the ruin entrance 2016-10-11 22:46:24 +03:00
Regalis
bbec3d64dc Amount of ambient light decreases when going deeper, closest sub can be moved with IJKL 2016-10-11 18:23:25 +03:00
Regalis
d21c6674ea Level generation bugfixes:
- cell bodies match the shape of the cell (triangulation didn't work correctly because the center of the cell was given in display units while vertices were in sim units)
- ignoring graph edges whose length is zero when generating cells (fixes "invalid left/right normal" errors)
2016-10-11 18:18:54 +03:00
Regalis
7e20d7a17a Timing.Alpha isn't updated if accumulator < step, using interpolated positions to draw lightsources & ragdoll/ai debug info (-> no twitching when the sub is moving) 2016-10-11 16:34:59 +03:00
Regalis
d8476d9371 Hull-specific ambient lighting: light sources increase the amount of ambient light in rooms and the light can spread to adjacent rooms through gaps. Allows making the default ambient light much darker without making shadows look too dark in fully lit subs. 2016-10-10 21:13:22 +03:00
Regalis
d4e9116b0f Audio channel states visible in debug view + some sound fixes:
- a short "cooldown" after each footstep sound (prevents the sound playing multiple times during one footstep)
- water flow sounds are only played by one of the hulls a gap is between
- flow rate affects the range of the flow sound
2016-10-09 20:11:08 +03:00
Regalis
ef9dce9a0d - fixed exception in GetSubsToLeaveBehind if the round ends when none of the subs is at an exit
- water surface is clamped above the bottom of the hull
- character names don't overlap with health bars
2016-10-09 18:20:32 +03:00
Regalis
f4c5c5e542 Added a particle trail to railgun shells 2016-10-09 15:13:41 +03:00
Regalis
e720fa366c Timing.Alpha isn't updated when the game is paused (-> no "twitching" when the pause menu is open), moved water scrolling and surface lerping from draw method to update 2016-10-09 15:12:57 +03:00
juanjp600
a1d319d0df Merged branch new-netcode into new-netcode 2016-10-08 19:14:52 -03:00
Regalis
3de4645357 Separated waypoint edit/update methods, fixed items/structures being immediately placed when selecting them in the editor, fixed GUIListBox children ovrlapping with the scrollbar 2016-10-08 19:46:56 +03:00
Regalis
1ba87165b0 Fixed camera being placed at {-2147483647, -2147483647} when starting a round, fixed debugdraw crashing the game, moving spectator camera along with the closest sub in Submarine.ForceTranslate 2016-10-08 17:19:54 +03:00
Regalis
e50b801a47 Separate draw/update methods for editingHUD & resizing 2016-10-07 17:06:26 +03:00