Commit 88e3f5a3 authored by Chen Bill's avatar Chen Bill

fix ClientField::GetHoverField()

If the opponent's mzone[6] is selectable:
Select opponent, mzone[6]

Otherwise:
Select self, mzone[5]
parent 3022d8ef
......@@ -2232,25 +2232,62 @@ void ClientField::GetHoverField(int x, int y) {
hovered_sequence = sequence;
} else if(boardy >= matManager.vFieldMzone[0][5][0].Pos.Y && boardy <= matManager.vFieldMzone[0][5][2].Pos.Y) {
if(sequence == 1) {
if(!mzone[1][6]) {
if (mzone[0][5]) {
hovered_controler = 0;
hovered_location = LOCATION_MZONE;
hovered_sequence = 5;
} else {
}
else if(mzone[1][6]) {
hovered_controler = 1;
hovered_location = LOCATION_MZONE;
hovered_sequence = 6;
}
} else if(sequence == 3) {
if(!mzone[1][5]) {
else if((mainGame->dInfo.curMsg == MSG_SELECT_PLACE || mainGame->dInfo.curMsg == MSG_SELECT_DISFIELD)) {
if (mainGame->dField.selectable_field & (0x1 << (16 + 6))) {
hovered_controler = 1;
hovered_location = LOCATION_MZONE;
hovered_sequence = 6;
}
else {
hovered_controler = 0;
hovered_location = LOCATION_MZONE;
hovered_sequence = 5;
}
}
else{
hovered_controler = 0;
hovered_location = LOCATION_MZONE;
hovered_sequence = 5;
}
}
else if(sequence == 3) {
if (mzone[0][6]) {
hovered_controler = 0;
hovered_location = LOCATION_MZONE;
hovered_sequence = 6;
} else {
}
else if (mzone[1][5]) {
hovered_controler = 1;
hovered_location = LOCATION_MZONE;
hovered_sequence = 5;
}
else if ((mainGame->dInfo.curMsg == MSG_SELECT_PLACE || mainGame->dInfo.curMsg == MSG_SELECT_DISFIELD)) {
if (mainGame->dField.selectable_field & (0x1 << (16 + 5))) {
hovered_controler = 1;
hovered_location = LOCATION_MZONE;
hovered_sequence = 5;
}
else {
hovered_controler = 0;
hovered_location = LOCATION_MZONE;
hovered_sequence = 6;
}
}
else {
hovered_controler = 0;
hovered_location = LOCATION_MZONE;
hovered_sequence = 6;
}
}
} else if(boardy >= matManager.vFieldMzone[1][0][2].Pos.Y && boardy <= matManager.vFieldMzone[1][0][0].Pos.Y) {
hovered_controler = 1;
......
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