> to temporarily set a bit on a room if something else is true. For > example: I want to make a NOMAGIC flag for objects. I want any room that > the nomagic object is in to be flagged NOMAGIC as long as the object is > in that rom, and then remove the bit when the object is removed. Instead of doing that, why not make a function called obj_in_room(int room_vnum, int item_flag) and then loop through world[real_room(room_vnum)].contents , to see if any of the objects have that flag set. If you call this function a LOT, it might be more time consuming than having another flag, but it's a lot easier to code- you don't have to account for every possible way an object can get into a room, and you don't have to allocate the valuable room bits for this. This is off the top of my head so it might not be all correct, but I hope you get the idea. Brian Pape bpape@ezl.com Reign of Towers
This archive was generated by hypermail 2b30 : 12/07/00 PST