Adding a delay isn't working


Questions, Explanations, Howtos

User avatar

Crypt Cleanser

Posts: 689

Joined: Sunday, 3rd June 2012, 13:10

Post Saturday, 13th July 2013, 15:49

Adding a delay isn't working

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?
Dearest Steve
thanks for the gym equipment
the plane crashed
User avatar

Crypt Cleanser

Posts: 689

Joined: Sunday, 3rd June 2012, 13:10

Post Saturday, 13th July 2013, 20:57

Re: Adding a delay isn't working

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?
Dearest Steve
thanks for the gym equipment
the plane crashed

Return to Coding

Who is online

Users browsing this forum: No registered users and 12 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.