Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-25-2011, 12:13 PM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

Ataros,

are there problems with Ju88 ar He111? I ask because it might be not a despawn problem, but separate bug. If I recall correctly there was (or still is) a problem with Br.20: engines cout out as player switches pilot positions (there are 2 piliots in Br.20).
Reply With Quote
  #2  
Old 05-25-2011, 12:39 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

I did not try it myself yet. Will be able to test only tomorrow.

People report all bombers as far as I understand. This guy flies red side only i.e. Blenheims http://www.sukhoi.ru/forum/showthrea...=1#post1625736

Last edited by Ataros; 05-25-2011 at 12:42 PM.
Reply With Quote
  #3  
Old 05-25-2011, 05:46 PM
Flashman Flashman is offline
Approved Member
 
Join Date: May 2010
Posts: 109
Default

Quote:
Originally Posted by ZaltysZ View Post
Ataros,

are there problems with Ju88 ar He111? I ask because it might be not a despawn problem, but separate bug. If I recall correctly there was (or still is) a problem with Br.20: engines cout out as player switches pilot positions (there are 2 piliots in Br.20).
There are problems with all muticrew aircraft if the player moves position. Would be nice if it could be fixed.
Reply With Quote
  #4  
Old 05-25-2011, 07:09 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

This code checks if plane is empty completely I guess. But this script worked only from a client PC used as server and did not work on a dedi server at least before the latest beta patch. That is why it was replaced with currently used script which works on dedi server.

We have to find out how to integrate this
if ((i.Place() as AiAircraft) == (actor as AiAircraft))
{
PlaneIsEmpty = false;

into currently working script shown above in my previous message.
Code:
    // destroys aircraft abandoned by a player
    public void _DespawnEmptyPlane(AiActor actor)
    {
        if (actor == null)
        { return; }

        Player[] Players = GamePlay.gpRemotePlayers();

        bool PlaneIsEmpty = true;

        foreach (Player i in Players)
        {
            if ((i.Place() as AiAircraft) == (actor as AiAircraft))
            {
                PlaneIsEmpty = false;
                break;
            }
        }

        if ((PlaneIsEmpty) && (actor as AiAircraft).IsAirborne())
        {

            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsElevatorDisabled);
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsAileronsDisabled);
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsRudderDisabled);
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng0TotalFailure);
            //for 2mots
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng1TotalFailure);

            //then wait 10min
            Timeout(600.0, () =>
            {
                (actor as AiAircraft).Destroy();
            });

        }
        else if (PlaneIsEmpty)
        {
            (actor as AiAircraft).Destroy();
        }
    }

    public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceLeave(player, actor, placeIndex);
        _DespawnEmptyPlane(actor);
    }
    // destroys crushlanded aircraft in 10 minutes
    public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft)
    {
        base.OnAircraftCrashLanded(missionNumber, shortName, aircraft);
        Timeout(600, () =>
        {
            aircraft.Destroy();
        });
    }
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.