XEEN: Further simplification in checkMoveDirection
This commit is contained in:
parent
b9e8320de7
commit
d5acefa023
1 changed files with 4 additions and 5 deletions
|
@ -921,7 +921,11 @@ bool Interface::checkMoveDirection(int key) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get next facing tile information, and then reset back to the old direction (if changed)
|
||||||
map.getCell(7);
|
map.getCell(7);
|
||||||
|
party._mazeDirection = dir;
|
||||||
|
|
||||||
|
|
||||||
int startSurfaceId = map._currentSurfaceId;
|
int startSurfaceId = map._currentSurfaceId;
|
||||||
int surfaceId;
|
int surfaceId;
|
||||||
|
|
||||||
|
@ -929,8 +933,6 @@ bool Interface::checkMoveDirection(int key) {
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (map._isOutdoors) {
|
if (map._isOutdoors) {
|
||||||
party._mazeDirection = dir;
|
|
||||||
|
|
||||||
switch (map._currentWall) {
|
switch (map._currentWall) {
|
||||||
case 5:
|
case 5:
|
||||||
if (_vm->_files->_ccNum)
|
if (_vm->_files->_ccNum)
|
||||||
|
@ -976,12 +978,9 @@ bool Interface::checkMoveDirection(int key) {
|
||||||
} else {
|
} else {
|
||||||
surfaceId = map.getCell(2);
|
surfaceId = map.getCell(2);
|
||||||
if (surfaceId >= map.mazeData()._difficulties._wallNoPass) {
|
if (surfaceId >= map.mazeData()._difficulties._wallNoPass) {
|
||||||
party._mazeDirection = dir;
|
|
||||||
sound.playFX(46);
|
sound.playFX(46);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
party._mazeDirection = dir;
|
|
||||||
|
|
||||||
if (startSurfaceId != SURFTYPE_SWAMP || party.checkSkill(SWIMMING) ||
|
if (startSurfaceId != SURFTYPE_SWAMP || party.checkSkill(SWIMMING) ||
|
||||||
party._walkOnWaterActive) {
|
party._walkOnWaterActive) {
|
||||||
if (_buttonValue == Common::KEYCODE_UP && _wo[107]) {
|
if (_buttonValue == Common::KEYCODE_UP && _wo[107]) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue