sources » TemporalClass » LetGo
/*
* Breaks the link between firer and target
*/
void TemporalClass::LetGo() {
TemporalClass *prev = this->PrevTemporal;
TemporalClass *next = this->NextTemporal;
if ( prev ) {
if ( !next ) {
prev->NextTemporal = 0;
}
else {
next->PrevTemporal = prev;
if ( prev ) {
prev->NextTemporal = this->NextTemporal;
this->Victim = 0;
this->NextTemporal = 0;
this->PrevTemporal = 0;
this->SourceSW = 0;
this->field_38 = 0;
return;
}
}
this->Victim = NULL;
this->NextTemporal = NULL;
this->PrevTemporal = NULL;
this->SourceSW = NULL;
this->field_38 = NULL;
return;
}
if ( next ) {
if ( this->Victim )
this->Victim->TemporalTargettingMe = next;
this->NextTemporal->PrevTemporal = NULL;
this->NextTemporal->WarpRemaining = this->WarpRemaining;
this->Victim = NULL;
this->NextTemporal = NULL;
this->PrevTemporal = NULL;
this->SourceSW = NULL;
this->field_38 = NULL;
return;
}
if ( !this->Victim ) {
this->Victim = NULL;
this->NextTemporal = NULL;
this->PrevTemporal = NULL;
this->SourceSW = NULL;
this->field_38 = NULL;
return;
}
this->Victim->TemporalTargettingMe = 0;
this->Victim->IsBeingWarpedOut = 0;
if ( this->Victim->What_Am_I() == IS_BUILDING ) {
this->Victim->OwningPlayer->RecheckItems = 1;
this->Victim->Enable_After_Temporal();
this->Victim->OwningPlayer->RecheckTechLevels = 1;
}
this->Victim->SetLayer(LAYER_GROUND);
this->Victim = NULL;
this->NextTemporal = NULL;
this->PrevTemporal = NULL;
this->SourceSW = NULL;
this->field_38 = NULL;
}