Commit 9f9e8eb0 authored by mercury233's avatar mercury233 Committed by GitHub

fix FadeCard frames when quick animation is on (#2463)

parent bd520a43
...@@ -2511,6 +2511,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2511,6 +2511,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
else if(reason & REASON_DESTROY && pl != cl) else if(reason & REASON_DESTROY && pl != cl)
soundManager.PlaySoundEffect(SOUND_DESTROYED); soundManager.PlaySoundEffect(SOUND_DESTROYED);
} }
int appear = mainGame->gameConf.quick_animation ? 12 : 20;
if (pl == 0) { if (pl == 0) {
ClientCard* pcard = new ClientCard(); ClientCard* pcard = new ClientCard();
pcard->position = cp; pcard->position = cp;
...@@ -2521,8 +2522,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2521,8 +2522,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
mainGame->dField.GetCardLocation(pcard, &pcard->curPos, &pcard->curRot, true); mainGame->dField.GetCardLocation(pcard, &pcard->curPos, &pcard->curRot, true);
pcard->curAlpha = 5; pcard->curAlpha = 5;
mainGame->dField.FadeCard(pcard, 255, 20); mainGame->dField.FadeCard(pcard, 255, appear);
mainGame->WaitFrameSignal(20); mainGame->WaitFrameSignal(appear);
} else } else
mainGame->dField.AddCard(pcard, cc, cl, cs); mainGame->dField.AddCard(pcard, cc, cl, cs);
} else if (cl == 0) { } else if (cl == 0) {
...@@ -2533,8 +2534,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2533,8 +2534,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
for(auto eqit = pcard->equipped.begin(); eqit != pcard->equipped.end(); ++eqit) for(auto eqit = pcard->equipped.begin(); eqit != pcard->equipped.end(); ++eqit)
(*eqit)->equipTarget = 0; (*eqit)->equipTarget = 0;
if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) { if(!mainGame->dInfo.isReplay || !mainGame->dInfo.isReplaySkiping) {
mainGame->dField.FadeCard(pcard, 5, 20); mainGame->dField.FadeCard(pcard, 5, appear);
mainGame->WaitFrameSignal(20); mainGame->WaitFrameSignal(appear);
mainGame->gMutex.lock(); mainGame->gMutex.lock();
mainGame->dField.RemoveCard(pc, pl, ps); mainGame->dField.RemoveCard(pc, pl, ps);
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
......
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