Commit Graph

1556 Commits

Author SHA1 Message Date
Joonas Rikkonen
a75fd12020 Started moving single player campaign logic to an abstract CampaignMode class to make it reusable in the eventual multiplayer campaign 2017-08-28 20:19:21 +03:00
Joonas Rikkonen
729108c7b9 Replaced usages of "shift" with "round" for consistency 2017-08-28 17:59:08 +03:00
Joonas Rikkonen
736de25e6c Fixed RangedWeapon launching projectiles in an incorrect rotation 2017-08-27 18:45:14 +03:00
Joonas Rikkonen
e7f4d1474e Fixed interact rects not being calculated correctly for subinventory slots, the tooltip of a parent item isn't shown when highlighting a contained item 2017-08-27 18:10:17 +03:00
Joonas Rikkonen
79f7ce7071 Revert "Characters that are outside are rendered under particles -> creatures can be hidden by smoke from hydrothermal vents. [65211ec]"
Caused characters to be rendered behind ruins, need to come up with a better solution
2017-08-27 14:34:11 +03:00
Joonas Rikkonen
37a5888126 - More small caves in levels.
- Groups of crawlers, mantises and husks can spawn inside the caves.
- Salvage mission variants where the artifact spawns inside a cave.
- Fixed ruins being placed inside the sea floor.
- MonsterEvents don't spawn the monsters if no suitable spawn position is found.
2017-08-27 13:40:47 +03:00
Joonas Rikkonen
362428280a Multiple particle emitters can be be attached to a background sprite, hydrothermal vents push characters and subs upwards, tweaked hydrothermal smoke particles & trigger positioning 2017-08-26 17:07:13 +03:00
Joonas Rikkonen
1a12f46708 All remaining physics bodies are removed at the end of submarine unloading (freeing debug bodyShapeTextures, etc). -> LevelTrigger bodies don't have to be removed separately during unloading 2017-08-24 20:30:10 +03:00
Joonas Rikkonen
65094a02c1 Hydrothermal vents emit sounds & being inside the smoke makes the camera shake 2017-08-24 20:25:17 +03:00
Joonas Rikkonen
4bdbf05875 - The range and volume of sounds emitted by StatusEffects can be changed and they can be set to loop.
- StatusEffect sounds are configured as child elements of the StatusEffect (instead of attributes).
- Background sprites can emit sounds.
2017-08-24 19:56:31 +03:00
Joonas Rikkonen
7186a8010a Fixed item pickup sounds playing during loading 2017-08-24 19:52:04 +03:00
Joonas Rikkonen
c2da3a6af4 - Added "LevelTriggers", areas that apply statuseffects and/or damage to entities. Atm can only be attached to background sprites.
- Moved background sprites to the shared project.
- The debug textures of physics bodies have a maximum size of 128x128 pixels to prevent large bodies from taking up excessive amounts of memory.
- Attacks can be set to only affect humans.
2017-08-23 20:37:30 +03:00
Joonas Rikkonen
2d1c00546f Reimplemented switching to repair & monster music types (now handled by SoundPlayer) 2017-08-23 14:42:24 +03:00
Joonas Rikkonen
f9504d0d76 Bunch of new level types, WIP hydrothermal vents 2017-08-22 21:12:29 +03:00
Joonas Rikkonen
6cf0f966aa Refactored event/task logic:
- Instead of configuring a commonness value and difficulty for an event and creating new random events until the maximum difficulty of the selected level is reached, the number of events per level can be configured directly (and overridden for specific level types).
- Removed task logic. The initial idea was to display the unfinished tasks to the player somehow and to use them as objectives for the AI crew, but those were scrapped and the tasks only ended up controlling which type of music to play. TODO: implement some kind of logic to determine when to play repair/monster music clips.
2017-08-22 21:12:06 +03:00
Joonas Rikkonen
65211ecbb6 Characters that are outside are rendered under particles -> creatures can be hidden by smoke from hydrothermal vents. 2017-08-22 19:06:29 +03:00
Joonas Rikkonen
15a31c5291 - The commonness of scripted events can be overridden for specific level types (e.g. some monsters can be set to spawn more frequently in specific types of levels).
- The sub can be moved from location to another in the map view by double clicking in debug builds.
- Level wall color can be changed in level generation parameters.
- Fixed level geometry not being rendered if the ocean floor is visible (which isn't a problem in most level types, but there can be levels where the ocean floor is so close to the actual level that they can both be visible at the same time).
- Background sprite scale is taken into account when calculating particle emitter positions.
- Fixed limb lights being rendered even if the character is disabled.
2017-08-22 19:04:49 +03:00
Joonas Rikkonen
d772049cc0 Particle fixes, background sprites can emit particles if the camera is within the area where the particles are visible 2017-08-22 15:41:23 +03:00
Joonas Rikkonen
cc40970b58 Separate ParticleEmitter & ParticleEmitterPrefab classes - the emission timer (and maybe some other values in the future) can't be in the prefab class because multiple objects may use the same prefab. 2017-08-20 22:05:30 +03:00
Joonas Rikkonen
04834f9f7f Background sprites can be set to spawn on the sea floor, particle emitters can be attached to background sprites 2017-08-20 19:07:07 +03:00
Joonas Rikkonen
4a460ff150 - The emission rate of ParticleEmitters can be set as particles per second (instead of particles per frame).
- Particles that are outside the sub aren't visible inside hulls even if they overlap with the sub.
- ParticleManager takes the movement of the particles into account when determining which particles to cull. For example, a particle that will move upwards can be emitted even if it's below the camera view.
2017-08-20 19:05:25 +03:00
Joonas Rikkonen
3c0f099448 Entities can be nudged with the arrow keys in the sub editor 2017-08-20 13:20:52 +03:00
Joonas Rikkonen
a6689b894d Map generation tweaking: some biomes are placed at the center of the map, some at the center and some randomly. 2017-08-20 13:20:23 +03:00
Joonas Rikkonen
8e71b4b828 Ocean floor is visible on sonar 2017-08-16 19:09:51 +03:00
Joonas Rikkonen
52a52cdfc7 Level biomes (basically a way of categorizing level generation parameters). The single player map is now divided into biomes, meaning that specific types of levels are generated at different areas of the map.
TODO: more variety between biomes, assign the map biomes in a less random way (e.g. splotches of easier biomes connected by more dangerous ones, very dangerous biomes at the edges of the map...), option to select the biome in MP?
2017-08-15 22:43:58 +03:00
Joonas Rikkonen
9c372137bd Added randomly generated ocean floors. Atm the bottom is too deep to reach in most levels and there's not much to explore down there, but the plan is to have some levels where the bottom or some of the bottom formations are reachable (because we need hydrothermal vents!).
Ice walls also use vertex colors now, could be used to add some cosmetic variety to the levels.
2017-08-15 19:20:21 +03:00
juanjp600
6fe9130dd8 Fixed crash when projectiles stuck to items on dedicated server
Report submitted by etet2, haven't tested it yet but I'm fairly certain this should fix the crash
2017-08-14 21:35:19 -03:00
Joonas Rikkonen
8691789974 ScalableFont uses a non-obsolete override of the SpriteBatch.Draw method, + minor optimization 2017-08-13 20:01:00 +03:00
Joonas Rikkonen
c7a357d84c Fix for exceptions when a human is targeting a removed entity while debugdraw is enabled, accessing AITarget position properties after the target has been destroyed doesn't throw an exception (but does log an error in debug builds). 2017-08-13 20:00:52 +03:00
Joonas Rikkonen
4d40f5d483 Submarines, items and characters that reach a depth of 300,000 units (~4000 m) are automatically disabled. Avoids the unnecessary cost of updating entities that are way too deep to be reached by anyone. 2017-08-13 20:00:18 +03:00
Joonas Rikkonen
98b4b904d4 Inventory slots are highlighted if the cursor is within 5 pixels of the rect. The spacing between inventory slots is 10 px, so now items can't be accidentally dropped by releasing the cursor between slots. 2017-08-11 17:49:43 +03:00
Joonas Rikkonen
75a4d641bf Medical scanner shows husk infections 2017-08-10 20:30:48 +03:00
Joonas Rikkonen
f40d244deb Moved inventory UI update logic to the client project, sound effects for picking up and dropping items 2017-08-10 20:30:29 +03:00
Joonas Rikkonen
fd844fd696 Option to make wearable sprites use the depth of the sprite instead of using the depth of the limb it's attached to 2017-08-10 18:19:06 +03:00
Joonas Rikkonen
b70f6fb3ca v0.6.1.4 2017-08-09 22:43:31 +03:00
Joonas Rikkonen
f7f738765b Fixed "collection was modified" exceptions when a huskified human is killed while enumerating the character list (e.g. when killed by an explosion) 2017-08-09 19:37:37 +03:00
Joonas Rikkonen
6eba16ff4e Fixed clients spawning monsters twice (first during mission/event initialization and again when the server notifies them about the spawning) 2017-08-08 23:03:26 +03:00
Joonas Rikkonen
a8ec821382 Handcuffed AICharacters can't climb ladders 2017-08-08 21:17:43 +03:00
Joonas Rikkonen
0159cc3f25 Submarine position syncing fix:
The position correction logic only moved the submarine that's being synced and the subs docked directly to it, but not the subs docked to the docked subs. This caused severe physics issues with some specific subs, for example mirrored HSE Kullervo Carriers tended to get launched downwards at a game-breaking speed.
2017-08-07 23:14:25 +03:00
Joonas Rikkonen
d0a1a8413b Fixed contained items applying status effects even if their condition is 0.0 (-> spent fuel rods can't be used in reactors anymore) 2017-08-07 19:37:19 +03:00
Joonas Rikkonen
a86a10b177 Fixed the spamchatmessages debug command 2017-08-03 19:29:53 +03:00
Joonas Rikkonen
264015346d Clients ignore messages about attaching an item to a wall if the item is not attachable, and don't drop the the items before attaching (because it disconnects all connected wires). The spamevents debug command didn't work correctly because of this, and I'd imagine that the latter could have caused wires to drop from some attached items when joining mid-round. 2017-08-03 19:29:27 +03:00
Joonas Rikkonen
3b6630562c Fixed ruin generator attempting to create walls with a negative width/height if a wall gets placed inside another room with either end of the wall exactly at the edge of the room (example seed: cBLgZ2im). 2017-08-02 18:02:02 +03:00
Joonas Rikkonen
6e95bbb524 Server log remembers the state of the filters and applies the filter when opened 2017-08-02 17:50:34 +03:00
Joonas Rikkonen
9c039e7574 Fixed exceptions during job assignment if a client or the host is controlling a character with no CharacterInfo (i.e. any non-human character) 2017-08-01 21:29:55 +03:00
Joonas Rikkonen
1e11d5ab28 Fixed server failing to assign jobs to all clients on some modded servers: if the max amount of players per job had been reached on all the jobs the client has in their preferences, the client would not get a job at all (causing crashes later on when trying to access the client's job). Now the server assigns a random job if none of the preferred jobs are available.
+ Fix for exceptions in Client constructor if there are less than 3 job prefabs.
2017-08-01 19:46:24 +03:00
Joonas Rikkonen
7553d63a99 Reverted 719f194 because it broke spawning items at world-space positions. Now the submarine-field of the body is simply set to match the item to make sure it gets rendered at the correct position. 2017-08-01 18:05:21 +03:00
Joonas Rikkonen
1bc2523269 Added some GPU info to the crash reports, all available debug console messages are included in the reports (not just the 15 latest ones), restart attempts caused by SharpDXExceptions are logged 2017-07-31 20:49:01 +03:00
Joonas Rikkonen
d5e2b202d1 Repair tools can be used on bodies with the CollisionLevel collision category (-> ruins can be cut again) 2017-07-31 18:00:36 +03:00
Joonas Rikkonen
6a96a0c801 v0.6.1.3 2017-07-31 17:59:27 +03:00