diff options
author | belugas <belugas@openttd.org> | 2008-02-05 04:48:56 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2008-02-05 04:48:56 +0000 |
commit | 0ee48fc6d34a5791a4672b8a6682a53e4fc29435 (patch) | |
tree | 7460617a02af63ccffb0af9f8e2e9d7968c55f44 /src/newgrf.cpp | |
parent | 91456a93f0c8be046517483f0611023876bb9246 (diff) | |
download | openttd-0ee48fc6d34a5791a4672b8a6682a53e4fc29435.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.cpp | 11 |
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)); |