If playing online, don't change your life/mana counters if you click on your opponent's (#2839)
This commit is contained in:
parent
93d8ac10ff
commit
a6d3229e74
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue