Commit 740ed200 authored by edo9300's avatar edo9300 Committed by Momobako

Xyz materials for Szone

parent 0bf52fc6
......@@ -935,10 +935,11 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
break;
}
case LOCATION_OVERLAY: {
if (pcard->overlayTarget->location != 0x4) {
if (!(pcard->overlayTarget->location & LOCATION_ONFIELD)) {
return;
}
int oseq = pcard->overlayTarget->sequence;
if (pcard->overlayTarget->location == LOCATION_MZONE) {
if (pcard->overlayTarget->controler == 0) {
t->X = (matManager.vFieldMzone[0][oseq][0].Pos.X + matManager.vFieldMzone[0][oseq][1].Pos.X) / 2 - 0.12f + 0.06f * sequence;
t->Y = (matManager.vFieldMzone[0][oseq][0].Pos.Y + matManager.vFieldMzone[0][oseq][2].Pos.Y) / 2 + 0.05f;
......@@ -946,7 +947,8 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
r->X = 0.0f;
r->Y = 0.0f;
r->Z = 0.0f;
} else {
}
else {
t->X = (matManager.vFieldMzone[1][oseq][0].Pos.X + matManager.vFieldMzone[1][oseq][1].Pos.X) / 2 + 0.12f - 0.06f * sequence;
t->Y = (matManager.vFieldMzone[1][oseq][0].Pos.Y + matManager.vFieldMzone[1][oseq][2].Pos.Y) / 2 - 0.05f;
t->Z = 0.005f + pcard->sequence * 0.0001f;
......@@ -954,6 +956,24 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
r->Y = 0.0f;
r->Z = 3.1415926f;
}
} else {
if (pcard->overlayTarget->controler == 0) {
t->X = (matManager.vFieldSzone[0][oseq][rule][0].Pos.X + matManager.vFieldSzone[0][oseq][rule][1].Pos.X) / 2 - 0.12f + 0.06f * sequence;
t->Y = (matManager.vFieldSzone[0][oseq][rule][0].Pos.Y + matManager.vFieldSzone[0][oseq][rule][2].Pos.Y) / 2 + 0.05f;
t->Z = 0.005f + pcard->sequence * 0.0001f;
r->X = 0.0f;
r->Y = 0.0f;
r->Z = 0.0f;
}
else {
t->X = (matManager.vFieldSzone[1][oseq][rule][0].Pos.X + matManager.vFieldSzone[1][oseq][rule][1].Pos.X) / 2 + 0.12f - 0.06f * sequence;
t->Y = (matManager.vFieldSzone[1][oseq][rule][0].Pos.Y + matManager.vFieldSzone[1][oseq][rule][2].Pos.Y) / 2 - 0.05f;
t->Z = 0.005f + pcard->sequence * 0.0001f;
r->X = 0.0f;
r->Y = 0.0f;
r->Z = 3.1415926f;
}
}
break;
}
}
......
......@@ -2338,7 +2338,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->overlayTarget = olcard;
pcard->location = 0x80;
pcard->sequence = olcard->overlayed.size() - 1;
if (olcard->location == 0x4) {
if (olcard->location & 0x0c) {
mainGame->gMutex.Lock();
mainGame->dField.MoveCard(pcard, 10);
if (pl == 0x2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment