mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:40:53 +01:00
37 lines
1.1 KiB
C
37 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;
|
||
|
|
};
|