Skip to content

v0.10.0

Choose a tag to compare

@Segfaultd Segfaultd released this 15 Jun 14:51
· 16 commits to master since this release

MafiaNet v0.10.0

Core / API

  • Umbrella header mafianet/mafianet.h — single include aggregating the core public headers (RakPeerInterface, types, message IDs, PacketPriority, BitStream, GetTime, Statistics). Additive; encryption headers intentionally omitted (security stays opt-in).
  • Canonical type aliases (mafianet/aliases.h) — PeerInterface, Guid, Statistics, UnassignedGuid over the legacy RakNet names. using aliases, fully interoperable; legacy names untouched.
  • RAII handles Peer & PacketPtr (mafianet/PeerHandle.h) — own a RakPeerInterface / received Packet and clean up on scope exit. ChatExample client rewritten to use them.
  • Thread-safe GUID value accessors (mafianet/guid_util.h) — MafiaNet::to_string(const RakNetGUID&) (owns its buffer) and connected_address(...) returning std::optional<SystemAddress>.

Spatial

  • PointGridSectorizer — uniform point grid with O(1) RemoveEntry/MoveEntry (per-entry hash + swap-remove, early-out on same-cell moves), upsert add/move, duplicate-free GetEntries, edge-cell clamping. GridSectorizer left untouched.

⚠️ Breaking changes

  • Scoped enum classes — global PacketPriority / PacketReliability C enums removed in favour of scoped MafiaNet::Priority / MafiaNet::Reliability. Enumerator order and wire field preserved; update call sites (HIGH_PRIORITYMafiaNet::Priority::High, RELIABLE_ORDEREDMafiaNet::Reliability::ReliableOrdered). NUMBER_OF_* sentinels are now constexpr counts in MafiaNet.
  • Removed non-thread-safe RakNetGUID::ToString(void) (shared static buffer) — use MafiaNet::to_string(g).c_str().

Bug fix

  • PeerHandle no longer dereferences a moved-from Peer in receive(); corrected header copyright.

Testing

  • Added PointGridSectorizerTest, PeerHandleTest, GuidUtilTest; hardened DisconnectReasonTest against CI scheduler starvation.

Full changelog: v0.9.0...v0.10.0