Page 1 of 1

Adding a delay isn't working

PostPosted: Saturday, 13th July 2013, 15:49
by pubby
I'm trying to add a delay to delay.cc. To do so, I've simply copy/pasted the other delay switch cases and changed the messages.

My problem is that when I try and run the new delay, it gets interrupted immediately every time. The interrupt appears to be a AI_MESSAGE one, coming from the delay's own progress messages. If I remove every progress 'mpr' call then the delay will run to completion. Even more confusing, the interruption message is being displayed before any of the progress messages:

  Code:
 Your buff removal was interrupted.
_You begin to remove your buff. You continue removing your buff.


The only files I've changed are delay.cc and enum.h. Everything else is identical to trunk. Here is my copy of delay.cc: http://pastebin.com/raw.php?i=NqWPSPnH

I've added the switch cases for DELAY_PERMABUFF.

Any ideas on how I can get a new delay working?

Re: Adding a delay isn't working

PostPosted: Saturday, 13th July 2013, 20:57
by pubby
Hmm, I think I have fixed it by changing default_activity_interrupts in initfile.cc:

  Code:
"interrupt_permabuff = interrupt_armour_on",


(I had assumed the default value would have worked, as I noticed earlier that not every delay had a line defined there)

I'm still kind of curious why the interruption message was being displayed before the other messages though. Is it related to how messages are buffered?