ToME: the Tales of Maj'Eyal

Floating point error coming back from posessing
Page 1 of 1

Author:  Dracos [ Sat Feb 24, 2018 11:31 pm ]
Post subject:  Floating point error coming back from posessing

Got a bug on an addon, and while I am fixing, I think something is wrong upstream too.

From @notinferno

As Posessor, it's possible to get a bug where the game rests infinitely for mana while you have 0 regen.

Repro steps:
1. Start up a game as a posessor.
2. Acquire a mana-using talent from an escort or through the Lua Console with e.g.
game.player:learnTalent(game.player.T_PHASE_DOOR, true, 1)

3. At this point, no regen is displayed in the mana bar and resting still works normally even if you are missing mana.
4. Assume a form with some base mana regen (All your starting corpses have this, and maybe all monsters do? Not sure. )
5. Return to your normal form. Now, instead of not displaying regen, your mana bar shows your regen as "0.00".

After following these steps using the stone giant possessor form, mana regen is: 9.497e-17. I went ahead and put a guard for that in the add-on but it seemed likely that it was in core so I turned off my addon and repeated the steps and had the same result, instead of zero I end up with a regen of extremely tiny floating point value.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group