(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
This commit is contained in:
@@ -832,7 +832,7 @@ static const SpriteGroup *VehicleResolveReal(const ResolverObject *object, const
|
||||
} else if (v->cargo_count == 0 || totalsets == 2) {
|
||||
set = 0;
|
||||
} else {
|
||||
set = v->cargo_count * (totalsets - 2) / max(1, v->cargo_cap) + 1;
|
||||
set = v->cargo_count * (totalsets - 2) / max((uint16)1, v->cargo_cap) + 1;
|
||||
}
|
||||
|
||||
return in_motion ? group->g.real.loaded[set] : group->g.real.loading[set];
|
||||
|
Reference in New Issue
Block a user