On Mon, 21 Jul 1997, Eduo - Tempus Fugit Pseudo Admin wrote:
>How would I go about making a command for forcing ticks (like 'dotick' or
>something), I'd use it for testing new commands and such...
>
>Is this easy to do (I figure it is, but I can't see any counterproductive
>results because of it).
This would be a rtfc but the code isn't exactly clear in this area.
From heartbeat() of comm.c:
if (!(pulse % (SECS_PER_MUD_HOUR * PASSES_PER_SEC))) {
weather_and_time(1);
affect_update();
point_update();
fflush(player_fl);
}
So whenever SECS_PER_MUD_HOUR * PASSES_PER_SEC has no remainder (ie: it's
time to go to the mud hour, or tick) the code calls the functions above.
So just make:
ACMD(do_tick)
{
weather_and_time(1);
affect_update();
point_update();
}
(You probly don't need to flush the player file at the same time.)
Nothing should go funny as this is what Circle does anyway.
-George
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST