nowdir = direction; speed = 0; active = 1; if (type != 2 && type != 4) finished = 1;