forked from Wirlaburla/P3NG0
Compare commits
3 Commits
8d06546da6
...
1201257b11
| Author | SHA1 | Date | |
|---|---|---|---|
| 1201257b11 | |||
| 5d8b8e0f39 | |||
| ba4fda62ee |
19
src/main.cpp
19
src/main.cpp
@@ -781,8 +781,12 @@ bool handleGroups(char* buffer, std::string from, std::string message) {
|
|||||||
|
|
||||||
// teleport using a markEntry loaded from the database
|
// teleport using a markEntry loaded from the database
|
||||||
void handleTeleportRequest(internalTypes::markEntry details) {
|
void handleTeleportRequest(internalTypes::markEntry details) {
|
||||||
|
std::cout << "info: delaying teleport by 1000ms to avoid race condition\n";
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
std::cout << "info: requesting to join room \"" + details.room + "\"\n";
|
std::cout << "info: requesting to join room \"" + details.room + "\"\n";
|
||||||
roomIDReq(&roomsock, details.room);
|
//roomIDReq(&roomsock, details.room); //fatal error
|
||||||
|
room = details.room;
|
||||||
|
|
||||||
std::cout << "info: updating goto destination\n";
|
std::cout << "info: updating goto destination\n";
|
||||||
realLocation = details.url;
|
realLocation = details.url;
|
||||||
@@ -792,11 +796,12 @@ void handleTeleportRequest(internalTypes::markEntry details) {
|
|||||||
std::to_string(details.position.y) + ", " +
|
std::to_string(details.position.y) + ", " +
|
||||||
std::to_string(details.position.z) + ", " +
|
std::to_string(details.position.z) + ", " +
|
||||||
std::to_string(details.position.yaw) + "\n";
|
std::to_string(details.position.yaw) + "\n";
|
||||||
teleport(&roomsock,
|
xPos = details.position.x;
|
||||||
details.position.x,
|
yPos = details.position.y;
|
||||||
details.position.y,
|
zPos = details.position.z;
|
||||||
details.position.z,
|
direction = details.position.yaw;
|
||||||
details.position.yaw);
|
|
||||||
|
std::cout << "info: done! initiating watchdog\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// unimplemented
|
// unimplemented
|
||||||
@@ -829,7 +834,7 @@ void lookUpWorldName(std::string alias, char* buffer/*replies*/) {
|
|||||||
typeid((*key)["position"][1]).name() != "int" ||
|
typeid((*key)["position"][1]).name() != "int" ||
|
||||||
typeid((*key)["position"][2]).name() != "int" ||
|
typeid((*key)["position"][2]).name() != "int" ||
|
||||||
typeid((*key)["position"][3]).name() != "int") {
|
typeid((*key)["position"][3]).name() != "int") {
|
||||||
std::cout << "ERROR: expected type int when reading position. PLEASE CHECK your marks.json!!!\n";
|
//std::cout << "ERROR: expected type int when reading position. PLEASE CHECK your marks.json!!!\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
details.name = (*key)["name"].get<std::string>();
|
details.name = (*key)["name"].get<std::string>();
|
||||||
|
|||||||
Reference in New Issue
Block a user