mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r10287) -Fix (r10266): some surprises from that (almost always) complaining compiler...
This commit is contained in:
parent
b5a9cc0ed8
commit
37e3cbb980
@ -1586,7 +1586,7 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
|
|||||||
if (_patches.gradual_loading) cap = min(cap, load_amount);
|
if (_patches.gradual_loading) cap = min(cap, load_amount);
|
||||||
if (_patches.improved_load) {
|
if (_patches.improved_load) {
|
||||||
/* Don't load stuff that is already 'reserved' for other vehicles */
|
/* Don't load stuff that is already 'reserved' for other vehicles */
|
||||||
cap = min(cargo_left[v->cargo_type], cap);
|
cap = min((uint)cargo_left[v->cargo_type], cap);
|
||||||
cargo_left[v->cargo_type] -= cap;
|
cargo_left[v->cargo_type] -= cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ int GetRoadVehImage(const Vehicle* v, Direction direction)
|
|||||||
}
|
}
|
||||||
|
|
||||||
image = direction + _roadveh_images[img];
|
image = direction + _roadveh_images[img];
|
||||||
if (v->cargo.Count() >= v->cargo_cap / 2) image += _roadveh_full_adder[img];
|
if (v->cargo.Count() >= v->cargo_cap / 2U) image += _roadveh_full_adder[img];
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ int GetTrainImage(const Vehicle* v, Direction direction)
|
|||||||
|
|
||||||
base = _engine_sprite_base[img] + ((direction + _engine_sprite_add[img]) & _engine_sprite_and[img]);
|
base = _engine_sprite_base[img] + ((direction + _engine_sprite_add[img]) & _engine_sprite_and[img]);
|
||||||
|
|
||||||
if (v->cargo.Count() >= v->cargo_cap / 2) base += _wagon_full_adder[img];
|
if (v->cargo.Count() >= v->cargo_cap / 2U) base += _wagon_full_adder[img];
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user