void nofAggressiveDefender::MissionAggressiveDefendingLookForNewAggressor()
{
    RTTR_Assert(!attacker);
    // Wenns das Zielgebäude nich mehr gibt, gleich nach Hause gehen!
    if(!attacked_goal)
    {
        ReturnHomeMissionAggressiveDefending();
        return;
    }

    /// Vermeiden, dass in FindAggressor nochmal der Soldat zum Loslaufen gezwungen wird, weil er als state
    // noch drinstehen hat, dass er auf einen Kampf wartet
    state = STATE_AGGRESSIVEDEFENDING_WALKINGTOAGGRESSOR;

    // nach anderen suchen, die in meiner Nähe sind und mich evtl noch mit denen kloppen
    attacker = attacked_goal->FindAggressor(this);
    if(attacker)
    {
        // zum Angreifer gehen und mit ihm kämpfen
        MissAggressiveDefendingWalk();
    } else
    {
        // keiner will mehr mit mir kämpfen, dann geh ich halt wieder nach Hause
        ReturnHomeMissionAggressiveDefending();
    }
}
void nofAggressiveDefender::MissAggressiveDefendingWalk()
{
    // Ist evtl. unser Heimatgebäude zerstört?
    if(!building)
    {
        InformTargetsAboutCancelling();

        // Rumirren
        state = STATE_FIGUREWORK;
        StartWandering();
        Wander();
        return;
    }

    // Wenns das Zielgebäude nich mehr gibt, gleich nach Hause gehen!
    if(!attacked_goal)
    {
        ReturnHomeMissionAggressiveDefending();
        return;
    }

    // Does the attacker still exists?
    if(!attacker)
    {
        // Look for a new one
        MissionAggressiveDefendingLookForNewAggressor();
        return;
    }

    // Does he still want to fight?
    if(!attacker->IsReadyForFight())
    {
        // Look for a new one
        CancelAtAttacker();
        MissionAggressiveDefendingLookForNewAggressor();
        return;
    }

    // Look for enemies
    if(FindEnemiesNearby())
    {
        // Enemy found -> abort, because nofActiveSoldier handles all things now
        // Note it is ok, if the enemy is our attacker.
        // If we win, we will either see, that the attacker is busy or be notified because he did
        // If we loose, we will tell him later
        return;
    }

    RTTR_Assert(pos != attacker->GetPos()); // If so, why was it not found?

    // Calc next walking direction
    unsigned char dir = gwg->FindHumanPath(pos, attacker->GetPos(), 100, true);

    if(dir == 0xFF)
    {
        // No route found
        // Look for new attacker
        CancelAtAttacker();
        MissionAggressiveDefendingLookForNewAggressor();
    } else
    {
        // Continue walking towards him
        StartWalking(Direction(dir));
    }
}
void nofAggressiveDefender::MissAggressiveDefendingWalk()
{
	// Ist evtl. unser Heimatgebäude zerstört?
	if(!building)
	{
		attacker = NULL;

		// Ziel Bescheid sagen
		if(attacked_goal)
		{
			attacked_goal->UnlinkAggressiveDefender(this);
			attacked_goal = 0;
		}

		// Rumirren
		state = STATE_FIGUREWORK;
		StartWandering();
		Wander();

		

		return;
	}

	// Wenns das Zielgebäude nich mehr gibt, gleich nach Hause gehen!
	if(!attacked_goal)
	{
		ReturnHomeMissionAggressiveDefending();
		return;
	}

	// Does the attacker still exists?
	if(!attacker)
	{
		// Look for a new one
		MissionAggressiveDefendingLookForNewAggressor();
		return;
	}

	// Does he still want to fight?
	if(!attacker->IsReadyForFight())
	{
		// Look for a new one
		MissionAggressiveDefendingLookForNewAggressor();
		return;
	}

	// Look for enemies
	if(FindEnemiesNearby())
		// Enemy found -> abort, because nofActiveSoldier handles all things now
		return;

	// Calc next walking direction
	dir = gwg->FindHumanPath(x,y,attacker->GetX(),
			attacker->GetY(),100,true);

	if(dir == 0xFF)
	{
		// No route found
		// Look for new attacker
		MissionAggressiveDefendingLookForNewAggressor();
	}
	else
	{
		// Continue walking towards him
		StartWalking(dir);
	}
}