Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 21, 2020, 22:22   #1
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
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 is offline   Reply With Quote
Old January 22, 2020, 03:34   #2
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
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....
eastwind is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Food and weight fph Idle chatter 3 April 13, 2017 15:14
Food consumption vs magic hein Vanilla 3 January 26, 2017 23:25
Why is food needed? stabbo Vanilla 45 December 20, 2010 22:49
Lack of food AR_chie Variants 10 October 7, 2008 07:40
Savefile breakage happening soon takkaria Vanilla 11 May 17, 2008 18:04


All times are GMT +1. The time now is 14:05.


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