After recent update (ver 436978), laststartattacktime of combat component will be set to nil when Combat:CancelAttack() was called.
In crittersbrain.lua line 115, owner_combat.laststartattacktime is passed to math.max as the first param, it caused the following crash.
[02:01:05]: [string "scripts/brains/crittersbrain.lua"]:115: bad argument #1 to 'max' (number expected, got nil)
LUA ERROR stack traceback:
scripts/brains/crittersbrain.lua:115 in (upvalue) _avoidtargetfn (Lua) <87-120>
self =
And combat.laststartattacktime is also used in some stategraphs without determining whether it is nil:
[02:52:29]: [string "scripts/stategraphs/SGshadowcreature.lua"]:75: attempt to perform arithmetic on field 'laststartattacktime' (a nil value)
LUA ERROR stack traceback:
scripts/stategraph.lua:505 in (method) GoToState (Lua) <456-515>
I believe that there also be other scripts have this issue.
Steps to Reproduce
First, get a critter pet.
Then try to force attack some creatures such as pigman, but cancel this action immediately.
Walks to your pet to let it get out of the way, the game will crash.
- 2
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