fixed missing check for zapcockpit patch

This commit is contained in:
louis 2016-05-30 05:29:15 +02:00
parent 7b26d65360
commit 79623b6571

View File

@ -367,7 +367,12 @@ void cViewChannel::Close(void) {
fader = NULL; fader = NULL;
delete shifter; delete shifter;
shifter = NULL; shifter = NULL;
if (initFinished && viewType == dcDefault && ShiftTime() > 0) { bool doAnim = true;
#ifdef USE_ZAPCOCKPIT
if (viewType != dcDefault)
doAnim = false;
#endif
if (initFinished && doAnim && ShiftTime() > 0) {
cRect shiftbox = CoveredArea(); cRect shiftbox = CoveredArea();
cPoint ref = cPoint(shiftbox.X(), shiftbox.Y()); cPoint ref = cPoint(shiftbox.X(), shiftbox.Y());
cPoint end = ShiftStart(shiftbox); cPoint end = ShiftStart(shiftbox);
@ -375,7 +380,7 @@ void cViewChannel::Close(void) {
shifter->Shift(); shifter->Shift();
delete shifter; delete shifter;
shifter = NULL; shifter = NULL;
} else if (initFinished && viewType == dcDefault && FadeTime() > 0) { } else if (initFinished && doAnim && FadeTime() > 0) {
fader = new cAnimation((cFadable*)this, false); fader = new cAnimation((cFadable*)this, false);
fader->Fade(); fader->Fade();
delete fader; delete fader;