Jump to content

Abigail transparency changes don't sync to clients


hoxi
  • Fixed

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

 


Steps to Reproduce
  • 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.



User Feedback


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.

This is marked as fixed, but it wasn't fixed in 651259.

Transparency is still not synced to clients at all, and everything about point filtering and fader mentioned here is still the same. These issues need to be looked at again.

On the other hand, the escape ability states have been smoothed out a bit more, but there's a few issues to iron out, see here!

Edited by hoxi

Share this comment


Link to comment
Share on other sites

On 1/2/2025 at 3:21 PM, Jason said:

Changed Status to Fixed

Oh, I realized now that the post isn't being followed (outside of by myself) so I probably should've quoted you here to make sure it reaches you.

The issues mentioned here haven't been addressed, please read my comment above this one.

Share this comment


Link to comment
Share on other sites



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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...