Исправления ночного режима
This commit is contained in:
13
robot.cpp
13
robot.cpp
@@ -62,9 +62,18 @@ static void emulate_robot(robot_code &code, robot_regs& r, char robot_id) {
|
||||
switch (code.code[code.PC] & (short)ROBOT_CMD_MASK) {
|
||||
case ROBOT_CMD_MOVE_TO_ZONE_code:
|
||||
// двигаемся в сторону цели
|
||||
if (robot_move(r, (short)(cmd_arg & 0x7F), robot_id)) {
|
||||
code.PC++;
|
||||
{
|
||||
short target = cmd_arg;
|
||||
if (target & ROBOT_ZONE_PARKING) {
|
||||
target = -1;
|
||||
} else {
|
||||
target &= 0x7F;
|
||||
}
|
||||
if (robot_move(r, target, robot_id)) {
|
||||
code.PC++;
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd_arg & ROBOT_WITH_BARREL && code.barrel_id >= 0) {
|
||||
barrels[code.barrel_id].zone = r.dx.current_zone;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user