changePos事件不聚集

This commit is contained in:
ckcz123 2020-05-05 15:44:51 +08:00
parent 34bb3c9713
commit da5b260d5a

View File

@ -1386,6 +1386,12 @@ events.prototype._action_changeFloor = function (data, x, y, prefix) {
events.prototype._action_changePos = function (data, x, y, prefix) {
core.clearMap('hero');
if (data.x == null && data.y == null && data.direction) {
core.setHeroLoc('direction', data.direction, true);
core.drawHero();
return core.doAction();
}
var loc = this.__action_getHeroLoc(data.loc, prefix);
core.setHeroLoc('x', loc[0]);
core.setHeroLoc('y', loc[1]);