equal
deleted
inserted
replaced
34 /** |
34 /** |
35 * Recalculates the cached weight of a train and its vehicles. Should be called each time the cargo on |
35 * Recalculates the cached weight of a train and its vehicles. Should be called each time the cargo on |
36 * the consist changes. |
36 * the consist changes. |
37 * @param v First vehicle of the consist. |
37 * @param v First vehicle of the consist. |
38 */ |
38 */ |
39 void TrainCargoChanged(Vehicle* v) |
39 static void TrainCargoChanged(Vehicle* v) |
40 { |
40 { |
41 Vehicle *u; |
41 Vehicle *u; |
42 uint16 weight = 0; |
42 uint16 weight = 0; |
43 |
43 |
44 for (u = v; u != NULL; u = u->next) { |
44 for (u = v; u != NULL; u = u->next) { |