Panel hit detection but broken available games, thats enough for tonight

This commit is contained in:
Jon ESA
2026-04-01 22:13:50 +01:00
parent 81e8cf74c4
commit d4ad6f4258
3 changed files with 80 additions and 14 deletions

View File

@@ -176,6 +176,17 @@ void WebSocketController::handleProtocol(const QString &msg)
return;
}
// ---- IMP (panel impact) ----
// Format: IMP <panel_idx> <power> <x> <y> <z>
if (cmd == "IMP" && tokens.size() >= 3) {
bool idxOk = false, pwrOk = false;
const int idx = tokens[1].toInt(&idxOk);
const int power = tokens[2].toInt(&pwrOk);
if (idxOk && pwrOk && m_panelsPanel)
m_panelsPanel->impactPanel(idx, power);
return;
}
// ---- GAM listall ----
if (cmd == "GAM" && tokens.size() >= 2 && tokens[1] == "listall") {
if (m_gamesPanel) m_gamesPanel->loadAllFromResponse(msg);