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

Method Reduce

src/cargopacket.cpp:120–125  ·  view source on GitHub ↗

* Reduce the packet by the given amount and remove the feeder share. * @param count Amount to be removed. */

Source from the content-addressed store, hash-verified

118 * @param count Amount to be removed.
119 */
120void CargoPacket::Reduce(uint count)
121{
122 assert(count < this->count);
123 this->feeder_share -= this->GetFeederShare(count);
124 this->count -= count;
125}
126
127/**
128 * Invalidates (sets source_id to INVALID_SOURCE) all cargo packets from given source.

Callers 2

TruncateMethod · 0.80
PostprocessMethod · 0.80

Calls 1

GetFeederShareMethod · 0.95

Tested by

no test coverage detected