2020-12-02 16:19:16 -05:00
|
|
|
#pragma once
|
|
|
|
#include "pch.h"
|
2021-10-24 18:08:00 -04:00
|
|
|
#include <vector>
|
2020-12-02 16:19:16 -05:00
|
|
|
|
|
|
|
class Teleport
|
|
|
|
{
|
|
|
|
private:
|
2021-10-24 18:08:00 -04:00
|
|
|
static inline bool m_bInsertCoord;
|
|
|
|
static inline bool m_bQuickTeleport;
|
|
|
|
static inline char m_nInputBuffer[INPUT_BUFFER_SIZE];
|
|
|
|
static inline ResourceStore m_tpData{"teleport", eResourceType::TYPE_TEXT};
|
|
|
|
static inline char m_nLocationBuffer[INPUT_BUFFER_SIZE];
|
|
|
|
static inline uint m_nQuickTeleportTimer;
|
2021-08-01 21:41:48 -04:00
|
|
|
|
2021-08-06 11:53:18 -04:00
|
|
|
#ifdef GTASA
|
2021-10-24 18:08:00 -04:00
|
|
|
static inline CJson m_SpriteJson = CJson("radar sprite");
|
2021-08-06 11:53:18 -04:00
|
|
|
#endif
|
2021-08-01 21:41:48 -04:00
|
|
|
|
2021-10-24 18:08:00 -04:00
|
|
|
struct m_Teleport
|
|
|
|
{
|
|
|
|
static inline bool m_bEnabled;
|
|
|
|
static inline CVector m_fPos = {-1, -1, -1};
|
|
|
|
static inline uint m_nTimer;
|
|
|
|
};
|
2020-12-09 08:15:50 -05:00
|
|
|
|
2021-08-06 11:53:18 -04:00
|
|
|
#ifdef GTASA
|
2021-10-24 18:08:00 -04:00
|
|
|
/*
|
|
|
|
Generates radar sprite coordinates on the fly.
|
|
|
|
Shouldn't get saved in 'teleport.json', needs to be cleared at game shutdown.
|
|
|
|
*/
|
|
|
|
static void FetchRadarSpriteData();
|
2021-08-06 11:53:18 -04:00
|
|
|
#endif
|
2020-12-09 08:15:50 -05:00
|
|
|
|
2020-12-02 16:19:16 -05:00
|
|
|
protected:
|
2021-10-24 18:08:00 -04:00
|
|
|
Teleport();
|
|
|
|
|
2020-12-02 16:19:16 -05:00
|
|
|
public:
|
2021-10-24 18:08:00 -04:00
|
|
|
static void Draw();
|
|
|
|
static void TeleportPlayer(bool get_marker = false, CVector pos = CVector(0, 0, 0), int interior_id = 0);
|
|
|
|
static void TeleportToLocation(std::string &rootkey, std::string &bLocName, std::string &loc);
|
|
|
|
static void RemoveTeleportEntry(std::string &rootkey, std::string &key, std::string &val);
|
2021-06-18 12:49:11 -04:00
|
|
|
};
|