aboutsummaryrefslogtreecommitdiff
path: root/src/util/pointedthing.cpp
diff options
context:
space:
mode:
authorfluxionary <25628292+fluxionary@users.noreply.github.com>2022-10-13 05:46:48 -0700
committerGitHub <noreply@github.com>2022-10-13 08:46:48 -0400
commit6b6f886bcded0505b4286e3bd1e08f71f456b63b (patch)
tree34eef2166b84c70be671500eda85f31bcc67c9aa /src/util/pointedthing.cpp
parentf7ae70c3d97645b714bc909d08769235477459fa (diff)
downloadminetest-6b6f886bcded0505b4286e3bd1e08f71f456b63b.tar.xz
object ids are u16, not s16 (#12848)
Diffstat (limited to 'src/util/pointedthing.cpp')
-rw-r--r--src/util/pointedthing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/pointedthing.cpp b/src/util/pointedthing.cpp
index b906264d0..6aa37dfe8 100644
--- a/src/util/pointedthing.cpp
+++ b/src/util/pointedthing.cpp
@@ -36,7 +36,7 @@ PointedThing::PointedThing(const v3s16 &under, const v3s16 &above,
distanceSq(distSq)
{}
-PointedThing::PointedThing(s16 id, const v3f &point, const v3s16 &normal,
+PointedThing::PointedThing(u16 id, const v3f &point, const v3s16 &normal,
f32 distSq) :
type(POINTEDTHING_OBJECT),
object_id(id),
@@ -81,7 +81,7 @@ void PointedThing::serialize(std::ostream &os) const
writeV3S16(os, node_abovesurface);
break;
case POINTEDTHING_OBJECT:
- writeS16(os, object_id);
+ writeU16(os, object_id);
break;
}
}
@@ -100,7 +100,7 @@ void PointedThing::deSerialize(std::istream &is)
node_abovesurface = readV3S16(is);
break;
case POINTEDTHING_OBJECT:
- object_id = readS16(is);
+ object_id = readU16(is);
break;
default:
throw SerializationError("unsupported PointedThingType");