Creature-Specific Options show up on left-click

This commit is contained in:
Oliver Rümpelein 2014-10-07 11:57:55 +02:00
parent 689cd3855f
commit a310ca3003

View file

@ -78,15 +78,13 @@
}); });
cur_sel=player[this.id]; cur_sel=player[this.id];
cur_sel.printoutput(); cur_sel.printoutput();
cur_sel.sel_att();
this.enableControl(); this.enableControl();
}; };
if(e.mouseButton === Crafty.mouseButtons.RIGHT) { if(e.mouseButton === Crafty.mouseButtons.RIGHT) {
if ( !cur_sel ) { return; }; if ( !cur_sel ) { return; };
if ( cur_sel == player[this.id] ) if ( cur_sel != player[this.id] )
{ {
cur_sel.sel_att();
}
else {
cur_sel.attack(player[this.id]); cur_sel.attack(player[this.id]);
}; };
}; };