DG Scripts bug fixes (#44)
* Increase ID space DG Scripts uses tiny idspace that results in wacky bugs when the mud is running too long. * Overhaul script ids All references to GET_ID(ch/obj) were removed and replaced by char_script_id() and obj_script_id(), which don’t assign ids until they are needed. The ch->id and obj->id variable names were changed to script_id to prevent accidental errors for future programmers. This change greatly increases how long the mud can run before it runs out of ID space. * Fix extraction count This prevents an error log where it has over-counted the extractions pending. It now behaves correctly when the same mob is %purge%’d or extract_char()’d twice.
This commit is contained in:
@@ -64,7 +64,7 @@ static int update_all_objects(struct obj_data *refobj)
|
||||
*obj = *refobj;
|
||||
|
||||
/* Copy game-time dependent variables over. */
|
||||
GET_ID(obj) = swap.id;
|
||||
obj->script_id = swap.script_id;
|
||||
IN_ROOM(obj) = swap.in_room;
|
||||
obj->carried_by = swap.carried_by;
|
||||
obj->worn_by = swap.worn_by;
|
||||
|
||||
Reference in New Issue
Block a user