train_cmd.c
changeset 2752 55e04dee346d
parent 2704 bdf6ae0cb27c
child 2758 e962dd6c3ed4
equal deleted inserted replaced
2751:64b1c6305295 2752:55e04dee346d
    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) {