Feature #652
HandleSharingChange and its children
| Status: | New | Start date: | 2009-11-26 | ||
|---|---|---|---|---|---|
| Priority: | Normal | Due date: | |||
| Assignee: | - | % Done: | 50% |
||
| Category: | - | ||||
| Target version: | IS2.3 |
Description
Currently HandleSharingChange and the functions it calls are a little ugly to say the least. The main cause for this is that sharing changes make reserved paths etc invalid. This means that we e.g. don't know which tiles to unreserve when a train is deleted, so we have to check all tiles which is very expensive.
If we call this function while everything is still valid (reading the new settings in sharing_future), this could be done in a much nicer way.
Small code snippet as reminder to self:
CompanySharingSettingsEntry *settings_to_use = c->sharing_delay == 0 ? &c->sharing_future : &c->sharing_currrent;
History
#1 Updated by Hirundo over 3 years ago
- % Done changed from 0 to 50
The code restructuring is done, now it needs to be tested and debugged. This is (obviously and unfortunately) the hard part.
#2 Updated by Hirundo over 3 years ago
Reminder to self: Bankruptcy / takeover needs a lot of fixing too.
#3 Updated by Ammler over 3 years ago
- Target version deleted (
62)
#4 Updated by Hirundo over 3 years ago
- Target version set to IS2.3