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 | 26cdcb2dd573586a2350b0e71c8bb0f28394349f (patch) | |
tree | a04f5032fb2bc9b967cb5dc91fe22f87154b78b3 | |
parent | 6381cbeeaeb41975aedc1e6d350c99f3cc488044 (diff) | |
download | openttd-26cdcb2dd573586a2350b0e71c8bb0f28394349f.tar.xz |
(svn r15496) -Codechange: one division less in the train acceleration code
-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; } } |