void room_update(void)
{
ROOM_INDEX_DATA *room;
// set initial room vnum to 1, via limbo.
for ( room = get_room_index(ROOM_VNUM_LIMBO); room != NULL; room->next_room)
{
if(RTIMER(room,RTIMER_FLAME) > 1)
{
RTIMER(room,RTIMER_FLAME) = RTIMER(room,RTIMER_FLAME) - 1;
room_message(room,"The intensity of the flames diminish slightly.");
}
room_message(room, "Flame out.");
}
return;
}
void room_update(void)
{
ROOM_INDEX_DATA *room;
// set initial room vnum to 1, via limbo.
for ( room = get_room_index(ROOM_VNUM_LIMBO); room != NULL; room->next_room)
{
// update rooms with flame
if(RTIMER(room, RTIMER_FLAME) > 1)
{
RTIMER(room,RTIMER_FLAME)–;
if (RTIMER(room, RTIMER_FLAME))
room_message(room,"The flames diminish slightly.");
else
room_message(room, "The flames die out.");
}
// end update rooms with flame
} // end room update
}
void add_flame( CHAR_DATA *ch, long direction )
{
if (IS_NPC(ch)) return;
if (IN_WILDERNESS(ch->in_room->vnum)) return;
if(IS_DEMON(ch) && get_lore(ch,LORE_FUNDAMENT) > 1)
{
SET_RTIMER(ch->in_room, RTIMER_FLAME, 10);
send_to_char("You set a fire as you leave the room.\n\r",ch);
}
return;
}
void room_update(void)
{
ROOM_INDEX_DATA *room;
// set initial room vnum to 1, via limbo.
for ( room = get_room_index(ROOM_VNUM_LIMBO); room != NULL; room = room->next_room)
{
log_string("Room_update"); // It does post a log at this point, then that is it… nothing else beyond.
// update rooms with flame
if(RTIMER(room, RTIMER_FLAME) > 1)
{
log_string("Checking the room!");
RTIMER(room,RTIMER_FLAME)–;
log_string("RTIMER_FLAME - 1");
if (RTIMER(room, RTIMER_FLAME))
room_message(room,"The flames diminish slightly.");
else
room_message(room, "The flames die out.");
}
// end update rooms with flame
} // end room update
}
void room_update(void)
{
int vnum;
ROOM_INDEX_DATA *room;
for (vnum = 1; vnum < 45000; vnum++)
if(( room = get_room_index(vnum)) != NULL)
{
if(room->tick_timer[RTIMER_FLAME] > 1)
{
room->tick_timer[RTIMER_FLAME]–;
log_string("Reduced the timer."); // debug statement.
}
if(room->tick_timer[RTIMER_FLAME] == 1)
{
room->tick_timer[RTIMER_FLAME] = 0;
room_message(room, "The flames extinguish themselves");
}
}
return;
}
I am trying to add a room_update function to a godwars derivative. The code compiles cleanly, and there are no
crashes because of it. Only issue is, the update does not function.
Any thoughts or help, would be appreciated.
Jareth