Chaosforge Forum

DoomRL => Bug Reports => Topic started by: Steve on February 10, 2014, 19:04

Title: [0.9.9.7|G|Windows 7] teleporting level event struggles with too much lava
Post by: Steve on February 10, 2014, 19:04
I was on level 198 of Archangel of 666 ultraviolent when I got this bug.

Error:generator.OnTick --Call(generator.OnTick) Lua error :
lua\\events.lua:197: attempt to index local 'c' (a nil value) Press
Error writen to error.log, please report!
Error:generator.OnTick --Call(generator.OnTick) Lua error :
lua\\events.lua:197: attempt to index local 'c' (a nil value) Press
Error writen to error.log, please report!
Error:generator.OnTick --Call(generator.OnTick) Lua error :
lua\\events.lua:197: attempt to index local 'c' (a nil value) Press
Error writen to error.log, please report!
Error:generator.OnTick --Call(generator.OnTick) Lua error :
lua\\events.lua:197: attempt to index local 'c' (a nil value) Press
Error writen to error.log, please report!

The 'you seem to be targeted' level event was going on and I was using a nanomachic napalm launcher earlier to limit where the enemies could teleport to. I suspect this had to do with the error but I could be wrong.
I was able to continue on afterwards so at least it isn't game breaking. To be honest though, I was almost relived when it crashed, There was a brief moment of "Oh well, I guess I don't need to finish Ao666 anymore" before I discovered I could still move.
Title: Re: [0.9.9.7|G|Windows 7] teleporting level event struggles with too much lava
Post by: thelaptop on February 10, 2014, 19:07
I'm not surprised at this bug occurring.  I think that the "locate free space to teleport beings" code is the same as "locate free space to place items" code, and as Tormuse has handily demonstrated recently, the code is not so robust in such edge cases.

The only difference between your bug and the one Tormuse found was that beings already have a valid place to stand on, and so the game doesn't crash -- the teleport just fails to occur.  In Tormuse's case, the items have not appeared on map, and have no place to appear on, and so it crashes the game.

I should really try and test/fix these extreme cases before anyone else notices this limitation.

/me glares at Kornel
Title: Re: [0.9.9.7|G|Windows 7] teleporting level event struggles with too much lava
Post by: shark20061 on April 20, 2014, 11:24
Fixed for teleporting event, and I agree that the random coordinate finder could use some tweaking.