Commit Graph

80 Commits

Author SHA1 Message Date
itchyOwl
b86b8cd377 Use a single method with optional parameters for drawing tiled textures. 2018-04-06 11:54:41 +03:00
Joonas Rikkonen
3f8ead6ad2 Name tag and healthpor positions are clamped inside the hull a character is inside. Closes #158 2018-03-09 19:16:38 +02:00
Joonas Rikkonen
da7ea779b7 LOS effect optimization/changes:
- Rendering the shadows instead of light volumes to avoid the expensive raycasts needed to calculate the light volume.
- The LOS shadows are now rendered in two passes (fully obscured + penumbra) instead of each convex hull taking up 2 passes.

TODO: fix linux
2018-03-03 21:57:36 +02:00
Joonas Rikkonen
10189254b5 GrabLimb type is written in character network messages as byte instead of UInt16 2018-03-01 23:43:10 +02:00
Joonas Rikkonen
48757618f6 Renamed the "file" attribute of hit sounds to "tag", replaced footstep sound paths in creature configs with tags. 2018-02-24 21:13:21 +02:00
Joonas Rikkonen
eaafc022f2 Fixed Ragdoll.ImpactProjSpecific attempting to play limb/wearable hitsounds even if the sound tag is empty, wearable items can cause hit sounds to be played even if the limb has no hit sound configured. Closes #280 2018-02-24 20:55:30 +02:00
Joonas Rikkonen
7044631901 Attempt to diagnose null reference exception during Ragdoll drawing (see #278) 2018-02-23 11:09:17 +02:00
Joonas Rikkonen
60ad5ed3fb Reverted b26b6a74. Making stunned characters receive damage from limb impacts caused them to suffer excessive amounts of damage when falling or getting thrown around when the sub hits something (e.g. a moloch attacking a sub could easily kill crew members by bumping the sub and falling down the stairs was often a death sentence). In general I don't think it's a good idea to apply impact damage from limb impacts, because the limbs may occasionally move or rotate at very high velocities due to the animations. 2018-02-05 11:16:03 +02:00
Joonas Rikkonen
67d6bf6a1d Fade out names and health bars when the cursor is not hovered over the character. Closes #218 2018-02-01 11:26:47 +02:00
Joonas Rikkonen
69337cd9e3 Merge branch 'master' of https://github.com/Regalis11/Barotrauma 2018-01-31 19:02:03 +02:00
Joonas Rikkonen
dcb6de32c0 Some more hard-coded text removal 2018-01-31 19:01:48 +02:00
Joonas Rikkonen
80ce2ae6ae Fixed the game running for one more frame after the debugconsole is opened, and staying paused for one extra frame after closing it. Caused the mouselook distance to lerp back from zero after toggling the console. 2018-01-29 10:27:43 +02:00
Joonas Rikkonen
9a095e259a Fixed mouselook distance calculations (the previous method allowed looking further when looking at stairs or platforms), mouselook is disabled when character control is disabled, speech bubbles appear also on the controlled character 2018-01-26 10:59:53 +02:00
Joonas Rikkonen
e6e132aa1e More gib particles when characters get crushed by pressure 2018-01-25 13:56:39 +02:00
Joonas Rikkonen
43d48ceb13 Fixed subinventory becoming active in the controlled character's inventory when the slot with the same index is highlighted in a grabbed character's inventory (or vice versa), fixed CPR & grab buttons being drawn on top of subinventories 2018-01-25 09:36:58 +02:00
Joonas Rikkonen
0f7befa09e Fixed occasional invalid object header errors when attempting to send a status NetworkEvent for a character (easy way to reproduce was to kill multiple characters during the same frame with an explosion). 2018-01-16 17:02:01 +02:00
Joonas Rikkonen
03bff643f8 More hard-coded text removal, fixed StatusHUD displaying husk infection state incorrectly 2018-01-12 13:17:22 +02:00
Joonas Rikkonen
47f9900fdc Lighting fixes:
- Re-enabled lightsprites (glowing lamp sprites on lamps).
- Limb sprites use lightsprites instead of overriding the texture (positioned correctly now).
- Fixed lights that don't cast shadows not being rendered.
2018-01-11 11:23:55 +02:00
Joonas Rikkonen
55e96b315f Fixed compiler error in Limb.cs 2018-01-09 12:27:09 +02:00
Joonas Rikkonen
7187c277e7 Merge branch 'master' into moStuff 2018-01-09 10:38:06 +02:00
Joonas Rikkonen
c77c598cb6 Fixed items being dropped when attempting to place them in an itemcontainer slot that's on a normal inventory slot. Closes #200 2017-12-31 01:59:49 +02:00
Alex Noir
32a2b38112 Removed DamageSoundType and replaced it with a string "tag" instead to allow mod creators to create custom damage sounds
Fixed damagemodifier sounds being completely ignored due to a variable misname
Added structure damage possibility for melee weapons so you can break down windows with a crowbar in spectacular fashion (it's clearly a very inferior method to plasma cutters though)
Clown hitsounds are in now which is awesome. Beat up some clowns!
2017-12-30 13:46:59 +03:00
Joonas Rikkonen
bcd2582cf9 - More gore particles when severing limbs!
- Explosions can sever limbs even if the target character is dead. Now explosive projectiles can explode creatures into pieces even if the creature dies of the initial projectile impact and not the explosion.
- Disabled blood particles on carriers and fractal guardians.
2017-12-29 21:06:11 +02:00
Alex Noir
2cb0ee73be Adds footstep sound variety, makes diving and clown suits have unique footstep sounds!
https://puu.sh/yQ8fs/61e12f15c6.webm
TODO: Get rid of the "damagesoundtype" system and replace it with simple "tag" checking to allow customizability from content pack side
Fix damagemodifier sounds never being played (I've never once heard LimbArmor play on anything but mantis)
2017-12-29 17:41:18 +03:00
Joonas Rikkonen
a8749f3d87 Fixed characters dragging husks by their tongue when GrabLimb is set to None, removed hardcoded texts from the grab button. Closes #210 2017-12-29 15:51:37 +02:00
Joonas Rikkonen
b84c965be3 More AI fixes/improvements:
- AI characters can refuel the reactor when needed.
- AIObjectiveContainItem.CanBeCompleted returns true if the target item cannot be obtained or if the container cannot be reached.
- AI characters only weld leaks that are part of some submarine (i.e. not ruins).
2017-12-28 19:44:48 +02:00
Joonas Rikkonen
ccda925623 Fixed order option buttons ("power up", "fire at will", etc) not working in the crew commander menu due to being outside their parent GUIComponent 2017-12-28 12:47:48 +02:00
Joonas Rikkonen
2894b74edc Started moving hard-coded texts to a separate xml file (Content/Texts.xml) to make modding and translating the game easier (see #80). Also Renamed InfoTextManager as TextManager. 2017-12-26 23:51:18 +02:00
juanjp600
c593fdb7c6 Minor networking fixes
- Don't spam the shit out of status updates (TODO: send update
immediately on drastic changes)
- Fixed some potential message misreading
- Readded homoglyph name comparison
2017-12-21 16:00:04 -03:00
juanjp600
07626a1989 Merge branch 'master' of https://github.com/Regalis11/Barotrauma
Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs
2017-12-20 19:46:53 -03:00
juanjp600
7a413aee93 Optimized GameScreen.DrawMap
- Downscaled lightmap, since blurring will make this unnoticeable anyway
(TODO: make this optional)
- Render LOS in fewer passes by using a shader
- Use light volume to calculate LOS
- This also means we can use the override texture to render the diving
suit obstruct effect
- Don't render bunks and labels onto LOS background (TODO: add the
option to render back into the LOS background, i.e. just use
multiplicative blending as if it was the lightmap)
- Prefer SpriteSortMode.Deferred over all others, prefer
SamplerState.LinearClamp/PointClamp over all others
- Remove shader blur in favor of geometry blur (TODO: improve on this
further, right now it has a few artifacts)
- Trim light volumes
- Do some weird shit with the background particles (use DrawTiled
instead of relying on SamplerState.LinearWrap, because that's faster
somehow :/ )
- Pressing up/down in the console only returns a typed command now
2017-12-20 19:41:23 -03:00
Joonas Rikkonen
dde320b387 Merge pull request #101 from Crystalwarrior/moRags
Body shoulder-grab, better CPR anims, CPR and Crit overhaul!
2017-12-20 19:37:38 +02:00
Joonas Rikkonen
26503a975c Fixed sub->sub and outside->sub visibility checks when determining name tag visibility. 2017-12-17 22:34:24 +02:00
Alex Noir
e5c49d929d Fixed ragdolling and grab-type switching in singleplayer 2017-12-17 23:13:50 +03:00
Alex Noir
9e307d8302 Merge branch 'master' into moRags 2017-12-17 22:58:16 +03:00
Joonas Rikkonen
6127bb473d - Moved character nametag visibility culling to the update method (doesn't make sense for the update rate to be tied to rendering framerate).
- Name tags on characters that are outside the camera view are automatically hidden to avoid the costly visibility checks.
- If the controlled character or the target has no head, the visibility check is done based on the position of the torso.
- Fixed sub->outside visibility checks.
- Fixed invalid attributes in the flashlight config.
2017-12-17 21:47:03 +02:00
Alex Noir
1e5b25bd1a Merge branch 'master' into moRags 2017-12-17 22:41:45 +03:00
Alex Noir
041d1112b8 Added a timer to the raycasts so it's not screwing over performance too hard 2017-12-17 21:35:19 +03:00
Alex Noir
4f7c805a9c Hide character names/health/etc. if you can't see their head or it doesn't exist.
TODO: use Line of Sight instead of CheckVisibility
2017-12-17 15:17:15 +03:00
Alex Noir
bdeb3a19fd Updated server logs so admins can see disguised persons
clientist should also display stuff
TODO: Log inventory interactions like putting item in slots (e.g. oxy mask equipped in Head slot or equipped in Any slot, etc.) so you can tell the exact moment someone decided to disguise themselves.
2017-12-16 20:24:24 +03:00
Alex Noir
bd646fb23e Implements identity system! If your mask hides your face (e.g. oxygen mask, clown mask and diving suit), the game will either use the name of the ID card owner in your ID card slot or will give you a "?" name.
This only affects "DisplayName". The reason why I can't completely override the .Name for the client from server is due to how crew manifest and CharacterInfo classes are handled - it would require a major rework of many Character-related systems and interactions to truly make this "hack-proof".
Server hosts will have to stay on their toes I guess.
2017-12-16 19:52:25 +03:00
juanjp600
c4e894cb2e Fixed camera going insane when dropping through hatches
TODO: make the game less rubberbandy
2017-12-12 21:08:37 -03:00
juanjp600
23b220b6af Sync character collider rotation, try to make collider face the main limb by instantly flipping it if the angle's too wide, client-side ragdoll correction is more aggressive 2017-12-12 17:58:49 -03:00
Alex Noir
de7489db8b Change int to UInt32 for grabLimb networking
Fixed IsRagdolled state networking
2017-12-08 20:55:46 +03:00
Alex Noir
286f290e57 Fixed networking 2017-12-08 15:32:37 +03:00
Alex Noir
8788efa007 Merge remote-tracking branch 'origin/master' into moRags 2017-12-08 14:43:56 +03:00
Alex Noir
fff8d714fe I THINK this is all that needs to be done to network it...right? 2017-12-08 14:09:09 +03:00
Alex Noir
48fb3d58b9 Let players choose to grab onto the body's torso!
Better CPR animations
todo: network the limb targeting
2017-12-08 13:47:27 +03:00
juanjp600
26216a0d99 Fixed fish being selectable
Closes #91
2017-12-07 00:01:48 -03:00
juanjp600
a272d22de8 Players can now pick up corpses to eat them 2017-12-06 17:57:58 -03:00