MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ResetRefit

Method ResetRefit

src/linkgraph/refresh.cpp:123–130  ·  view source on GitHub ↗

* Restore capacities and refit_capacities as vehicle might have been able to load now. */

Source from the content-addressed store, hash-verified

121 * Restore capacities and refit_capacities as vehicle might have been able to load now.
122 */
123void LinkRefresher::ResetRefit()
124{
125 for (auto &it : this->refit_capacities) {
126 if (it.remaining == it.capacity) continue;
127 this->capacities[it.cargo] += it.capacity - it.remaining;
128 it.remaining = it.capacity;
129 }
130}
131
132/**
133 * Predict the next order the vehicle will execute and resolve conditionals by

Callers 1

RefreshLinksMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected