I was about to go in and fix the code so that timers could be used on
non-corpses (they are ignored on anything else) when I came across
something a little disconcerting:
1. point_update calls update_char_objects for each character
2. update_char_objects calls update_object( obj, 2) for each item in
inventory and update_object( ch->carrying, 1)
3. the code for update_object is:
void update_object(struct obj_data * obj, int use)
{
if (GET_OBJ_TIMER(obj) > 0)
GET_OBJ_TIMER(obj) -= use;
if (obj->contains)
update_object(obj->contains, use);
if (obj->next_content)
update_object(obj->next_content, use);
}
Now, I know it's late at night and I'm getting a little bugeyed but I
see several problems here:
1. If obj->timer is 1, then this will set obj->timer to -1
2. Nothing is actually done with the object when the timer when it
reaches 0
3. If I add the fix I want to add, timers can go down by as many as 3
times per tick
Can someone please explain why this is here, what it was supposed to do,
and what the consequences of taking it out are?
Thanks
James
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
| Or send 'info circle' to majordomo@cspo.queensu.ca |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST