Skip to content

Commit

Permalink
Fix bug that would prevent casting AoE
Browse files Browse the repository at this point in the history
Using special abilities from books or staves in The Forge were not
possible as the left click was disabled for them. An additional check if
an AoE is being targeted was added before cancelling the left click
action.
  • Loading branch information
mathielo committed Nov 10, 2018
1 parent 51755e2 commit 8866a3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion workshop/modinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = "Toggle the ability of walk by clicking while playing!\n\nWhat you
author = "dread3ddie"

--A version number so you can ask people if they are running an old version of your mod.
version = "0.2.2"
version = "0.2.3"

--This lets other players know if your mod is out of date. This typically needs to be updated every time there's a new game update.
api_version = 6
Expand Down
2 changes: 1 addition & 1 deletion workshop/modmain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local PlayerControllerPostConstruct = function(self)

self.OnLeftClick = function(self, down)
-- Only intercept if "down" and also if nothing is being placed
if down and (self.placer_recipe == nil or self.placer == nil) then
if down and (self.placer_recipe == nil or self.placer == nil) and not self:IsAOETargeting() then
local act = self:GetLeftMouseAction() or BufferedAction(self.inst, nil, ACTIONS.WALKTO, nil, TheInput:GetWorldPosition())
local mouseEntity = TheInput:GetWorldEntityUnderMouse()
local mousePointsAtPlayerOrNil = mouseEntity == nil or mouseEntity == self.inst
Expand Down

0 comments on commit 8866a3f

Please sign in to comment.