Jump to content

Can't get WalkTo action while walking even nothing in hand


Littlefat1213
  • Fixed

I'm grateful to Vito fixed the issue about Get Examine/WalkTo action when Rightclick over the mob with holding lightning spear . But it seems works in a wrong way even lasting till the Beta Branch ,  i can't pick walkto action even nothing holding in hand.

And i found the relative code has a tiny logical problem:

function PlayerActionPicker:GetSceneActions(useitem, right)
    local actions = {}

    useitem:CollectActions("SCENE", self.inst, actions, right)

    if useitem ~= self.inst then
        if not right and useitem.inherentsceneaction ~= nil then
            table.insert(actions, useitem.inherentsceneaction)
        elseif right and useitem.inherentscenealtaction ~= nil then
            table.insert(actions, useitem.inherentscenealtaction)
        end
    end

    local sorted_acts = self:SortActionList(actions, useitem)

    if #sorted_acts == 0 and
        useitem ~= self.inst and
        (self.inst.CanExamine == nil or self.inst:CanExamine()) and
        useitem:HasTag("inspectable") and
        (self.inst.sg == nil or self.inst.sg:HasStateTag("moving") or self.inst.sg:HasStateTag("idle")) and
        (self.inst:HasTag("moving") or self.inst:HasTag("idle")) then

		--@V2C: #FORGE_AOE_RCLICK *searchable*
		--      -Forge used to strip ALL r.click actions, so now we manually strip WALKTO action.
		if not right and self.inst.components.playercontroller:HasAOETargeting() then  
      -- (Here's my comment) Correct Logic: if not right or not self.inst.components.playercontroller:HasAOETargeting() then
			sorted_acts = self:SortActionList({ ACTIONS.WALKTO }, useitem)
		end
    end

    return sorted_acts
end

 


Steps to Reproduce

As Above

  • Like 2



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.


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...