mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-12 16:50:54 +01:00
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
struct World;
|
|
struct TransportService;
|
|
|
|
struct SetWaypointEvent;
|
|
struct RemoveWaypointEvent;
|
|
struct NotifySetWaypoint;
|
|
struct NotifyRemoveWaypoint;
|
|
|
|
/**
|
|
* @brief Handles logic related to the local player.
|
|
*/
|
|
struct MapService
|
|
{
|
|
MapService(World& aWorld, entt::dispatcher& aDispatcher, TransportService& aTransport) noexcept;
|
|
~MapService() noexcept = default;
|
|
|
|
TP_NOCOPYMOVE(MapService);
|
|
|
|
protected:
|
|
void OnSetWaypoint(const SetWaypointEvent& acMessage) noexcept;
|
|
void OnRemoveWaypoint(const RemoveWaypointEvent& acMessage) noexcept;
|
|
void OnNotifySetWaypoint(const NotifySetWaypoint& acMessage) noexcept;
|
|
void OnNotifyRemoveWaypoint(const NotifyRemoveWaypoint& acMessage) noexcept;
|
|
|
|
private:
|
|
World& m_world;
|
|
entt::dispatcher& m_dispatcher;
|
|
TransportService& m_transport;
|
|
|
|
entt::scoped_connection m_playerSetWaypointConnection;
|
|
entt::scoped_connection m_playerRemoveWaypointConnection;
|
|
entt::scoped_connection m_playerNotifySetWaypointConnection;
|
|
entt::scoped_connection m_playerNotifyRemoveWaypointConnection;
|
|
};
|