obj->serial and related stuff

Posted by Samson on Thu 02 Oct 2003 06:09 PM — 3 posts, 8,529 views.

USA #0
In the same vein as the thread on cur_char, another admin I was talking to about this stuff brought up the subject of cur_obj, cur_obj_serial, and other related material.

Near as I can figure, it's used in much the same way when checked by the obj_extracted function. The function set_cur_obj is called in 3 places, 2 of which are combat damage related. The 3rd is in the main obj_update loop in update.c. This seems logical enough that it could be safely removed.

This is my question though. He removed in addition to that, everything covering the obj->serial *ADN* obj->pIndexData->serial. Complete removal of the object serials in other words. Apparently doing so cause him no harm whatsoever and everything is resetting right where it should be and in the quantities asked for. His obj_progs also still work as expected.

What I want to know is was that a good idea? Are there any hidden pitfalls one could see arising from this? I'm inclined to think there aren't or his mud would most likely have melted in seconds. :)
Canada #1
As far as I can tell, serial does nothing but add extra checks. Yhere is some definitions of obj->serial into the global codes, but I cannot find anything actually useful for them. There are still remnants of potions, scrolls, and wands in the SWR code, and each of these have to do with the obj->serial. I'm going to rip this part out of mine, anyways, and likely all of it, unless someone comes up with something valid for them to do.
USA #2
Well, my examination of it led me to the conclusion that obj->serial was an elaborate bug finding system for extracted objects. I at this point believe that they found the bugs they were looking for and just left the checks in place for some reason. Either as a safety net for themselves, or because they were as lazy as I am about stuff like that and just didn't bother to remove it. :)

In any case I took this out, mainly on trust of Remcon's assessement that it did no harm to him, and so far it hasn't mattered to us either.

If there was any other purpose for it, I wasn't able to find it.