Commit Graph

223 Commits

Author SHA1 Message Date
Joonas Rikkonen 4b0c54d664 Dockingport gap linking fixes. Closes #551
- Dockingports force the hatch/door gaps to be connected to the hulls between the ports, because connecting them automatically may fail if the ports are positioned in a non-standard way.
- Gaps don't recheck hulls in OnMapLoaded if rechecks have been disabled.
- Item.UpdateHulls and Gap.UpdateHulls are not called when OnMapLoaded is called during ruin generation.
2018-08-07 12:45:45 +03:00
Joonas Rikkonen 5354670288 Fixed StatusEffects being multiplied by deltatime when a client uses an item with the "use on self" buttons (even though the effect should be instantaneous). Caused effects with no duration to do almost nothing, making calyxanide and other meds with instantaneous effects basically useless. Closes #587 2018-08-07 11:36:53 +03:00
Joonas Rikkonen cfc03f8443 Controllers can't focus the camera on broken items (none of the current focusable items can break but may be useful for modders). Closes #590 2018-08-06 22:43:54 +03:00
Joonas Rikkonen e60ebc1930 Handling and logging exceptions thrown by ItemComponent constructors, added stack traces to a couple of error messages 2018-08-06 14:53:28 +03:00
Joonas Rikkonen c463baed44 Made medical & toxic cabinets waterproof. Closes #578 2018-08-06 14:08:00 +03:00
Joonas Rikkonen e57eb739e2 Cloned items copy the RequiredItems from the original item. Closes #581 2018-08-06 11:19:10 +03:00
Joonas Rikkonen 6a415afaa1 Merge branch 'master' of https://github.com/Regalis11/Barotrauma 2018-08-06 10:53:25 +03:00
Joonas Rikkonen 141b77f838 Fixed connectionpanel syncing. Closes #575 2018-08-06 10:50:32 +03:00
Joonas Rikkonen a69c52b3c1 Fixed servers failing to write network events for wires with too many nodes, causing clients syncing to fail and everyone getting kicked out due to desync. Now the wire events are split into multiple events, and there's a hard cap (255) on the number of nodes per wire. Closes #563
+ Writing too much data into an event no longer breaks event syncing completely, if it happens the server just logs an error and writes an empty event.
2018-08-03 21:32:28 +03:00
Joonas Rikkonen 708f72c883 Fixed items occasionally dropping instead of being moved to another inventory client-side. Closes #558 2018-08-02 13:24:56 +03:00
Joonas Rikkonen 9ab5d76ed1 Fixed attachable items dropping on the ground when deattaching them (but still staying in the inventory of the character detaching them). Closes #559 2018-08-02 12:18:03 +03:00
Joonas Rikkonen 1379460ad9 Fixed holdable components reverting their RequiredItems back to the prefab values during loading. Closes #557 2018-08-02 11:22:49 +03:00
Joonas Rikkonen 274a29bada Fixed fabricated items always appearing to be in full condition client-side (e.g. oxygen tanks which should be empty after being fabricated). Cherry-picked from 64896b0f. Closes #561 2018-08-02 10:50:38 +03:00
Joonas Rikkonen 7f58e4619b Merge pull request #560 from ursinewalrus/placeItemsWhereHandIs
Place items where hand is
2018-08-02 10:44:45 +03:00
Josh Kerxhalli-Kleinfield 8c8d3e300f Comment update 2018-08-01 19:07:35 -05:00
Joonas Rikkonen 5a6a8e2501 Wifi components can't communicate with the enemy sub in combat missions. Fixes #554 2018-08-01 13:52:47 +03:00
ursinewalrus bec2cd5323 more accurate placement 2018-07-31 19:46:55 -05:00
ursinewalrus d8559ad63c attaches item to wall where hand is, not at center of body 2018-07-31 18:50:38 -05:00
Joonas Rikkonen 82103cf394 Controllers don't have to be wired directly to an item for camera focus to work (= railguns and cameras can be used over wifi). Closes #535 2018-07-31 15:03:20 +03:00
Joonas Rikkonen d81ee1a27e Added a bunch of checks to make sure a normalized zero vector (= NaN, NaN) is not used in any position/velocity/movement calculations. There were at least three places where it was causing problems according to error reports: when a character that can't enter a sub spawns at the center of a hull and when using an underwater scooter or throwing something while the cursor is at the position of the character, but there were tons of other places as well where it may have potentially caused physics errors. 2018-07-31 12:28:04 +03:00
Joonas Rikkonen b4d0a1bd38 Inventory sync fix (component index included in events created when the server receives an inventory update from a client). 2018-07-30 14:28:04 +03:00
Joonas Rikkonen 60a563fe75 EntityEvent fixes:
- Clients wait for midround syncing to finish before applying the remote state to connection panels and inventories (because the wires connected to the connection panel or items in the inventory may not exist before the EntitySpawner events have been received).
- Server writes 0 as the projectile ID if the projectile doesn't exist anymore when a Turret event is sent.
- More info in networkevent error messages.
2018-07-30 13:35:26 +03:00
Joonas Rikkonen c66098ca4e Fixed only the first inventory of an item being synced (e.g. clients wouldn't get notified when an item is contained in the "output inventory" of a fabricator or deconstructor). 2018-07-30 11:00:21 +03:00
Joonas Rikkonen 9964923eba Fixed server writing invalid item network events incorrectly (NetBuffer.Position is the read position, not write position) 2018-07-30 10:46:52 +03:00
Joonas Rikkonen 5233b51e18 More error checks in Item.ServerWrite 2018-07-30 10:12:55 +03:00
Joonas Rikkonen 458c972580 More server-side EntityEvent error logging, Item.ServerWrite does some error checks and writes NetEntityEvent.Type.Invalid as the type of the event instead of attempting to write a potentially unreadable message. 2018-07-29 22:28:56 +03:00
Joonas Rikkonen 50603b72f4 Fixed another bug in DockingPort that caused entity ID mismatches. Even though the server sent the IDs of the CURRENT hulls and gap of the docking port, they are not necessarily created in the correct order during midround syncing and may end up replacing the ID of another entity or another entity spawned after them may cause their IDs to be replaced. Closes #530 2018-07-26 12:42:29 +03:00
Joonas Rikkonen 4a8845c604 Fixed docking ports creating duplicate hulls and gaps during loading 2018-07-24 13:21:36 +03:00
Joonas Rikkonen 65b8d2d36e Fixed door gaps being removed twice when unloading a sub (in door.Remove and Entity.RemoveAll). Probably didn't cause any issues other than unnecessary console warnings. 2018-07-24 13:19:07 +03:00
Joonas Rikkonen 3b6bedb180 Fixed clients not recreating docking port hulls/gaps when receiving a network event if the docking port is already locked 2018-07-23 23:27:27 +03:00
Joonas Rikkonen 002e63f1eb Fixed entity IDs occasionally getting messed up due to the gaps and hulls created by docking ports. Clients would simply use the existing hulls and gaps when a network event for an already docked port is received, even though they may have been removed and replaced with ones with different IDs. 2018-07-23 21:36:49 +03:00
Joonas Rikkonen 78a5dcbfe9 Fixed nullref exception in CharacterInvetory.UseItemOnSelf if the OnUse statuseffect removes the item. Closes #513 2018-07-22 17:58:52 +03:00
Joonas Rikkonen 0728784b8b Added invalid value checks to PhysicsBody property setters & item.SetTransform, checking for excessively large values 2018-07-22 17:58:17 +03:00
Joonas Rikkonen faf0a87cfa Added a bunch of error checks to physicsbody-manipulating code 2018-07-20 16:33:12 +03:00
Joonas Rikkonen 0abdcb969d Fixed "failed to write event" errors when a client or server tries to change an enum value of an item (e.g. the output type of an oscillator component) 2018-07-20 15:18:46 +03:00
Joonas Rikkonen e7e7d32123 Cherry-picked 0ff9a3d (more ragdoll optimization) 2018-07-20 12:21:53 +03:00
Joonas Rikkonen f1c4bd3c67 - Some of the non-game-crashing error messages are sent to GameAnalytics.
- Changed crash severity from Error to Critical.
- Exception handling when loading submarine preview images.
- Checking if position is valid in Ragdoll.SetPosition.
2018-07-19 22:12:50 +03:00
Joonas Rikkonen 30a453191f Added "VulnerableToEMP" property to Powered. Can be edited in sub editor. Reactors and relays are not affected by EMP by default. Closes #495 2018-07-18 15:07:21 +03:00
Joonas Rikkonen f25fe6b504 Added some error checking & debug logging to Door.PushCharactersAway to diagnose why Math.Sign is throwing ArithmeticExceptions (see #497). 2018-07-18 14:36:00 +03:00
Joonas Rikkonen d00b52882f Added UpdateUseItem method from d253863 2018-07-18 12:14:09 +03:00
Joonas Rikkonen 41800aff77 Cherry-picked d0b61b3 from dev. 2018-07-18 11:50:09 +03:00
Joonas Rikkonen e0455caaaa Cherry-picked 869b725 from dev 2018-07-18 11:49:36 +03:00
Joonas Rikkonen 1ef2cb7500 Fixed crashing if the Use method of a wire is triggered by a StatusEffect 2018-07-18 11:24:56 +03:00
Joonas Rikkonen 88abbe28e3 Fixed entity IDs getting messed up and causing desync because of purchased items in multiplayer campaign. The server created cargo items first and then mission-related entities, while the clients only spawned mission entities and relied on the server to spawn the cargo, which caused mission entities to have wrong IDs. Closes #484 2018-07-17 12:50:04 +03:00
Joonas Rikkonen 89b26008a6 Projectile damage range is set to the radius of the item's collider if the range is not given in the xml. Structure.AddDamage uses the edges of the sections to calculate the distance to a damage source, i.e. the damage area only has to "touch" the section to do damage. Closes #479 2018-07-16 15:44:26 +03:00
Joonas Rikkonen ce88519c13 Pump components with a physics body updates it hull when active (-> possible to make portable pump items). Closes #463 2018-07-11 10:59:40 +03:00
Roni Kovaniemi c1cbde4288 Adder Signal Component
Added a Adder signal component, which adds values inputted together and outputs a sum.
2018-07-09 14:42:07 +03:00
Joonas Rikkonen df149dd0fa Option to make delay component reset (discarding previously received signals) when a new signal is received, fixed delay countdown running even when the game is paused. Closes #435 2018-06-10 23:51:26 +03:00
Joonas Rikkonen 1a84b6cae7 Fixed items not being placed in the same hull and sub as the item they're inside if the ItemContainer is not the first of the parent's ItemContainer components (e.g. fabricator output inventory). Closes #430 2018-05-30 19:15:55 +03:00
Joonas Rikkonen d1ec246f28 Fixed motion sensors sending out signals even if the output is set to nothing. Closes #426 2018-05-30 18:36:44 +03:00