|
@@ -80,7 +80,8 @@ void FactoryClient::loadServerInfo()
|
|
kam->setBildschirmPosition(0, 0);
|
|
kam->setBildschirmPosition(0, 0);
|
|
kam->setBildschirmSize(50, 50);
|
|
kam->setBildschirmSize(50, 50);
|
|
kam->setPosition(Vec3<float>(0, 0, 0));
|
|
kam->setPosition(Vec3<float>(0, 0, 0));
|
|
- kam->setRotation({(float)PI / 2.f, 0.f, std::atan2(0.f, -1.f) + (float)PI / 2});
|
|
|
|
|
|
+ kam->setRotation(
|
|
|
|
+ {(float)PI / 2.f, 0.f, std::atan2(0.f, -1.f) + (float)PI / 2});
|
|
Bild* b = new Bild();
|
|
Bild* b = new Bild();
|
|
b->neuBild(50, 50, 0);
|
|
b->neuBild(50, 50, 0);
|
|
for (int i = 0; i < itemTypeCount; i++)
|
|
for (int i = 0; i < itemTypeCount; i++)
|
|
@@ -91,7 +92,9 @@ void FactoryClient::loadServerInfo()
|
|
{
|
|
{
|
|
Vec3<float> min = data->getMinPos();
|
|
Vec3<float> min = data->getMinPos();
|
|
Vec3<float> max = data->getMaxPos();
|
|
Vec3<float> max = data->getMaxPos();
|
|
- float maxX = MAX(MAX(MAX(abs(min.x), abs(max.x)), MAX(abs(min.y), abs(max.y))), MAX(abs(min.z), abs(max.z)));
|
|
|
|
|
|
+ float maxX = MAX(
|
|
|
|
+ MAX(MAX(abs(min.x), abs(max.x)), MAX(abs(min.y), abs(max.y))),
|
|
|
|
+ MAX(abs(min.z), abs(max.z)));
|
|
kam->setPosition(Vec3<float>(maxX * 5, 0.f, 0.f));
|
|
kam->setPosition(Vec3<float>(maxX * 5, 0.f, 0.f));
|
|
}
|
|
}
|
|
mdl->setModelDaten(data);
|
|
mdl->setModelDaten(data);
|
|
@@ -347,6 +350,23 @@ void FactoryClient::entityAPIRequest(
|
|
cs.unlock();
|
|
cs.unlock();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void FactoryClient::blockAPIRequest(
|
|
|
|
+ Vec3<int> pos, char* message, unsigned short length)
|
|
|
|
+{
|
|
|
|
+ if (!foreground) return;
|
|
|
|
+ cs.lock();
|
|
|
|
+ length += 14;
|
|
|
|
+ foreground->sende((char*)&length, 2);
|
|
|
|
+ char msgId = 1;
|
|
|
|
+ foreground->sende(&msgId, 1);
|
|
|
|
+ foreground->sende(&msgId, 1);
|
|
|
|
+ foreground->sende((char*)&pos.x, 4);
|
|
|
|
+ foreground->sende((char*)&pos.y, 4);
|
|
|
|
+ foreground->sende((char*)&pos.z, 4);
|
|
|
|
+ foreground->sende(message, length - 14);
|
|
|
|
+ cs.unlock();
|
|
|
|
+}
|
|
|
|
+
|
|
void FactoryClient::chunkAPIRequest(
|
|
void FactoryClient::chunkAPIRequest(
|
|
Punkt center, char* message, unsigned short length)
|
|
Punkt center, char* message, unsigned short length)
|
|
{
|
|
{
|