Add basic Monkey Skyway functionality

This commit is contained in:
Gent
2020-09-16 22:27:21 -04:00
parent 94583e534b
commit a5c40b66f5
6 changed files with 126 additions and 10 deletions

View File

@@ -1,6 +1,13 @@
#pragma once
#include "CNShardServer.hpp"
#include "NPCManager.hpp"
#include <unordered_map>
#define LERP_GAP 5000
struct WarpLocation;
struct TransportRoute {
int type, start, end, cost, mssSpeed, mssRouteNum;
@@ -13,9 +20,13 @@ struct TransportLocation {
namespace TransportManager {
extern std::map<int32_t, TransportRoute> Routes;
extern std::map<int32_t, TransportLocation> Locations;
extern std::map<int32_t, std::vector<WarpLocation>> SkywayPaths;
extern std::unordered_map<CNSocket*, std::queue<WarpLocation>> SkywayQueue;
void init();
void transportRegisterLocationHandler(CNSocket* sock, CNPacketData* data);
void transportWarpHandler(CNSocket* sock, CNPacketData* data);
void tickSkywaySystem(CNServer* serv, time_t currTime);
}