Commit Graph

472 Commits

Author SHA1 Message Date
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
77614dfa4e Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Characters/Animation/Ragdoll.cs
2017-04-06 21:59:52 +03:00
Regalis
a2e21a78f9 Nicer looking explosions 2017-04-06 21:58:35 +03:00
Regalis
7cb88e39e9 Attempt to fix ThrowOrIgnoreBadComparer exception in LightSource.FindRaycastHits.
Couldn't reproduce the crash, but I'm guessing it could be caused by CompareCCW not returning 0 if comparing a position to itself. (and if not, at least the exception is caught now)
2017-04-05 21:36:31 +03:00
Regalis
b3bbdbf589 Explosion damage is reduced if there are walls or other solid obstacles between an explosion and a character 2017-04-04 19:54:28 +03:00
Regalis
b063cf3feb Fire sound fix: the sounds were freed after each round without ever loading them again. The sound objects still existed and had some buffer ID assigned though, causing an incorrect clip to be played or OpenAL errors to be thrown on successive rounds. (Now freed sounds always have a buffer ID of -1) 2017-04-03 20:59:02 +03:00
Regalis
6895cdbd7d Clients don't apply OnFire statuseffects to items. OnFire can cause items to explode, and because the client can't set the condition of the item to 0.0, it'll keep exploding until the server breaks the item. TODO: come up with a proper fix because now clients can't see oxy or fuel tanks exploding at their end. 2017-04-03 20:48:09 +03:00
Regalis
e75d596d34 Firesource syncing fixes 2017-04-03 20:22:59 +03:00
Regalis
43d29de45c Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Barotrauma.csproj
2017-04-03 18:36:22 +03:00
Regalis
c368d6ddf1 - fire particle tweaking
- water puts out fires more slowly and the speed depends on the height of the water surface relative to the position of the firesource (instead of the volume of the water in the room)
- the extents of the firesources are visualized when debugdraw is on
- any >0.0 damage to structures has a chance of spawning some "shrapnel" particles
2017-03-30 21:50:18 +03:00
Regalis
5bdd801da4 Having multiple sub files with the same name doesn't prevent clients from selecting or requesting the correct one 2017-03-28 21:01:44 +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
52dde81396 Removed duplicate "MapEntity.MapLoaded" call from level generation, fixed level walls occasionally overlapping with ruins 2017-03-25 20:13:15 +02: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
e9e4e5f9d3 Level cells that overlap with ruins are removed during level generation (instead of just disabling collisions with them), background sprites can spawn on ruin walls 2017-03-23 18:13:28 +02:00
Regalis
823ad12058 Some refactoring: made PosInfo a class and moved character-specific fields to a "CharacterStateInfo" subclass 2017-03-21 19:36:28 +02:00
Regalis
2722d3cf8d Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Events/MonsterEvent.cs
2017-03-21 18:16:25 +02:00
Regalis
7c6ea5b1c0 LightSource vertices are recalculated if another submarine within the range of the light has moved relative to the sub the light is in 2017-03-20 17:15:12 +02:00
Regalis
40f5f352f5 - pasted entities are assigned to the main sub (-> entities copypasted from another sub are saved)
- fixed submarinebody attempting to generate a physics body for a sub with no walls if there are some other walls loaded
- MathUtils.GiftWrap doesn't throw an exception if passed an empty list of points
2017-03-15 23:59:23 +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
juanjp600
ecb7500df9 Converted UInt32 ID's to UInt16
TODO: test everything, make sure nothing broke
2017-03-06 16:25:12 -03:00
Regalis
e059a08688 Optimized lightsource raycasts 2017-03-03 00:02:43 +02:00
Regalis
f04a00f6e1 Merge branch 'lighting-optimization' 2017-03-02 19:39:55 +02:00
Regalis
335ee8c72e Warning message about unlinked vents is only shown once when saving (not for each vent) 2017-03-02 19:39:00 +02:00
juanjp600
f2db3c6b20 Merge remote-tracking branch 'barotrauma/master' into lighting-optimization 2017-03-01 15:02:23 -03:00
juanjp600
84a8232c1a Fixed override sprite scaling
Now it looks right.
2017-02-28 19:38:25 -03:00
juanjp600
4568f34f39 Rotating lights and overridden textures
The flashlight has the correct texture now, but something still seems off about the UV coordinates. Scaling is probably incorrect.
2017-02-28 19:19:02 -03:00
Regalis
9e16542b13 Replaced the arrows in server lobby buttons with images, made GUIImages rotatable (todo: make them align correctly when rotated/scaled), fixed the size of the sub save warning messagebox 2017-02-27 22:28:10 +02:00
Regalis
22d40077fa Fixed exception in LightSource if ConvexHullList for hulls outside the sub hasn't been generated (i.e. if switching to game mode using console commands), removed some debug code 2017-02-27 18:53:34 +02:00
Regalis
68a0320935 LightSources cache the light vertices in vertex buffers and only recalculate if needed 2017-02-27 00:41:50 +02:00
Regalis
f3f875e641 Calculating light volumes works now. Very poorly optimized at the moment, todo: cache volumes and only recalculate when needed 2017-02-26 21:33:32 +02:00
Regalis
abfe2261d2 - ConvexHulls consist of Segments and SegmentPoints which keep references to each other
- LightSources fetch a list of non-backfacing ConvexHull segments within their range, and sort the points counter-clockwise (TODO: calculate triangles from the points)
- fixed incorrectly working CircleIntersectsRectangle method
2017-02-26 01:17:22 +02:00
Regalis
bcabe4ab39 Disabled convexhull shadow caching 2017-02-25 21:50:24 +02:00
Regalis
844097b132 Initial steps in making the light rendering use light volumes instead of shadow volumes to allow rendering the lights in one batch.
So far just disabled shadow rendering and cleaned up some unnecessary stuff
2017-02-25 21:24:38 +02:00
Regalis
b8c3b9c29f - sub editor shows a warning upon saving if there are entities way outside the sub
- warnings are shown in a GUIMessageBox instead of the debug console
- added a submarine indicator to the editor
2017-02-24 00:01:46 +02:00
Regalis
7f7ac76484 Merge branch 'master' into new-netcode
Conflicts:
	Subsurface/Source/Characters/Character.cs
	Subsurface/Source/GUI/GUI.cs
	Subsurface/Source/GUI/LoadingScreen.cs
