| 753 | } |
| 754 | } |
| 755 | void Server::processCommands() |
| 756 | { |
| 757 | for(int i = 0; i < data->commandCount; ++i) |
| 758 | { |
| 759 | BWAPIC::CommandType::Enum c = data->commands[i].type; |
| 760 | int v1 = data->commands[i].value1; |
| 761 | int v2 = data->commands[i].value2; |
| 762 | switch (c) |
| 763 | { |
| 764 | case BWAPIC::CommandType::SetScreenPosition: |
| 765 | if (Broodwar->isInGame()) |
| 766 | Broodwar->setScreenPosition(v1,v2); |
| 767 | break; |
| 768 | case BWAPIC::CommandType::PingMinimap: |
| 769 | if (Broodwar->isInGame()) |
| 770 | Broodwar->pingMinimap(v1,v2); |
| 771 | break; |
| 772 | case BWAPIC::CommandType::EnableFlag: |
| 773 | if (Broodwar->isInGame()) |
| 774 | Broodwar->enableFlag(v1); |
| 775 | break; |
| 776 | case BWAPIC::CommandType::Printf: |
| 777 | if (Broodwar->isInGame()) |
| 778 | Broodwar->printf("%s", data->strings[v1]); |
| 779 | break; |
| 780 | case BWAPIC::CommandType::SendText: |
| 781 | if (Broodwar->isInGame()) |
| 782 | Broodwar->sendTextEx(v2 != 0, "%s", data->strings[v1]); |
| 783 | break; |
| 784 | case BWAPIC::CommandType::PauseGame: |
| 785 | if (Broodwar->isInGame()) |
| 786 | Broodwar->pauseGame(); |
| 787 | break; |
| 788 | case BWAPIC::CommandType::ResumeGame: |
| 789 | if (Broodwar->isInGame()) |
| 790 | Broodwar->resumeGame(); |
| 791 | break; |
| 792 | case BWAPIC::CommandType::LeaveGame: |
| 793 | if (Broodwar->isInGame()) |
| 794 | Broodwar->leaveGame(); |
| 795 | break; |
| 796 | case BWAPIC::CommandType::RestartGame: |
| 797 | if (Broodwar->isInGame()) |
| 798 | Broodwar->restartGame(); |
| 799 | break; |
| 800 | case BWAPIC::CommandType::SetLocalSpeed: |
| 801 | if (Broodwar->isInGame()) |
| 802 | Broodwar->setLocalSpeed(v1); |
| 803 | break; |
| 804 | case BWAPIC::CommandType::SetLatCom: |
| 805 | Broodwar->setLatCom(v1 == 1); |
| 806 | break; |
| 807 | case BWAPIC::CommandType::SetGui: |
| 808 | Broodwar->setGUI(v1 == 1); |
| 809 | break; |
| 810 | case BWAPIC::CommandType::SetFrameSkip: |
| 811 | if (Broodwar->isInGame()) |
| 812 | Broodwar->setFrameSkip(v1); |
nothing calls this directly
no test coverage detected