Abigail only has a fader component on the server, and this:
local function do_transparency(transparency_level, inst) inst.AnimState:OverrideMultColour(1.0, 1.0, 1.0, transparency_level) end
Doesn't sync to clients on its own.
Since point filtering is already synced, all you'd have to do is add the fader component on pristine state (skip dedicated servers as it's just visual) and make the dirty event for point filtering do the fader:Fade calls outside of dedicated servers.
Although in here:
local function DoGhostEscape(inst) if (inst.sg and inst.sg:HasStateTag("nocommand")) or (inst.components.health and inst.components.health:IsDead()) then return end if not inst:HasTag("gestalt_hide") then inst.components.fader:Fade(1.0, 0.3, 0.75, do_transparency) inst.components.aura:Enable(false) end inst.components.locomotor:SetExternalSpeedMultiplier(inst, "transparency", 1.25) inst:AddTag("notarget") inst._is_transparent = true inst.components.timer:StartTimer("undo_transparency", TUNING.WENDYSKILL_ESCAPE_TIME) inst.point_filtered:set(true) -- Pushing a nil target should cause anybody targetting Abigail to drop her. inst:PushEvent("transfercombattarget", nil) inst.components.combat:SetTarget(nil) inst.sg:GoToState("escape") end
Point filtering changing here should be inside the not inst:HasTag("gestalt_hide") check. Every other case of it is correct, but not this one.
Edit: bit above isn't relevant anymore as "gestalt_hide" is no longer a mechanic.
Edit: also realized that point filtering shouldn't be disabled right away when going from transparent to not transparent. As that also causes weird visual artifacts. As well as that it'd probably be a good idea to force stop fading whenever the dirty event is fired, to avoid mixing two.
This is how both syncing and not instantly disabling point filtering could look like:
-- if becoming transparent at all, enable point filtering from the get-go -- if doing the opposite, disable point filtering when done being transparent, to avoid weird visual artifacts local function OnFadeUndone(inst) inst.AnimState:UsePointFiltering(false) end local function OnPointFilterDirty(inst) -- stop ongoing fades to avoid weird mixing -- could happen if gestalt abigail gets hurt right after she stops hiding inst.components.fader:StopAll() local enable = inst.point_filtered:value() if enable then inst.AnimState:UsePointFiltering(true) end inst.components.fader:Fade(enable and 1.0 or 0.3, enable and 0.3 or 1.0, 0.75, do_transparency, not enable and OnFadeUndone or nil, "transparency") end -- in prefab constructor, in pristine state if not TheNet:IsDedicated() then inst:AddComponent("fader") inst:ListenForEvent("point_filtereddirty", OnPointFilterDirty) end
- Start a client hosted server (server with no caves).
- Use the escape command on Abigail or have Gestalt Abigail go below 25% health.
- Notice how she goes transparent as intended.
- Now host a server with caves, or join a server, and repeat the second step.
- Notice how there's no transparency changes.
A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now