2017-02-13 22:04:28 +02:00
Regalis
1ea3044fd6 Firesource sound fix 2017-02-13 21:12:15 +02:00
Regalis
5871faa2dd Added a few new console commands: disablehud, lockx & locky (disables submarine movement on the respective axis), followsub (toggles whether the camera moves with the subs) 2017-02-13 16:23:28 +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
fb1f90e226 Fixed docked subs being moved twice when syncing sub position 2017-01-26 19:04:26 +02:00
Regalis
15b3dd31a8 Merge branch 'master' into new-netcode 2017-01-25 20:30:26 +02:00
Regalis
f7ac98ab5f Broken items can be repaired, fixed clients never removing firesources (causing the lights to stay after the flames have been extinguished) 2017-01-14 20:30:46 +02:00
Regalis
bd7766d3e7 Server clears EntityEventManager before starting a new round, not just when ending it (fixes events breaking during the next round if an item created an event when unloading the previous sub) + some additional error checks 2017-01-14 20:26:41 +02:00
Regalis
8a9b322b78 Clients can create firesources if server tells them to, extinguishing fixes 2017-01-11 18:03:01 +02:00
Regalis
beac45458e Transforming received in-sub mouse coordinates to outside coordinates if the character is outside and vice versa, HiddenSubPosition fix (can't use Level.Loaded to find the top of the level because the level isn't loaded yet) 2017-01-05 19:08:54 +02:00
Regalis
518eea746e Transforming in-sub MemPos/MemLocalPos coordinates to outside coordinates if the character is outside and vice versa, server doesn't start sending ingame updates until they receive the first ingame update message from the client (no need to send updates while the client is loading or if they fail to start the round) 2017-01-05 18:16:58 +02:00
Regalis
9a69126b1c Fixed OnMapLoaded not being called on MapEntities that don't belong to any sub (due to this, gaps weren't created on doors in alien ruins until the game starts running, which occasionally caused entity ID mismatches between clients and the server), changelog update 2016-12-31 13:26:50 +02:00
Regalis
1bba276949 Fixed OnMapLoaded not being called on MapEntities that don't belong to any sub (due to this, gaps weren't created on doors in alien ruins until the game starts running, which occasionally caused entity ID mismatches between clients and the server) 2016-12-30 18:01:15 +02: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