diff options
author | Kahrl <kahrl@gmx.net> | 2012-01-22 14:55:55 +0100 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-01-22 17:31:20 +0200 |
commit | c241902b4085573477c996bbcdacaed2d293b38c (patch) | |
tree | 080cd28a8def6d20f564717ea4222c11d88c467c /src/mapnode.cpp | |
parent | 4799a8f7619b1aad6f9f0c977849be81f17a3672 (diff) | |
download | minetest-c241902b4085573477c996bbcdacaed2d293b38c.tar.gz minetest-c241902b4085573477c996bbcdacaed2d293b38c.tar.bz2 minetest-c241902b4085573477c996bbcdacaed2d293b38c.zip |
Cleanup (some stuff went wrong when reverting 4-byte mapnodes); fix legacy_wallmounted
Diffstat (limited to 'src/mapnode.cpp')
-rw-r--r-- | src/mapnode.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp index bfadbeac5..6cb9671b5 100644 --- a/src/mapnode.cpp +++ b/src/mapnode.cpp @@ -291,31 +291,31 @@ void MapNode::serialize_pre22(u8 *dest, u8 version) // Translate to wanted version MapNode n_foreign = mapnode_translate_from_internal(*this, version); - u16 actual_content = n_foreign.param0; + u8 actual_param0 = n_foreign.param0; // Convert special values from new version to old if(version <= 18) { // In these versions, CONTENT_IGNORE and CONTENT_AIR // are 255 and 254 - if(actual_content == CONTENT_IGNORE) - actual_content = 255; - else if(actual_content == CONTENT_AIR) - actual_content = 254; + if(actual_param0 == CONTENT_IGNORE) + actual_param0 = 255; + else if(actual_param0 == CONTENT_AIR) + actual_param0 = 254; } if(version == 0) { - dest[0] = actual_content; + dest[0] = actual_param0; } else if(version <= 9) { - dest[0] = actual_content; + dest[0] = actual_param0; dest[1] = n_foreign.param1; } else { - dest[0] = actual_content; + dest[0] = actual_param0; dest[1] = n_foreign.param1; dest[2] = n_foreign.param2; } |