Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   food breakage (http://angband.oook.cz/forum/showthread.php?t=9789)

eastwind January 21, 2020 22: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 03: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 13:14.

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