Skip to content

Commit 404392e

Browse files
Added function to remove buildings from the stored suit blocks
1 parent bef69cf commit 404392e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

panda/src/toontown/dna/dnaStorage.cxx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ PT(DNASuitPoint) DNAStorage::store_suit_point(DNASuitPoint::DNASuitPointType typ
167167
// Create a new one
168168
int index = get_highest_suit_point_index() + 1;
169169
PT(DNASuitPoint) point = new DNASuitPoint(index, type, pos);
170-
// Ok, now actually store the point
171-
store_suit_point(point);
170+
// Ok, now actually the point
171+
_suit_point(point);
172172
return point;
173173
}
174174

@@ -387,6 +387,15 @@ void DNAStorage::store_suit_block(const int block_number, const std::string& dep
387387
_suit_blocks_map[block_number] = dept;
388388
}
389389
////////////////////////////////////////////////////////////////////
390+
// Function: remove_suit_block
391+
// Access: Public
392+
// Description: Remove a block number in the SuitBlocks map + num_floors counterpart
393+
////////////////////////////////////////////////////////////////////
394+
void DNAStorage::remove_suit_block(const int block_number) {
395+
_suit_blocks_map.erase(block_number);
396+
_suit_block_num_floors_map.erase(block_number);
397+
}
398+
////////////////////////////////////////////////////////////////////
390399
// Function: store_suit_block_num_floors
391400
// Access: Public
392401
// Description: Store a block number in the SuitBlockFloorsMap

0 commit comments

Comments
 (0)