mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
object ids are u16, not s16 (#12848)
This commit is contained in:
parent
f7ae70c3d9
commit
6b6f886bcd
2 changed files with 5 additions and 5 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue