Commit 631eed90 authored by mercury233's avatar mercury233

use std::swap in SingleDuel::TPResult

parent 67cdd748
......@@ -399,14 +399,10 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
pplayer[0] = players[0];
pplayer[1] = players[1];
if((tp && dp->type == 1) || (!tp && dp->type == 0)) {
DuelPlayer* p = players[0];
players[0] = players[1];
players[1] = p;
std::swap(players[0], players[1]);
players[0]->type = 0;
players[1]->type = 1;
Deck d = pdeck[0];
pdeck[0] = pdeck[1];
pdeck[1] = d;
std::swap(pdeck[0], pdeck[1]);
swapped = true;
}
dp->state = CTOS_RESPONSE;
......
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