Commit Graph

174 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 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 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 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 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 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 faf0a87cfa Added a bunch of error checks to physicsbody-manipulating code 2018-07-20 16:33:12 +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 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
Joonas Rikkonen 7dd4dca2ed Fixed crashing when a round starts if the sub has been saved while a fabricator was running. Closes #398 2018-05-07 11:15:12 +03:00
Joonas Rikkonen ed22ca360f Fixed AND/OR or components staying inactive until they receive their first signal. Closes #387 2018-04-25 14:43:44 +03:00
Joonas Rikkonen 88eabef8af Made characterusable default to false (as it did before 91d6c7b) 2018-04-24 20:58:42 +03:00
Joonas Rikkonen 91d6c7b91f Fixed explosives being directly usable by characters, causing them to explode when left clicking while holding them due to 9dd9425c. See #385 2018-04-24 18:00:36 +03:00
Joonas Rikkonen 6e666939a0 Wearables apply OnWearing StatusEffects in all the components of an item, not just the Wearable component. 2018-04-23 15:17:25 +03:00
Joonas Rikkonen ceaba2f5ca Fixed some entities occasionally not being removed at the end of a round. CargoMission removed the cargo items at the end of a round without checking if the items have already been removed, which could cause another entity to be removed from the entity dictionary if it's taken the ID of the cargo item. This prevented the new entity from being removed in Entity.RemoveAll, causing errors during the next round. Closes #278 2018-04-23 13:55:08 +03:00
Joonas Rikkonen eed7b72b4e Fixed player-controlled creatures being able to do damage to themselves and RepairTools causing damage to the user regardless of the user's skills. 2018-04-18 15:04:18 +03:00
Joonas Rikkonen 3abbfcbc23 Railguns cannot be fired without aiming. Closes #364 2018-04-09 15:22:42 +03:00
Joonas Rikkonen 465b848cb4 Fixed relay components ignoring signals to the toggle and set_state connections if the signal has been passed through other PowerTransfer components. Closes #355 2018-04-06 19:51:16 +03:00
Joonas Rikkonen faaaa69fa7 RegExFindComponent doesn't attempt to evaluate the (null) signal when no signal has been received yet. 2018-03-21 15:31:53 +02:00
Joonas Rikkonen df746db421 Ladders can be climbed by holding up/down while standing next to them without having to select them first. 2018-03-08 11:01:17 +02:00
juanjp600 82dcbc3ae8 Light sources now follow the direction of parent Turrets + changed Controller's output signal and Turret's input signal to an angle 2018-03-07 22:53:28 -03:00
Joonas Rikkonen b9287beed2 Characters carry two-handed throwables in both hands. (See #303) 2018-03-07 11:33:06 +02:00
Joonas Rikkonen 6ddcd65f18 RepairTools can do damage to characters by hitting the collider. Closes #299 2018-03-05 12:34:21 +02:00