summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-02-05 04:48:56 +0000
committerbelugas <belugas@openttd.org>2008-02-05 04:48:56 +0000
commit3003986e6777c79a992ecb21b7f908f1793cd7de (patch)
tree7460617a02af63ccffb0af9f8e2e9d7968c55f44 /src/newgrf.cpp
parentc261218cf51d9b21133b095b4b056afb452086ee (diff)
downloadopenttd-3003986e6777c79a992ecb21b7f908f1793cd7de.tar.xz
(svn r12064) -Codechange : Give grf bridges their own ResetBridges function, and put bridge spec in table/bridge_land.h, where it should be.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 8563f7db4..f09f1e27b 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5091,15 +5091,8 @@ static void ResetNewGRFData()
/* Copy/reset original engine info data */
SetupEngines();
- /* Copy/reset original bridge info data
- * First, free sprite table data */
- for (uint i = 0; i < MAX_BRIDGES; i++) {
- if (_bridge[i].sprite_table != NULL) {
- for (uint j = 0; j < 7; j++) free(_bridge[i].sprite_table[j]);
- free(_bridge[i].sprite_table);
- }
- }
- memcpy(&_bridge, &orig_bridge, sizeof(_bridge));
+ /* Copy/reset original bridge info data */
+ ResetBridges();
/* Reset refit/cargo class data */
memset(&cargo_allowed, 0, sizeof(cargo_allowed));