Commit c401e836 authored by DailyShana's avatar DailyShana

draw atk texture correctly for opponent's monster

for puzzle mode
parent 408577ca
...@@ -392,7 +392,8 @@ void Game::DrawCard(ClientCard* pcard) { ...@@ -392,7 +392,8 @@ void Game::DrawCard(ClientCard* pcard) {
matManager.mTexture.setTexture(0, imageManager.tAttack); matManager.mTexture.setTexture(0, imageManager.tAttack);
driver->setMaterial(matManager.mTexture); driver->setMaterial(matManager.mTexture);
irr::core::matrix4 atk; irr::core::matrix4 atk;
atk.setTranslation(pcard->curPos + vector3df(0, -atkdy / 4.0f - 0.35f, 0.05f)); atk.setTranslation(pcard->curPos + vector3df(0, (pcard->controler == 0 ? -1 : 1) * (atkdy / 4.0f + 0.35f), 0.05f));
atk.setRotationRadians(vector3df(0, 0, pcard->controler == 0 ? 0 : 3.1415926f));
driver->setTransform(irr::video::ETS_WORLD, atk); driver->setTransform(irr::video::ETS_WORLD, atk);
driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vSymbol, 4, matManager.iRectangle, 2);
} }
......
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