Angband Forums

Angband Forums (
-   Development (
-   -   food breakage (

eastwind January 21, 2020 23:22

food breakage
I was messing around a little with ammunition breakage and had a breakpoint set in player-attack.c:breakage_chance().

Imagine my surprise when I ate some food and hit my breakpoint!?

eastwind January 22, 2020 04:34

It turns out that routine is called lots of times. For example I hit the breakpoint when casting a spell, after selecting the book, before even selecting the spell, i.e. after "ma". It's called from some swiss-army-knife routine that's trying to be lots of different things for different callers. Most of the time the breakage chance looked up is never used.

But it's all working as coded....

All times are GMT +1. The time now is 19:01.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.