mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix loading item temp files (#245)
Call PruneWorldItems() before sectorinfo gets written to the save file. Resetting the SF_ITEM_TEMP_FILE_EXISTS would not transfer correctly into the save file.
This commit is contained in:
@@ -149,6 +149,11 @@ void PruneWorldItems(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
auto x = gAllWorldItems.sectors[i].x;
|
||||
auto y = gAllWorldItems.sectors[i].y;
|
||||
auto z = gAllWorldItems.sectors[i].z;
|
||||
ReSetSectorFlag(x, y, z, SF_ITEM_TEMP_FILE_EXISTS);
|
||||
|
||||
gAllWorldItems.sectors.erase(gAllWorldItems.sectors.begin() + i);
|
||||
gAllWorldItems.NumItems.erase(gAllWorldItems.NumItems.begin() + i);
|
||||
gAllWorldItems.Items.erase(gAllWorldItems.Items.begin() + i);
|
||||
|
||||
Reference in New Issue
Block a user