src/industry_cmd.cpp
changeset 6468 ab54a3aeeacd
parent 6467 7bce7e0c9937
child 6491 00dc414c909d
--- a/src/industry_cmd.cpp	Mon Apr 16 02:53:55 2007 +0000
+++ b/src/industry_cmd.cpp	Mon Apr 16 02:56:48 2007 +0000
@@ -458,23 +458,22 @@
 		if ((_tick_counter & 1) == 0) {
 			m = GetIndustryAnimationState(tile) + 1;
 
-			if (m == 1) {
-				SndPlayTileFx(SND_2C_MACHINERY, tile);
-			} else if (m == 23) {
-				SndPlayTileFx(SND_2B_COMEDY_HIT, tile);
-			} else if (m == 28) {
-				SndPlayTileFx(SND_2A_EXTRACT_AND_POP, tile);
+			switch (m) {
+				case  1: SndPlayTileFx(SND_2C_MACHINERY, tile); break;
+				case 23: SndPlayTileFx(SND_2B_COMEDY_HIT, tile); break;
+				case 28: SndPlayTileFx(SND_2A_EXTRACT_AND_POP, tile); break;
+				default:
+					if (m >= 50) {
+						int n = GetIndustryAnimationLoop(tile) + 1;
+						m = 0;
+						if (n >= 8) {
+							n = 0;
+							DeleteAnimatedTile(tile);
+						}
+						SetIndustryAnimationLoop(tile, n);
+					}
 			}
 
-			if (m >= 50) {
-				int n = GetIndustryAnimationLoop(tile) + 1;
-				m = 0;
-				if (n >= 8) {
-					n = 0;
-					DeleteAnimatedTile(tile);
-				}
-				SetIndustryAnimationLoop(tile, n);
-			}
 			SetIndustryAnimationState(tile, m);
 			MarkTileDirtyByTile(tile);
 		}