… | |
… | |
1057 | * |
1057 | * |
1058 | */ |
1058 | */ |
1059 | int |
1059 | int |
1060 | load_object (object_thawer &fp, object *op, int map_flags) |
1060 | load_object (object_thawer &fp, object *op, int map_flags) |
1061 | { |
1061 | { |
1062 | // cede every 500 objects loaded |
1062 | coroapi::cede_every (1000); // cede once in a while |
1063 | coroapi::cede_every (500); |
|
|
1064 | |
1063 | |
1065 | return parse_object (op, fp, map_flags); |
1064 | return parse_object (op, fp, map_flags); |
1066 | } |
1065 | } |
1067 | |
1066 | |
1068 | /* This takes a buffer, scans it for variables, and sets those variables |
1067 | /* This takes a buffer, scans it for variables, and sets those variables |
… | |
… | |
1440 | * the only place this is not set is when saving the player. |
1439 | * the only place this is not set is when saving the player. |
1441 | */ |
1440 | */ |
1442 | void |
1441 | void |
1443 | save_object (object_freezer &fp, object *op, int flag) |
1442 | save_object (object_freezer &fp, object *op, int flag) |
1444 | { |
1443 | { |
1445 | // cede every 500 objects saved |
|
|
1446 | coroapi::cede_every (500); |
|
|
1447 | |
|
|
1448 | /* Even if the object does have an owner, it would seem that we should |
1444 | /* Even if the object does have an owner, it would seem that we should |
1449 | * still save it. |
1445 | * still save it. |
1450 | */ |
1446 | */ |
1451 | if (op->owner) |
1447 | if (op->owner) |
1452 | return; |
1448 | return; |