[General] - Custom (mod) remote left click action not working due to typo


Recommended Posts

Bug Submission:

Category: General

Issue Title: Custom (mod) remote left click action not working due to typo

Issue Description: Within the method PlayerController:OnRemoteLeftClick, found in components/playercontroller.lua, we have

lmb =  (lmb == nil and                actioncode == ACTIONS.WALKTO.code and                mod_name == nil and                BufferedAction(self.inst, nil, ACTIONS.WALKTO, nil, position))            or (lmb ~= nil and                lmb.action.code == actioncode and                lmb.action_mod_name == mod_name and                lmb)            or (rmb ~= nil and                rmb.action.code == actioncode and                rmb.action_mod_name == mod_name and                rmb)            or nil

Note the 'lmb.action_mod_name' and 'rmb.action_mod_name'. The underscore before 'mod_name' should be a period. Because of this, remotely sent left click action with a non-nil mod_name field don't work.

Steps to Reproduce: > Be a modder.

> Write a mod with custom actions.

> Set up such action as a component action triggered by a left click.

> Join modded game as client.

> Left click entity where such action should be triggered.

> ???

> Profit.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.