If playing online, don't change your life/mana counters if you click on your opponent's (#2839)

This commit is contained in:
John Hill 2017-08-18 23:43:18 -07:00 committed by Zach H
parent 93d8ac10ff
commit a6d3229e74

View file

@ -65,6 +65,9 @@ void AbstractCounter::retranslateUi()
void AbstractCounter::setShortcutsActive()
{
if (!player->getLocal()) {
return;
}
if (name == "life") {
shortcutActive = true;
aSet->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aSet"));
@ -102,7 +105,7 @@ void AbstractCounter::setValue(int _value)
void AbstractCounter::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (isUnderMouse()) {
if (isUnderMouse() && player->getLocal()) {
if (event->button() == Qt::LeftButton) {
Command_IncCounter cmd;
cmd.set_counter_id(id);