diff options
author | smatz <smatz@openttd.org> | 2009-02-16 01:57:55 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-02-16 01:57:55 +0000 |
commit | f65d70476b160dae26849ebcd7b7ae4dff3d7c2d (patch) | |
tree | a04f5032fb2bc9b967cb5dc91fe22f87154b78b3 /src | |
parent | 1f9ec758aac11f97458b6bb609fc44cf5ff5b086 (diff) | |
download | openttd-f65d70476b160dae26849ebcd7b7ae4dff3d7c2d.tar.xz |
(svn r15496) -Codechange: one division less in the train acceleration code
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 96c8691a5..c1437796d 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -506,7 +506,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode) if (mode == AM_ACCEL) { return (force - resistance) / (mass * 2); } else { - return min((-force - resistance) / mass, -10000 / mass); + return min(-force - resistance, -10000) / mass; } } |