Commit Graph

137 Commits

Author SHA1 Message Date
Joonas Rikkonen 004250409a Fixed number of completed missions in a level not increasing if the connection is not selected after completing a mission. Closes #594 2018-08-07 13:22:02 +03:00
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 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 d51d01c3e8 Fixed Submarine.HandleLimbCollision attempting to set the velocity of the sub to an invalid value when the current velocity is extremely small 2018-08-06 11:43:46 +03:00
Joonas Rikkonen 9052782a6c Fixed index out of range exception when trying to determine outside collider position for a gap that's not connected to anything 2018-08-06 11:22:50 +03:00
Joonas Rikkonen 9099b191d0 Fix (or a workaround) to characters teleporting inside/through colliders when leaving a sub (see #552). Gaps do a raycast out from the sub to see if there are obstacles outside, and if so, ragdolls place a collider at the corresponding position inside the sub. The collider is simply a straight axis-aligned line atm, so it doesn't work accurately with sloped ice/submarine walls, but does prevent the ragdoll from ending up inside the obstacles. TODO: use a few edges to approximate the shape of the obstacles more closely? 2018-08-02 16:48:51 +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 86df5f6b1a Physics error checks & logging 2018-07-30 14:31:30 +03:00
Joonas Rikkonen 5b019621b7 Fixed sea floor having a wrong collision category, causing artifacts to spawn below it. Closes #532 2018-07-27 11:14:09 +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 b309b45246 Fixed entity ID mismatches and desync kicks caused by gap creation/removal in Structure.SetDamage. Creating the gaps on damaged walls wasn't guaranteed to happen in the same order client-side as on the server, causing the IDs to get assigned mismatching IDs and in some cases also affecting the IDs of other types of entities (see #528).
Now the structure gaps simply don't have IDs. They're never accessed by ID so I don't think there's the need to make the creation/removal go through entityspawner.
2018-07-25 17:34:10 +03:00
Joonas Rikkonen d3d842eecd Added error checking and logging to wire cloning logic in MapEntity.Clone (see #527) 2018-07-25 11:49:10 +03:00
Joonas Rikkonen 756278bb81 Increased the minimum distance between verts in level collider generation code. Should make the "invalid triangle created by CaveGenerator" errors less frequent. (See #311) 2018-07-24 15:43:26 +03:00
Joonas Rikkonen e21b756f29 Fixed invalid left/right normal errors during level generation (I think). The voronoi cell generation logic ignored zero-length edges, but it was possible for an edge to be so short that the distance from the adjacent edge to the center of the short edge rounded down to zero in GenerateWallShapes. 2018-07-24 15:00:35 +03:00
Joonas Rikkonen bf0c12ce52 The number of completed missions in a level connection is saved (-> reloading doesn't reset the mission in the connection to the initial one). Fixes #517 2018-07-24 14:34:27 +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 be5f168b76 Sending error messages during EntityEvent writing/reading and entity removal to GameAnalytics 2018-07-23 21:16:57 +03:00
Joonas Rikkonen 4041633eec Clamping velocity when correcting submarine position 2018-07-23 18:33:32 +03:00
Joonas Rikkonen 9d1c4f3efb Moved Submarine.ClientRead to the client project 2018-07-23 17:58:28 +03:00
Joonas Rikkonen a61ac1716d Sending level seed & level gen errors to GameAnalytics 2018-07-20 14:17:59 +03:00
Joonas Rikkonen bcd9fd7e5f Cherry-picked de2136c (level physicsbody optimization) 2018-07-20 12:23:07 +03:00
Joonas Rikkonen 8e03ac9284 Fixed nullref exceptions in CharacterHUD & RuinGenerator 2018-07-20 11:36:53 +03:00
Joonas Rikkonen a712ec6756 Fixed null reference exception when trying to dispose a sub with no preview image. Closes #503 2018-07-20 09:59:13 +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 568cf1a02f Fixed memory leak caused by submarine preview images, changed Submarine.SavedSubmarines to a property that prevents removing submarines from outside the class without disposing the preview image. Closes #498 2018-07-18 14:23:43 +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 a436eb27c1 Fixed explosion with an EMP value only damaging reactors (when they should only ignore reactors). Closes #473 2018-07-16 13:50:31 +03:00
Joonas Rikkonen 244acd3ec5 Fixed character getting spawned at a random spawnpoint in any sub if no spawpoint that fits the character's job is found, making it possible for them to spawn inside the respawn shuttle. Closes #408 2018-05-17 19:56:36 +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 177f31d538 Some more logging to help diagnose #278, a potential workaround to remove items/characters that Entity.RemoveAll failed to remove for some reason. 2018-04-20 16:50:10 +03:00
Joonas Rikkonen c6f3d0c1b8 Attempt to fix characters occasionally getting launched out of the sub at lightspeed when the sub crashes into something (even if the impact doesn't appear to be that hard): impacts don't increase the velocity of the characters above 20 units/s. 2018-04-18 17:24:10 +03:00
Joonas Rikkonen 9a8f13140e Cherry-picked [ab78991]: Rendering tiled sprites with scaling works correctly now (I think?), added option to edit the offset of structure textures 2018-04-17 14:06:40 +03:00
itchyOwl 7d31f0cdb6 Add a backing field with the default value Vector2.One for TextureScale. Clamp the values between 0.01 and 10 to keep them sensible. 2018-04-09 16:16:17 +03:00
itchyOwl 22c3af6af6 Enable editing of the texture scale of the structures. 2018-04-06 16:07:17 +03:00
itchyOwl e89fa0dc5c Add a todo note. 2018-04-06 11:51:52 +03:00
Joonas Rikkonen 738910e123 Fixed being able to gain karma by welding fixed walls 2018-03-09 12:47:14 +02:00
Joonas Rikkonen 8e8b8464af All items and structures have to define a sourcerect for the sprite because otherwise the dedicated server won't know the size of the entity. Closes #321 2018-03-06 13:55:30 +02:00
Joonas Rikkonen 0ab4521a7a Fixed monsters being able to spawn under the ocean floor. Closes #319 2018-03-06 12:13:08 +02:00
Joonas Rikkonen f5af432ad9 Fixed item tags & aliases not being taken into account when determining target validity in StatusEffect.Apply. Closes #316 2018-03-06 11:25:25 +02:00
Joonas Rikkonen b49f47d3d9 Ladder waypoint generation fix: waypoints are not just placed at the top and bottom of the ladders (and at hatches on the ladders), but above every platform along the ladders (-> waypoints work correctly on ladders spanning through multiple floors). + Some ladder climbing fixes in IndoorsSteeringManager. 2018-03-02 17:45:13 +02:00
Joonas Rikkonen 38e80be05d Some more debug logging 2018-02-28 18:04:40 +02:00
Joonas Rikkonen 9e2966e9cb - Fixed creature disable list only taking config files in the Content/Characters folder into account (making it impossible to disable spawning of custom monsters outside the folder)
- Removed hard-coded ruin structure, particle & decal config paths and moved them to content package (custom ones can be added now without modifying the original files).
2018-02-25 15:03:29 +02:00
Joonas Rikkonen f2f37b020e Applied fire extinguisher changes from the command-improvement branch: the repair tool steps through the ray that's used to find firesources in range and collects all firesources along the way instead of just checking the start and end positions of the ray (-> fires are much easier to extinguish now). Closes #274 2018-02-24 17:28:52 +02:00
Joonas Rikkonen 05408d5ec0 Fixed some items with a body disappearing when flipping a sub. Closes #273 2018-02-22 17:43:40 +02:00
Joonas Rikkonen 633dc1ff1e Option to define multiple compatible content packages in submarine files, added extension methods for parsing string, float and int arrays from XML elements 2018-02-06 10:18:39 +02:00
Joonas Rikkonen b4e5aad2ce Added "electromagnetic pulse strength" parameter to explosions. EMPs damage repairable power items (e.g. junction boxes) and discharge power containers (e.g. batteries and supercapacitors). 2018-02-02 15:15:46 +02:00
Joonas Rikkonen 98d0f42510 Fixed structure impact damage sounds. Character colliders caused the impact sounds to be triggered almost constantly, but the sounds were not played at the world position of the structure, causing them to only be heard inside ruins (whose positions are the same as worldpositions). 2018-01-26 17:25:22 +02:00
Joonas Rikkonen d4e0cbbf02 Submarines can't enter ruins through broken walls, ramming ruins causes damage to the sub and the ruin structures. Closes #199 2018-01-26 16:47:32 +02:00
Joonas Rikkonen 09e4687cd0 The content package a submarine was saved with is included in the submarine preview, added a warning when attempting to start a campaign using a sub with a mismatching content package 2018-01-25 12:19:47 +02:00