mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-19 21:35:46 +01:00
object ids are u16, not s16 (#12848)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user