Page 3 of 10 FirstFirst 12345 ... LastLast
Results 61 to 90 of 277

Thread: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

  1. #61
    Team Fusion Biggs's Avatar
    Join Date
    Nov 2012
    Location
    N/A
    Posts
    637
    Post Thanks / Like
    Total Downloaded
    0

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by ATAG_Noofy View Post
    What exactly is a "Spitfire Mk I with de Havilland airscrew", and is this this good news or bad news for the G50s?
    The De Havilland prop was manufactured as both a two-pitch and a constant speed unit. In the game currently, it is only represented as the two-pitch variant, as the 'Spit mkI' (87 octane) and the 'Spit mkI (100)'. The mkIa, mkIa (100) and mkIIa are the Rotol constant speed variants.

    The mkI and mkI 100 represent 'pre-BoB' spitfires. By the 'start' of the BoB most, if not all Spitfires and Hurricanes were either using the De Havilland constant speed or Rotol constant speed units.

    So no Noofy, no need to worry about them... The Beau on the other hand...
    Last edited by Biggs; Aug-13-2019 at 16:13.

  2. #62
    Student Pilot
    Join Date
    Jun 2019
    Posts
    14
    Post Thanks / Like
    Total Downloaded
    1.24 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    Sure!
    They will be available on all red home bases in about 2.5 hours from like now...
    Thanks for fast reply, I don't want to be annoying, but Spitfire I (100 octane) is still unavailable :E

  3. #63
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by Dupxo View Post
    Thanks for fast reply, I don't want to be annoying, but Spitfire I (100 octane) is still unavailable :E
    Is it really? It clearly shows I have no idea what Spitfire models have that prop type
    Now added - will be there in three hours from now ...

  4. Likes ATAG_Snapper, Dupxo liked this post
  5. #64
    Supporting Member Tibsun's Avatar
    Join Date
    Feb 2016
    Location
    Austria
    Posts
    915
    Post Thanks / Like
    Total Downloaded
    220.96 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    I surely would like to dive into them stutters that are to be caused by AI formations jumping in.
    As - well, I do not see them, do not experience them that way. How can you tell they are related? There's no message popping up there are raids spawning in are there?
    We (or I) know this because, we can spawn in bomber atacks on ATAG in radio menu, while they spawn in, they are announced in big letters that they were spawned in.
    Seeing stutters at the same time confirms that it is caused by it.

    Also we see players planes stutter, when they Alt-F2 from the crew seat or switches from one crewseat to another crewseat - means an AI will take it's seat back.
    No stutter is caused if player takes over a crew seat while not obtaining another crew seat, as the player still obtains the pilot seat.
    However you only see the related plane stutter while others don't stutter.
    Afterall clearly stutters are caused by AI on player planes, aswell as on all the other planes, when big AI formation spawns in.

    I still see planes jumping to different positions. Or I don't hear shots hitting me often because of the lag, but this is present in ATAG aswell as this might be related to the ping.
    The laggier it is the more pronounced this laggy sound is.

    Only if the clients game see the bullets that appear on his screen hit his plane will make the impact sound.
    If they would make it in battlefield stile or other games, you would hear a multiple hit sound at the same time, making it seem you only got hit once, but die instantly. I think this is not a well solution aswell.
    However there might be only these two ways. Or maybe try to make the impact sound afterwards and display the hit sounds seperated to make it sound legit.
    But that's not in the hands of the server operators.

    No Idea why planes stuck midair though, whish you can find the solution for that, it's quite annoying.

  6. Likes DD_FT liked this post
  7. #65
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by Tibsun View Post
    We (or I) know this because, we can spawn in bomber atacks on ATAG in radio menu, while they spawn in, they are announced in big letters that they were spawned in.
    Seeing stutters at the same time confirms that it is caused by it.

    Also we see players planes stutter, when they Alt-F2 from the crew seat or switches from one crewseat to another crewseat - means an AI will take it's seat back.
    No stutter is caused if player takes over a crew seat while not obtaining another crew seat, as the player still obtains the pilot seat.
    However you only see the related plane stutter while others don't stutter.
    Afterall clearly stutters are caused by AI on player planes, aswell as on all the other planes, when big AI formation spawns in.

    I still see planes jumping to different positions. Or I don't hear shots hitting me often because of the lag, but this is present in ATAG aswell as this might be related to the ping.
    The laggier it is the more pronounced this laggy sound is.

    Only if the clients game see the bullets that appear on his screen hit his plane will make the impact sound.
    If they would make it in battlefield stile or other games, you would hear a multiple hit sound at the same time, making it seem you only got hit once, but die instantly. I think this is not a well solution aswell.
    However there might be only these two ways. Or maybe try to make the impact sound afterwards and display the hit sounds seperated to make it sound legit.
    But that's not in the hands of the server operators.

    No Idea why planes stuck midair though, whish you can find the solution for that, it's quite annoying.
    Thanks for that ... I am not sure what I can do to improve stuff, but will try.
    For now I have set the removal of AI a/c after landing to a time out of 2 seconds: Previously this was 2 minutes.
    Hopefully this will those a/c stuck midair disappear within 2 seconds...
    (This change will be active in about three hours from now)

  8. Likes Tibsun liked this post
  9. #66
    Supporting Member Tibsun's Avatar
    Join Date
    Feb 2016
    Location
    Austria
    Posts
    915
    Post Thanks / Like
    Total Downloaded
    220.96 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    I would suggest to try an kind of emtpy "mission" no ai and add additional server settings one by one like despawn scripts or alike to see which on of it is causing the problem.
    Then maybe ATAG mission creators can help out with their despawn scripts or whatever they do to make a good server.

    Oh maybe that's the cause:
    As I know, usually if someone jumps out of their plane, their plane get's taken over by a "dummy AI" which will then make it crash to ground.
    Usually whenever the player took the parachute or abdoned the plane and it crashes to ground it says AI plane crashed and AI died.
    Never liked that it says AI instead of the last player name that used this plane seems like this is a workaround to make the plane crash to ground.

    One of my biggest wish would be like that TFS would remove the workaround dummy AI and make the plane just dead stick with the last input crash instead.
    Having empty pilot seat but plane linked to the last Pilot Player to see the real name of the shot down plane.
    Funny enough to have a AI Pilot die when the actual Pilot took the chute.


    Even though I don't really enjoy AI (only sometimes shooting bombers) and having everybody on this server, I still support different server options for players on CloD and I highly appreciate your open mind to make your server a better place.
    So thanks for your effort
    Last edited by Tibsun; Aug-17-2019 at 11:03.

  10. Likes Gingerbread liked this post
  11. #67
    Team Fusion ATAG_Noofy's Avatar
    Join Date
    Feb 2019
    Location
    https://w3w.co/chat.hisses.lofty
    Posts
    2,602
    Post Thanks / Like
    Total Downloaded
    1.25 GB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    Hopefully this will [make] those a/c stuck midair disappear within 2 seconds...
    yesss! No more Meep-Meep Beaufighter hanging there for ages
    Gigabyte Z390 UD | i7 9700K @3.60GHz | 16.0 GB | Windows 10 Pro 64-Bit | NVIDIA GeForce GTX 1070 Ti
    TM Warthog HOTAS | Saitek pro rudder pedals | TrackIR 5 | TeamSpeak 3.3.2 | TS Notifier 1.6.0h

  12. #68
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by ATAG_Noofy View Post
    yesss! No more Meep-Meep Beaufighter hanging there for ages
    Well, the "fix" of August 17th did not work.
    Changed some other bit of code to see if that will help Will be active in about 2.5 hours from now.
    (Not easy to test this one though)

  13. #69
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Reverted that latest change, as that resulted in your a/c disappearing once you've baled out... In my opinion that's worse than the every now and then occurrence of an empty a/c stuck in the air for 60 seconds. Could be just me though... what's the better option?

  14. Likes Tibsun liked this post
  15. #70
    Supporting Member Tibsun's Avatar
    Join Date
    Feb 2016
    Location
    Austria
    Posts
    915
    Post Thanks / Like
    Total Downloaded
    220.96 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Actuall not sure, both is quite bad.

    I just noticed I didn't complete my though above. It looks like if theres no AI spawned into an abdoned plane, which would make the plane being damaged and crash to ground. It seems to be missing. Not sure how ATAG is doing that.

  16. #71
    Team Fusion ATAG_Noofy's Avatar
    Join Date
    Feb 2019
    Location
    https://w3w.co/chat.hisses.lofty
    Posts
    2,602
    Post Thanks / Like
    Total Downloaded
    1.25 GB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    One of the problems of the plane stuck in the air variant is the risk of collision when you closely follow someone who bails out. Happens often in dogfights...
    Gigabyte Z390 UD | i7 9700K @3.60GHz | 16.0 GB | Windows 10 Pro 64-Bit | NVIDIA GeForce GTX 1070 Ti
    TM Warthog HOTAS | Saitek pro rudder pedals | TrackIR 5 | TeamSpeak 3.3.2 | TS Notifier 1.6.0h

  17. #72
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    So, now I've added the Refuel and Re-arm stuff into our server.
    Available via Tab-4, I've used the multiplayer version that was mentioned here: Rearm Refuel Example Scripts For Cliffs Of Dover

    One downside, if you leave your a/c on the runway, AI will take it over, and have its ways with it... Previous versions removed it within a second, that part has stopped working for unknown reasons... Oh well..

    Edit: Will be truly active in an hour and a bit from now, once the mission restarts ...

  18. #73
    Supporting Member No.119_Bruv's Avatar
    Join Date
    Jul 2017
    Location
    Gosport, UK
    Posts
    205
    Post Thanks / Like
    Total Downloaded
    0

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Thanks FT, I look forward to giving this a whirl!

    ~S~

  19. Likes ATAG_TCP liked this post
  20. #74
    Team Fusion Artist's Avatar
    Join Date
    Mar 2010
    Posts
    2,866
    Post Thanks / Like
    Total Downloaded
    319.97 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    One downside, if you leave your a/c on the runway, AI will take it over, and have its ways with it... Previous versions removed it within a second, that part has stopped working for unknown reasons... Oh well..
    Is this because of rearm/refuel? A side effect?

  21. #75
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by Artist View Post
    Is this because of rearm/refuel? A side effect?
    It kinda is...
    There was a bit of code in the original mission that would remove the a/c, in a routine named 'OnPlaceLeave'

    That same name is also used in the code for Rearm/Refuel. And one cannot have two of those objects having same name in the code.
    So, I tried to combine them into one. And I think I did. The bits of code are in, no errors

    But no, it did not work as intended. So, in the end, my limited knowledge of C## is probably the cause.
    (Though not sure whether it's even a problem or issue ... might call it a feature and leave it at that!)

  22. #76
    Team Fusion Artist's Avatar
    Join Date
    Mar 2010
    Posts
    2,866
    Post Thanks / Like
    Total Downloaded
    319.97 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Ahhh!

    Yes: You see, everything that concerns RearmRefuel and is within that (example) class Mission, must be copied into the existing functions of your real class Mission!

    So that single line in the Rearm/Refuel example Mission's OnPlaceLeave(Player player, AiActor actor, int placeIndex) function

    ManageRnr.cancelOfPlayer(GamePlay, player);

    must just be added to your existing OnPlaceLeave(Player player, AiActor actor, int placeIndex) function.

    None of the functions in the example Mission class should replace one of yours...

  23. #77
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Thanks for that explanation Artist ... I think I did that, in the end:

    Snippet from the entire .cs file, included at the top is the end of the inserted RR code...
    Code:
                /// set 4. Mission Menu again (not showing!, just setting)
                setMainMenu(CurPlayer);
            }
        }
    
       public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
           {
    	
    	base.OnPlaceLeave(player, actor, placeIndex);
           Timeout(1, () =>
            { damageAiControlledPlane(actor); }
               );
     	/// REARM/REFUEL: cancel possibly pending request of player
           ManageRnr.cancelOfPlayer(GamePlay, player);
         }
    
        public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages)
        {
    Took the freedom to attached the .cs completely, below as a spolier ... if you could take look at it ... please ?

    Must add this: Previously, the leftover a/c was removed within 1 second (Timeout(1,()), looks like now it is doing that after one minute or so ...
    Could the added code have changed the timer/timing within 'Timeout'?

    Spoiler: 
    //$reference parts/bob/partBob.dll
    //$reference parts/core/core.dll
    /// ---------------------------------------------------------------------------
    /// Basic Script For Rearm And Refuel with
    /// * checking for
    /// - aircraft must be on the ground at an airfield
    /// - aircraft may not be damaged
    /// - fuel cocks must be closed
    /// - magnetos must be off
    /// - aircraft must not be moving (set chocks)
    ///
    /// * Refuel time is adjusted for amount of fuel
    ///
    /// Bonus: "3. Show damages"
    /// * Shows a detailed list of damages of your aircraft
    /// (Server log info window)
    ///
    /// Inserts into Order Menu (aka TAB Menu):
    ///
    /// 4. Mission
    /// 1. Rearm
    /// 1. Rearm all
    /// 2. Rearm guns only
    /// 2. Refuel
    /// 1. Refuel 100%
    /// 2. Refuel 75%
    /// 3. Refuel 50%
    /// 4. Refuel 40%
    /// 5. Refuel 30%
    /// 6. Refuel 25%
    /// 7. Refuel 20%
    /// 8. Refuel 15%
    /// 9. Refuel 10%
    /// 3. Show damages
    ///
    ///
    /// @author ATAG_Oskar, Artist
    /// @version 3.7
    /// @date 2019-09-23
    /// ---------------------------------------------------------------------------
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.IO;
    using System.Reflection;
    using System.Timers;

    using maddox.game;
    using maddox.game.world;
    using maddox.GP;
    using part;

    /// ---------------------------------------------------------------------------
    /// The Rearm/Refuel Configuration
    /// ---------------------------------------------------------------------------
    public static class RearmRefuelConfig {
    /// Duration in seconds for full rearm
    public static int REARM_DURATION = 150;

    /// Duration in seconds for 100% refuel
    /// Lesser fuel amounts result in relative fractions of that.
    /// Note: see REFUEL_MIN_DURATION below
    public static int REFUEL_DURATION = 270;

    /// Minimum duration in seconds for refuel
    /// Refuel time cannot be shorter than that
    public static int REFUEL_MIN_DURATION = 150;

    /// Interval of "... complete in Min:ec messages
    public static int MESSAGE_INTERVAL = 15;

    /// Allowable factor for within airfield perimeter.
    /// The visible airfields are sometimes bigger than the technical value configured.
    /// Even spawn points may sometimes be outside of that technical perimeter
    /// Technical airfield perimeter is multiplied with this.
    public static double AIRFIELD_PERIMETER_ADJUST = 1.5;

    /// Allowable deviation from airfield's elevation in meter.
    /// To check if we're actually on the ground, we need to check plane's elevation
    /// against the airfield's. Unfortunately airfield elevation is not homogenous, en
    /// extreme is Maidstone with places up to 7m different from technical elevation.
    /// Note: This is strictly not necessary, because speed=0 within airfield
    /// perimeter would mean the same, but for user friendliness we say
    /// 'land on airfield' first and 'set chokes' later
    /// value in meters
    public static double AIRFIELD_ELEVATION_ADJUST = 7;

    /// maximum engines to check (tanks, fuelcocks, magnetos, etc.)
    public static int MAX_ENGINE_COUNT = 2;

    /// output debugging messages
    public static bool DEBUG_MESSAGES = false;
    }
    /// ---------------------------------------------------------------------------
    /// A single (Rearm/Refuel) Request
    /// This class handles the delay and executing of the rearm/refuel for one player
    /// ---------------------------------------------------------------------------
    public class RearmRefuelRequest {

    /// INTERNALS
    private IGamePlay m_GamePlay;
    private Player m_Player;
    private System.Timers.Timer m_Timer;
    private int m_nMessageElapsed = 0;

    private bool m_bRearmRequest = false;
    private bool m_bRearmGunsOnly = false;

    private bool m_bRearmComplete = false;
    private int m_RearmDuration = 0;
    private int m_nRearmElapsed = 0;

    private bool m_bRefuelRequest = false;
    private int m_iRefuelPercent = 0;

    private bool m_bRefuelComplete = false;
    private int m_RefuelDuration = 0;
    private int m_nRefuelElapsed = 0;


    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// THE DELAY FUNCTIONS
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// Constructor: Creates a request for the player with rearm, refuel, or both
    /// If this is constructed with one request (e.g. rearm) only, the other (refuel) can be added later.
    /// </summary>
    public RearmRefuelRequest(IGamePlay GamePlay, Player CurPlayer, bool bRearm, bool bRearmGunsOnly, bool bRefuel, int iRefuelPercent)
    {
    m_GamePlay = GamePlay;
    m_Player = CurPlayer;

    m_Timer = new Timer();
    m_Timer.Interval = 1000;
    m_Timer.Elapsed += onTick;

    m_nMessageElapsed = 0;
    if(bRearm)
    {
    addRearmRequest(bRearmGunsOnly);
    }
    if(bRefuel)
    {
    addRefuelRequest(iRefuelPercent);
    }
    }
    /// <summary>
    /// initiates rearm sequence
    /// calculates time needed, displays initial message
    /// </summary>
    public bool addRearmRequest(bool bGunsOnly)
    {
    if(!m_bRearmRequest)
    {
    m_bRearmGunsOnly = bGunsOnly;
    m_RearmDuration = RearmRefuelConfig.REARM_DURATION;
    m_nRearmElapsed = 0;

    m_bRearmRequest = true;
    m_bRearmComplete = false;
    if(!m_Timer.Enabled)
    {
    m_Timer.Start();
    }
    TimeSpan spanTmp = new TimeSpan(0, 0, m_RearmDuration);
    m_GamePlay.gpHUDLogCenter(new Player[] {m_Player}, "Rearm complete in "+string.Format("{0:00}:{1:00}", spanTmp.Minutes, spanTmp.Seconds));
    return true;
    }
    else
    {
    m_GamePlay.gpHUDLogCenter(new Player[] {m_Player}, "Rearm in progress ...");
    }
    return false;
    }
    /// <summary>
    /// initiates refuel sequence
    /// calculates time needed, displays initial message
    /// </summary>
    public bool addRefuelRequest(int iPercent)
    {
    if(!m_bRefuelRequest)
    {
    m_iRefuelPercent = iPercent;
    m_RefuelDuration = Math.Max(RearmRefuelConfig.REFUEL_MIN_DURATION, (RearmRefuelConfig.REFUEL_DURATION * iPercent)/100);
    m_nRefuelElapsed = 0;

    /// empty the tank
    execRefuel(m_Player, 0);

    m_bRefuelRequest = true;
    m_bRefuelComplete = false;

    if(!m_Timer.Enabled)
    {
    m_Timer.Start();
    }
    TimeSpan spanTmp = new TimeSpan(0, 0, m_RefuelDuration);
    m_GamePlay.gpHUDLogCenter(new Player[] {m_Player}, "Refuel complete in "+string.Format("{0:00}:{1:00}", spanTmp.Minutes, spanTmp.Seconds));
    return true;
    }
    else
    {
    m_GamePlay.gpHUDLogCenter(new Player[] {m_Player}, "Refuel in progress ...");
    }
    return false;
    }
    /// <summary>
    /// returns true if all requests have been completed.
    /// </summary>
    public bool isCompleted()
    {
    if(m_bRearmRequest && !m_bRearmComplete)
    {
    return false;
    }
    if(m_bRefuelRequest && !m_bRefuelComplete)
    {
    return false;
    }
    return true;
    }
    /// <summary>
    /// returns true if this requests belongs to player CurPlayer.
    /// </summary>
    public bool isPlayer(Player CurPlayer)
    {
    return(m_Player == CurPlayer);
    }
    public void cancel()
    {
    m_Timer.Stop();
    m_bRearmRequest = false;
    m_bRearmComplete = false;
    m_bRefuelRequest = false;
    m_bRefuelComplete = false;
    }
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// INTERNAL PROCESSING
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// Checks the initiated rearm/refuel sequences for status.
    /// Executes Rearm or Refuel when delay time has elapsed.
    /// Displays update messages.
    /// <summary>
    public void onTick(Object source, ElapsedEventArgs e)
    {
    ArrayList aMsg = new ArrayList();

    if (m_bRearmRequest && !m_bRearmComplete)
    {
    if(++m_nRearmElapsed >= m_RearmDuration) {
    execRearm(m_Player, m_bRearmGunsOnly);
    m_bRearmComplete = true;
    aMsg.Add("Rearm complete");
    }
    }

    if (m_bRefuelRequest && !m_bRefuelComplete)
    {
    if(++m_nRefuelElapsed >= m_RefuelDuration) {
    execRefuel(m_Player, m_iRefuelPercent);
    m_bRefuelComplete = true;
    aMsg.Add("Refuel complete");
    }
    }

    /// ALL DONE
    if(isCompleted())
    {
    m_Timer.Stop();
    }
    /// NOT ALL DONE, YET
    else if(++m_nMessageElapsed >= RearmRefuelConfig.MESSAGE_INTERVAL)
    {
    if(m_bRearmRequest && !m_bRearmComplete)
    {
    TimeSpan spanTmp = new TimeSpan(0, 0, (int)(m_RearmDuration - m_nRearmElapsed));
    aMsg.Add("Rearm complete in "+string.Format("{0:00}:{1:00}", spanTmp.Minutes, spanTmp.Seconds));
    }
    if(m_bRefuelRequest && !m_bRefuelComplete)
    {
    TimeSpan spanTmp = new TimeSpan(0, 0, (int)(m_RefuelDuration - m_nRefuelElapsed));
    aMsg.Add("Refuel complete in "+string.Format("{0:00}:{1:00}", spanTmp.Minutes, spanTmp.Seconds));
    }
    m_nMessageElapsed = 0;
    }

    if(0 != aMsg.Count)
    {
    object[] oArr = aMsg.ToArray();
    string sTxt = "";
    for (int i = 0; i < oArr.Length; i++) {
    sTxt += (string)oArr[i];
    if(i+1 < oArr.Length) sTxt += ", ";
    }
    m_GamePlay.gpHUDLogCenter(new Player[] {m_Player}, sTxt);
    }

    }
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// THE +REAL* REARM / REFUEL FUNCTIONS
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// executes the rearm on the player's aircraft.
    /// </summary>
    private void execRearm(Player CurPlayer, bool bGunsOnly)
    {
    /// The player might have gone ...
    try {
    AiAircraft PlayersAircraft = CurPlayer.Place() as AiAircraft;
    PlayersAircraft.RearmPlane(bGunsOnly);
    }
    catch(Exception e){}
    }
    /// <summary>
    /// executes the refuel on the player's aircraft.
    /// </summary>
    private void execRefuel(Player CurPlayer, int iPercent)
    {
    /// The player might have gone ...
    try {
    AiAircraft PlayersAircraft = CurPlayer.Place() as AiAircraft;
    PlayersAircraft.RefuelPlane(iPercent);
    }
    catch(Exception e){}
    }
    }
    /// ---------------------------------------------------------------------------
    /// Managing Rearm/Refuel Requests
    /// This class handles the delay and executing of the rearm/refuel for all players
    /// - Checking Requirements
    /// - Starting the processes
    /// ---------------------------------------------------------------------------
    public class RearmRefuelManager {
    /// All requests currently pending
    private List<RearmRefuelRequest> m_aRequests = new List<RearmRefuelRequest>();

    /// Constructor
    public RearmRefuelManager()
    {

    }
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// THE REQUIREMENTS
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// returns true if all requirements are met
    /// </summary>
    public bool areRequirementsMet(IGamePlay GamePlay, Player CurPlayer, bool bShowFailMessage)
    {
    bool bMet = true;
    ArrayList aFailMsg = new ArrayList();

    if(RearmRefuelConfig.DEBUG_MESSAGES)
    {
    AiAircraft PlayersAircraft = CurPlayer.Place() as AiAircraft;
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Aircraft: "+PlayersAircraft.InternalTypeName(), null);
    }

    /// BASIC: MUST BE LANDED
    if(!isLandedOnAirfield(GamePlay, CurPlayer))
    {
    aFailMsg.Add("land on an airfield to rearm or refuel.");
    }
    /// BASIC: MUST BE UNDAMAGED
    else if(0!=listDamages(GamePlay, CurPlayer, false))
    {
    aFailMsg.Add("take another aircraft, this one is damaged.");
    }
    /// LIST: FUELCOCKS, MAGNETOS, NOT-MOVING
    else
    {
    if(!hasClosedAllFuelCocks(GamePlay, CurPlayer))
    {
    aFailMsg.Add("close fuelcocks");
    }
    if(!hasAllMagnetosOff(GamePlay, CurPlayer))
    {
    aFailMsg.Add("switch off magnetos");
    }
    if(isMoving(GamePlay, CurPlayer))
    {
    aFailMsg.Add("set chocks");
    }
    }

    if( 0 != aFailMsg.Count )
    {
    object[] oArr = aFailMsg.ToArray();
    string sFailMessage = "Please ";
    for (int i = 0; i < oArr.Length; i++) {
    sFailMessage += (string)oArr[i];
    if(i+1 < oArr.Length) sFailMessage += ", ";
    }
    GamePlay.gpHUDLogCenter(new Player[] {CurPlayer}, sFailMessage);
    bMet = false;
    }

    return bMet;
    }
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// INDIVIDUAL REQUIREMENTS
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// returns true if aircraft is on the ground on an airfield
    /// </summary>
    public bool isLandedOnAirfield(IGamePlay GamePlay, Player CurPlayer)
    {
    bool bOnAirfield = false;
    try {
    Point3d PlaneLoc = CurPlayer.Place().Pos();
    AiAirport[] aPorts = GamePlay.gpAirports();

    foreach(AiAirport Port in aPorts)
    {
    Point3d PortLoc = new Point3d(Port.Pos().x, Port.Pos().y, Port.Pos().z);

    /// Is plane within airfield perimeter? We allow factor AIRFIELD_PERIMETER_ADJUST
    if (PlaneLoc.distance(ref PortLoc) <= Port.FieldR()*RearmRefuelConfig.AIRFIELD_PERIMETER _ADJUST)
    {
    /// is plane +- X meters of airfield's elevation?
    /// see notes on RearmRefuelConfig.AIRFIELD_ELEVATION_ADJUST
    if(PlaneLoc.z <= PortLoc.z + RearmRefuelConfig.AIRFIELD_ELEVATION_ADJUST && PlaneLoc.z >= PortLoc.z - RearmRefuelConfig.AIRFIELD_ELEVATION_ADJUST)
    {
    bOnAirfield = true;
    break;
    }
    break;
    }
    }
    }
    catch(Exception e)
    {
    bOnAirfield = true;
    }

    if(RearmRefuelConfig.DEBUG_MESSAGES)
    {
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Checking on airfield: "+bOnAirfield, null);
    }

    return bOnAirfield;
    }
    /// <summary>
    /// returns number of damages to aircraft
    /// lists damages in server log info window
    /// shows HUD messages if desired
    /// </summary>
    public int listDamages(IGamePlay GamePlay, Player CurPlayer, bool bShowMessages)
    {
    int nDamages = 0;
    AiAircraft PlayersAircraft = CurPlayer.Place() as AiAircraft;
    string[] PartNames = Enum.GetNames(typeof(part.NamedDamageTypes));
    part.NamedDamageTypes[] PartVals = (part.NamedDamageTypes[])Enum.GetValues(typeof(part.NamedDamageTypes));
    double dDamage = 0;

    if(bShowMessages)
    {
    GamePlay.gpHUDLogCenter(new Player[] {CurPlayer}, "Checking for damages (See chat/server info window) ...");
    }

    for(int i = 0; i < PartNames.Length; i++)
    {
    try
    {
    dDamage = PlayersAircraft.getParameter(part.ParameterTypes.M _NamedDamage, (int)(PartVals[i]));
    if(0 != dDamage)
    {
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Damage: "+PartNames[i], null);
    nDamages++;
    }
    }
    catch (IndexOutOfRangeException e)
    {
    }
    }

    if(bShowMessages)
    {
    if(0==nDamages)
    {
    GamePlay.gpHUDLogCenter(new Player[] {CurPlayer}, "No damages");
    }
    else
    {
    GamePlay.gpHUDLogCenter(new Player[] {CurPlayer}, "Your aircraft has damages: See chat/server info window.");
    }
    }

    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Checking for damages: "+nDamages, null);
    return nDamages;
    }
    /// <summary>
    /// returns true if all fuel cocks are closed
    /// </summary>
    public bool hasClosedAllFuelCocks(IGamePlay GamePlay, Player CurPlayer)
    {
    bool bAllClosed = true;
    AiAircraft PlayersAircraft = CurPlayer.Place() as AiAircraft;
    double dPos = 0;

    /// The G.50 cannot close fuelcock
    if(PlayersAircraft.InternalTypeName().Contains("Ai rcraft.G50"))
    {
    if(RearmRefuelConfig.DEBUG_MESSAGES)
    {
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Checking fuelcocks, G.50 has none", null);
    }
    }
    else for(int i=0; bAllClosed && i < RearmRefuelConfig.MAX_ENGINE_COUNT; i++)
    {
    try
    {
    dPos = PlayersAircraft.getParameter(part.ParameterTypes.C _FuelTankSelector, i);

    if(RearmRefuelConfig.DEBUG_MESSAGES)
    {
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Checking fuelcocks, engine "+i+": "+dPos, null);
    }

    /// Spitfire's values are reversed
    /// 0: ON, 1: OFF
    if(PlayersAircraft.InternalTypeName().Contains("Sp itfire"))
    {
    if(1!=dPos) bAllClosed=false;
    }
    /// Ju 87 B-2 values are reversed, too
    /// 0: both, 1: left, 2: right, 3: close
    else if(PlayersAircraft.InternalTypeName().Contains("Ju-87"))
    {
    if(3!=dPos) bAllClosed=false;
    }
    /// All others have 0: OFF and 1,2,3: something not OFF
    else
    {
    if(0!=dPos) bAllClosed=false;
    }
    }
    /// nor more fuelcocks
    catch(IndexOutOfRangeException e)
    {
    if(i==0 && RearmRefuelConfig.DEBUG_MESSAGES)
    {
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Exception at "+i, null);
    }
    break;
    }
    }
    return bAllClosed;
    }
    /// <summary>
    /// returns true if all magnetos are turned off
    /// </summary>
    private bool hasAllMagnetosOff(IGamePlay GamePlay, Player CurPlayer)
    {
    bool bAllOff = true;
    AiAircraft PlayersAircraft = CurPlayer.Place() as AiAircraft;

    for(int i=0; bAllOff && i < RearmRefuelConfig.MAX_ENGINE_COUNT; i++)
    {
    try
    {
    double dVal = PlayersAircraft.getParameter(part.ParameterTypes.C _Magneto, i);

    if(RearmRefuelConfig.DEBUG_MESSAGES)
    {
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Checking magnetos, engine "+i+": "+dVal, null);
    }

    if(0!=dVal)
    {
    bAllOff = false;
    }
    }
    /// No more magnetos
    catch(IndexOutOfRangeException e)
    {
    break;
    }
    }

    return bAllOff;
    }
    /// <summary>
    /// returns true if the plane is stationary
    /// </summary>
    private bool isMoving(IGamePlay GamePlay, Player CurPlayer)
    {
    bool bIsMoving = false;
    AiAircraft aircraft = CurPlayer.Place() as AiAircraft;
    try
    {
    double speed = 0;
    speed = aircraft.getParameter(part.ParameterTypes.Z_Veloci tyTAS, -1);

    if(RearmRefuelConfig.DEBUG_MESSAGES)
    {
    GamePlay.gpLogServer(new Player[] {CurPlayer}, "Checking speed: "+speed, null);
    }

    if (speed > 0)
    {
    bIsMoving = true;
    }
    }
    catch (IndexOutOfRangeException e)
    {

    }
    return bIsMoving;
    }
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// THE DELAY FUNCTIONS
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// adds a rearm request to a pending refuel request - or creates a new request
    /// </summary>
    public void addRearmRequest(IGamePlay GamePlay, Player CurPlayer, bool bGunsOnly)
    {
    cleanup(GamePlay);
    foreach(RearmRefuelRequest Req in m_aRequests)
    {
    if(Req.isPlayer(CurPlayer))
    {
    Req.addRearmRequest(bGunsOnly);
    return;
    }
    }
    RearmRefuelRequest reqNew = new RearmRefuelRequest(GamePlay, CurPlayer, true, bGunsOnly, false, 0);
    m_aRequests.Add(reqNew);
    }
    /// <summary>
    /// adds a refuel request to a pending rearm request - or creates a new request
    /// </summary>
    public void addRefuelRequest(IGamePlay GamePlay, Player CurPlayer, int iPercent)
    {
    cleanup(GamePlay);
    foreach(RearmRefuelRequest Req in m_aRequests)
    {
    if(Req.isPlayer(CurPlayer))
    {
    Req.addRefuelRequest(iPercent);
    return;
    }
    }
    RearmRefuelRequest reqNew = new RearmRefuelRequest(GamePlay, CurPlayer, false, false, true, iPercent);
    m_aRequests.Add(reqNew);
    }
    /// <summary>
    /// remove all completed requests
    /// </summary>
    public void cleanup(IGamePlay GamePlay)
    {
    m_aRequests.RemoveAll(isRequestCompleted);
    }
    /// <summary>
    /// callback for cleanup()
    /// </summary>
    private bool isRequestCompleted(RearmRefuelRequest Req)
    {
    return(Req.isCompleted());
    }
    /// <summary>
    /// cancel request of player
    /// </summary>
    public void cancelOfPlayer(IGamePlay GamePlay, Player CurPlayer)
    {
    foreach(RearmRefuelRequest Req in m_aRequests)
    {
    if(Req.isPlayer(CurPlayer))
    {
    Req.cancel();
    break;
    }
    }
    cleanup(GamePlay);
    }
    /// <summary>
    /// remove all requests
    /// </summary>
    public void cancelAll(IGamePlay GamePlay)
    {
    foreach(RearmRefuelRequest Req in m_aRequests)
    {
    Req.cancel();
    }
    m_aRequests.Clear();
    GamePlay.gpLogServer(new Player[] {GamePlay.gpPlayer()}, "all rquests cancelled", null);
    }
    }

    /// ---------------------------------------------------------------------------
    /// INTEGRATE INTO THE MISSION
    /// ---------------------------------------------------------------------------
    public class Mission : AMission {
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// STEP 1/4: ADD THE REAR/REFUEL MANAGER
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    private RearmRefuelManager ManageRnr = new RearmRefuelManager();
    public long Tick_Mission_Time { get; set; }// Sets the Mission Clock for Time Remaining in Mission.

    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// STEP 2/4: INTEGRATE AND CONFIGURE
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    public override void OnBattleStarted()
    {

    MissionNumberListener = -1;

    /// REARM/REFUEL: CONFIGURE
    /// Duration in seconds for full rearm
    // RearmRefuelConfig.REARM_DURATION = 150;

    /// Duration in seconds for 100% refuel
    /// Lesser fuel amounts result in relative fractions of that.
    /// Note: see REFUEL_MIN_DURATION below
    // RearmRefuelConfig.REFUEL_DURATION = 270;

    /// Minimum duration in seconds for refuel
    /// Refuel time cannot be shorter than that
    // RearmRefuelConfig.REFUEL_MIN_DURATION = 150;

    /// Interval in seconds of "... complete in Min:ec messages
    // RearmRefuelConfig.MESSAGE_INTERVAL = 15;

    /// The visible airfields are sometimes bigger than the technical value configured.
    /// Even spawn points may sometimes be outside of that technical perimeter
    /// Technical airfield perimeter is multiplied with this.
    // RearmRefuelConfig.AIRFIELD_PERIMETER_ADJUST = 1.5;

    /// maximum engines to check (tanks, fuelcocks, magnetos, etc.)
    // RearmRefuelConfig.MAX_ENGINE_COUNT = 2;
    }
    public override void OnBattleStoped()
    {
    /// REARM/REFUEL: CLEANUP ANY PENDING REQUESTS
    ManageRnr.cancelAll(GamePlay);
    }
    public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
    {
    base.OnPlaceEnter(player, actor, placeIndex);
    setMainMenu(player);
    }

    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// STEP 3/4: ADD TO / SETTING THE MENU "4. Mission"
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// Enable the Menu for the Player here
    /// </summary>
    /// <summary>
    /// Fill "4. Mission" with "Rearm", "Refuel, Show damages" submenus
    /// </summary>
    private void setMainMenu(Player player)
    {
    GamePlay.gpSetOrderMissionMenu(player, false, 0, new string[] {"Rearm", "Refuel", "Show damages"}, new bool[] { true, true, true });
    }
    /// <summary>
    /// Fill "4. Mission - 1. Rearm" with "Rearm all", "Rearm only guns" submenus
    /// </summary>
    private void setSubMenuOne(Player player)
    {
    GamePlay.gpSetOrderMissionMenu(player, true, 1, new string[] {"Rearm all", "Rearm only guns"}, new bool[] {false, false});
    }
    /// <summary>
    /// Fill "4. Mission - 2. Refuel" with "100%", "75%", ... submenus
    /// </summary>
    private void setSubMenuTwo(Player player)
    {
    GamePlay.gpSetOrderMissionMenu(player, true, 2, new string[] {"Refuel 100%", "Refuel 75%", "Refuel 50%", "Refuel 40%", "Refuel 30%", "Refuel 25%", "Refuel 20%", "Refuel 15%", "Refuel 10%"}, new bool[] {false, false, false, false, false, false, false, false, false});
    }
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// STEP 4/4: HANDLE MENU CHOICES
    /// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~
    /// <summary>
    /// Process the user input on menu.
    /// </summary>
    public override void OnOrderMissionMenuSelected(Player CurPlayer, int ID, int menuItemIndex)
    {
    /// Handle Mission menu, "1 Rearm", "2 Refuel"
    /// If you don't do not setSubMenuRe...(), the menu will just stay at the MainMenu
    if( ID == 0 ){
    switch (menuItemIndex) {
    /// "Rearm" selected
    case 1:
    /// show sub menu only when all requirements are met
    if(ManageRnr.areRequirementsMet(GamePlay, CurPlayer, true))
    {
    setSubMenuOne(CurPlayer);
    }
    break;
    /// "Refuel" selected
    case 2:
    /// show sub menu only when all requirements are met
    if(ManageRnr.areRequirementsMet(GamePlay, CurPlayer, true))
    {
    setSubMenuTwo(CurPlayer);
    }
    break;
    /// "Show damages" selected
    case 3:
    ManageRnr.listDamages(GamePlay, CurPlayer, true);
    break;
    }
    }
    /// Handle rearm sub menu: "1 Rearm all", "2 Rearm only guns"
    else if(ID == 1)
    {
    switch (menuItemIndex) {
    /// back up one level
    case 0:
    break;
    /// exit menu (tab, escape, or other)
    case 255:
    break;
    /// the options
    case 1:
    /// check requirements (again!)
    if(ManageRnr.areRequirementsMet(GamePlay, CurPlayer, true))
    {
    ManageRnr.addRearmRequest(GamePlay, CurPlayer, false);
    }
    break;
    case 2:
    /// check requirements (again!)
    if(ManageRnr.areRequirementsMet(GamePlay, CurPlayer, true))
    {
    ManageRnr.addRearmRequest(GamePlay, CurPlayer, true);
    }
    break;
    default:
    break;
    }
    /// without setMainMenu here the player, when pressing "4", would
    /// find himself unexpectedly in *this* submenu again.
    /// set 4. Mission Menu again (not showing!, just setting)
    setMainMenu(CurPlayer);
    }
    /// Handle refule sub menu: "Refuel 100%", "Refuel ..."
    else if(ID == 2)
    {
    if(
    /// not: back up one level
    0!=menuItemIndex
    /// not: exit menu (tab, escape, or other)
    && 255!=menuItemIndex
    /// check requirements (again!)
    && ManageRnr.areRequirementsMet(GamePlay, CurPlayer, true)
    )
    {
    switch (menuItemIndex) {
    case 1:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 100);
    break;
    case 2:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 75);
    break;
    case 3:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 50);
    break;
    case 4:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 40);
    break;
    case 5:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 30);
    break;
    case 6:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 25);
    break;
    case 7:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 20);
    break;
    case 8:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 15);
    break;
    case 9:
    ManageRnr.addRefuelRequest(GamePlay, CurPlayer, 10);
    break;
    default:
    break;
    }
    }
    /// without setMainMenu here the player, when pressing "4", would
    /// find himself unexpectedly in *this* submenu again.
    /// set 4. Mission Menu again (not showing!, just setting)
    setMainMenu(CurPlayer);
    }
    }

    public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
    {

    base.OnPlaceLeave(player, actor, placeIndex);
    Timeout(1, () =>
    { damageAiControlledPlane(actor); }
    );
    /// REARM/REFUEL: cancel possibly pending request of player
    ManageRnr.cancelOfPlayer(GamePlay, player);
    }

    public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages)
    {
    base.OnActorDead(missionNumber, shortName, actor, damages);
    if (actor != null && actor is AiGroundActor)
    Timeout(20, () => { (actor as AiGroundActor).Destroy(); ; });

    if (actor is AiAircraft)
    { // remove killed aircraft
    Timeout((2), () => // remove aircraft 2 seconds after killed, used to be two minutes: Timeout((2 * 60), ()
    {
    if (actor != null & actor is AiAircraft)
    {
    (actor as AiAircraft).Destroy();}
    }
    );
    }
    }

    public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft)
    {
    base.OnAircraftCrashLanded(missionNumber, shortName, aircraft);
    Timeout(20, () =>
    { destroyPlane(aircraft);
    //GamePlay.gpLogServer( null, "Crashed Aircraft:" + shortName , null);
    }
    );
    }


    public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
    {
    base.OnAircraftLanded(missionNumber, shortName, aircraft);
    //April 27nd 2019: Changed to 120 from 360
    //August 17th 2019: Changed to 2 from 120: To remove a/c stuck mid air after pilot bale out / leaving server
    //August 20th 2019: Change of August 17th did not fix the issue.
    //August 24th 2019: Reverted back to 120
    double DespawnAfter = 120 ; // seconds after landing
    Timeout(DespawnAfter, () => // despawn after specified seconds
    {
    if (aircraft.Player(0) == null) // no human pilot
    {
    try
    {
    //2019-08-24 Opened the GamePlay.log line, and closed it again
    //GamePlay.gpLogServer( null, "Landed Aircraft:" + shortName , null);
    aircraft.Destroy();
    }
    catch { }
    } });

    ;
    }

    private bool isAiControlledPlane(AiAircraft aircraft)
    {
    if (aircraft == null)
    {
    return false;
    }


    Player[] players = GamePlay.gpRemotePlayers();
    foreach (Player p in players)
    {
    if (p != null && (p.Place() is AiAircraft) && (p.Place() as AiAircraft) == aircraft)
    {
    return false;
    }
    }
    return true;
    }


    private void destroyPlane(AiAircraft aircraft)
    {
    if (aircraft != null)
    aircraft.Destroy();
    }

    private void damageAiControlledPlane(AiActor actorMain)
    {
    foreach (AiActor actor in actorMain.Group().GetItems())
    {
    if (actor == null || !(actor is AiAircraft))
    return;

    AiAircraft aircraft = (actor as AiAircraft);

    if (!isAiControlledPlane(aircraft))
    return;

    if (aircraft == null)
    return;

    //2019-08-24 Not needed? Closed down - start
    //aircraft.hitNamed(part.NamedDamageTypes.ControlsEl evatorDisabled);
    //aircraft.hitNamed(part.NamedDamageTypes.ControlsAi leronsDisabled);
    //aircraft.hitNamed(part.NamedDamageTypes.ControlsRu dderDisabled);
    //aircraft.hitNamed(part.NamedDamageTypes.FuelPumpFa ilure);

    //int iNumOfEngines = (aircraft.Group() as AiAirGroup).aircraftEnginesNum();
    //for (int i = 0; i < iNumOfEngines; i++)
    //{
    // aircraft.hitNamed((part.NamedDamageTypes)Enum.Pars e(typeof(part.NamedDamageTypes), "Eng" + i.ToString() + "TotalFailure"));
    //}
    //2019-08-24 Not needed? Closed down - end


    //2019-08-24 Changed 120 to 1, but then back up to 30, as with 1, when one bales out, the ac gets removed immediately.
    Timeout(60, () =>
    {
    //GamePlay.gpLogServer( null, "Removed Aircraft via damageAiControlledPlane:" + aircraft , null);
    destroyPlane(aircraft);}
    );
    }
    }


    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
    base.OnTrigger(missionNumber, shortName, active);
    }
    }

  24. #78
    Team Fusion Artist's Avatar
    Join Date
    Mar 2010
    Posts
    2,866
    Post Thanks / Like
    Total Downloaded
    319.97 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    Thanks for that explanation Artist ... I think I did that, in the end:

    Snippet from the entire .cs file, included at the top is the end of the inserted RR code...
    Code:
                /// set 4. Mission Menu again (not showing!, just setting)
                setMainMenu(CurPlayer);
            }
        }
    
       public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
           {
    	
    	base.OnPlaceLeave(player, actor, placeIndex);
           Timeout(1, () =>
            { damageAiControlledPlane(actor); }
               );
     	/// REARM/REFUEL: cancel possibly pending request of player
           ManageRnr.cancelOfPlayer(GamePlay, player);
         }
    
        public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages)
        {
    Took the freedom to attached the .cs completely, below as a spolier ... if you could take look at it ... please ?

    Must add this: Previously, the leftover a/c was removed within 1 second (Timeout(1,()), looks like now it is doing that after one minute or so ...
    Could the added code have changed the timer/timing within 'Timeout'?
    Not that i can image, but try with putting the Rearm/Refuel cancel *before* you initate the timeout


    Code:
                /// set 4. Mission Menu again (not showing!, just setting)
                setMainMenu(CurPlayer);
            }
        }
    
       public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
           {
     	// REARM/REFUEL: cancel possibly pending request of player
            ManageRnr.cancelOfPlayer(GamePlay, player);
    	
    	base.OnPlaceLeave(player, actor, placeIndex);
           Timeout(1, () =>
            { damageAiControlledPlane(actor); }
               );
         }
    
        public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages)
        {

  25. Likes DD_FT liked this post
  26. #79
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Thanks very much Artist, thanks to your tips I think I figured out what is happening here...
    (Changing the sequence of the commands made no change by the way)

    It works as it is supposed to: The code is fine.
    Looks like I have not been paying attention in the 'original' pre RR version : I bet it happened there as well.

    Anyways, I'm happy now, although it's not perfect, I do not think it's a problem... not to me anyways, I can ignore it happening - as the circumstances will not occur that often: Create a/c, press Esc, leave a/c, pick a new one at the same base...

    Although I would like to get rid of a lot of the current code, and replace it by some new bits. Have no clue how though.
    The only code needed in this server (besides Rearm Refuel) is the proper removal of crashed and landed AI aircraft. Current code is based on ancient stuff from an early ATAG mission - and edited by me as well... it's a bit of a mess.


    Oh well.. Thanks again!

  27. #80
    ATAG Member ATAG_Oskar's Avatar
    Join Date
    Nov 2017
    Location
    Canada
    Posts
    986
    Post Thanks / Like
    Total Downloaded
    908.31 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    This should be all you need.


    public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex) {

    ManageRnr.cancelOfPlayer(GamePlay, player);
    damageAiControlledPlane(actor);
    }
    Last edited by ATAG_Oskar; Sep-25-2019 at 19:25.

  28. #81
    ATAG Member ATAG_Snarglepuss's Avatar
    Join Date
    Mar 2012
    Location
    Lethbridge, Alberta Canada
    Posts
    571
    Post Thanks / Like
    Total Downloaded
    3.0 KB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    I have been having my 110s and BR 20s disappear while on this server.
    Happens after only a minute or two in the BR 20 at Estree.
    It can happen to my 110 while I'm diving onto Hawkinge.
    Very strange goings on.
    Intel Core i7 9700k (8-core), 12MB Cache, Overclocked up to 4.6 GHz. 16GB DDR4 XMP at 2933MHz Dual Channel HyperX
    NVIDIA GeForce GTX 1080Ti with 11GB GDDR5X. 512GB M.2 PCle NVMe SSD (Boot)
    Alienware 850 Watt power supply liquid cooled. Alienware 34in Curved WQHD 3440 x 1440 @ 120Hz. G-SYNC. DP 1.2 mode.
    Thrustmaster 1600, Saitek rudder pedals.

  29. #82
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by ATAG_Snarglepuss View Post
    I have been having my 110s and BR 20s disappear while on this server.
    Happens after only a minute or two in the BR 20 at Estree.
    It can happen to my 110 while I'm diving onto Hawkinge.
    Very strange goings on.
    Could very well be due to the changes made for the refuel and rearm stuff... Will look into it.
    And maybe even remove that RR code again - just need to check how many really use it.

  30. #83
    Ace Erpr.Gr.210_Mölders's Avatar
    Join Date
    Dec 2015
    Location
    Italy
    Posts
    2,452
    Post Thanks / Like
    Total Downloaded
    1,002.26 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by ATAG_Snarglepuss View Post
    I have been having my 110s and BR 20s disappear while on this server.
    Happens after only a minute or two in the BR 20 at Estree.
    It can happen to my 110 while I'm diving onto Hawkinge.
    Very strange goings on.
    It seems to happens only when you jump to another crew position, at least in the Bf 110 variants ( no pilot ). For example if you jump to the rear gunner position, also only one time, and then you back to the pilot one your aircraft then disappers after a minute or so. Still testing this but it seems that if you occupy only the pilot position ( not switching to any other one at all ) this doesn't seems to happen.
    My guess is that the server script, when switching to a crew position ( no pilot ), considers you as leaving the plane so it despawn\delete it like when you leave the aircraft pressing ALT+F2.
    On the main ATAG server, where the rearm/refuel script is also active, this doesn't seems to happen so the problem seems to be only DD server script related; Probably you wrote something wrong in the script you are using. ( again, just my guess )
    Last edited by Erpr.Gr.210_Mölders; Oct-12-2019 at 00:14.
    Visit the Robert Mölders Facebook Group ( Left-click on the red link on the left to open the relative page! )
    Visit the Robert Mölders YouTube Channel ( Left-click on the red link on the left to open the relative page! )
    *Important Note: You can also open the Robert Mölders Facebook Group page by clicking directly on my signature image


    My PC specs
    Windows 10 Pro 64 bit ~ Intel Core i7-7700K 4.2GHz 8MB Cache Quad core
    ASUS ROG STRIX Z270H GAMING Motherboard, Socket 1151 ATX, Dual M.2, USB 3.1 Type-C ~ MSI GeForce GTX 1080 TI Gaming X 11G Graphic Card PCIE 3.0, 11 GB, GDDR5X 352 bit, 11.01 GHz, 1569 MHz
    Samsung MZ-V6E250BW SSD 960 EVO, 250 GB, M.2, NVMe ~ Western Digital WD Caviar Blue 2TB 64MB Cache, WD20EZRZ (64MB Cache) ~ Enermax Liqmax II 240 (ELC-LMR240S-BS)
    Corsair CMK16GX4M2B3000C15 Vengeance LPX RAM 16 GB, 2x8 GB, DDR4, 3000 MHz, CL15 ~ EVGA SuperNOVA GQ PSU 750W ~ NZXT CA-N450W-M1 Case for Gaming PC, Black
    LG 49UK6200PLA TV 49" 4K UltraHD, IPS Display, 4096 x 2160, Active HDR, Multitasking ~ LG 27UD68P Monitor 27" 4K UltraHD LED IPS, 3840 x 2160, AMD FreeSync, Multitasking
    Thrustmaster T.16000M FCS Joystick ~ Thrustmaster TWCS Throttle ~ Thrustmaster TFRP Pedals

  31. #84
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by SKG 210_Mölders View Post
    It seems to happens only when you jump to another crew position, at least in the Bf 110 variants ( no pilot ). For example if you jump to the rear gunner position, also only one time, and then you back to the pilot one your aircraft then disappers after a minute or so. Still testing this but it seems that if you occupy only the pilot position ( not switching to any other one at all ) this doesn't seems to happen.
    My guess is that the server script, when switching to a crew position ( no pilot ), considers you as leaving the plane so it despawn\delete it like when you leave the aircraft pressing ALT+F2.
    On the main ATAG server, where the rearm/refuel script is also active, this doesn't seems to happen so the problem seems to be only DD server script related; Probably you wrote something wrong in the script you are using. ( again, just my guess )
    Thanks for that! That bit of info does help a lot, I will check it out...

  32. Likes Erpr.Gr.210_Mölders liked this post
  33. #85
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by SKG 210_Mölders View Post
    It seems to happens only when you jump to another crew position, at least in the Bf 110 variants ( no pilot ).(...)
    This is now fixed!
    Unfortunately, it may result in the stuck-in-mid-air-aircraft no longer being removed ... Looking into that one again...

  34. Likes Erpr.Gr.210_Mölders liked this post
  35. #86
    Ace Erpr.Gr.210_Mölders's Avatar
    Join Date
    Dec 2015
    Location
    Italy
    Posts
    2,452
    Post Thanks / Like
    Total Downloaded
    1,002.26 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    This is now fixed!
    Excellent!Bravo!!!
    Visit the Robert Mölders Facebook Group ( Left-click on the red link on the left to open the relative page! )
    Visit the Robert Mölders YouTube Channel ( Left-click on the red link on the left to open the relative page! )
    *Important Note: You can also open the Robert Mölders Facebook Group page by clicking directly on my signature image


    My PC specs
    Windows 10 Pro 64 bit ~ Intel Core i7-7700K 4.2GHz 8MB Cache Quad core
    ASUS ROG STRIX Z270H GAMING Motherboard, Socket 1151 ATX, Dual M.2, USB 3.1 Type-C ~ MSI GeForce GTX 1080 TI Gaming X 11G Graphic Card PCIE 3.0, 11 GB, GDDR5X 352 bit, 11.01 GHz, 1569 MHz
    Samsung MZ-V6E250BW SSD 960 EVO, 250 GB, M.2, NVMe ~ Western Digital WD Caviar Blue 2TB 64MB Cache, WD20EZRZ (64MB Cache) ~ Enermax Liqmax II 240 (ELC-LMR240S-BS)
    Corsair CMK16GX4M2B3000C15 Vengeance LPX RAM 16 GB, 2x8 GB, DDR4, 3000 MHz, CL15 ~ EVGA SuperNOVA GQ PSU 750W ~ NZXT CA-N450W-M1 Case for Gaming PC, Black
    LG 49UK6200PLA TV 49" 4K UltraHD, IPS Display, 4096 x 2160, Active HDR, Multitasking ~ LG 27UD68P Monitor 27" 4K UltraHD LED IPS, 3840 x 2160, AMD FreeSync, Multitasking
    Thrustmaster T.16000M FCS Joystick ~ Thrustmaster TWCS Throttle ~ Thrustmaster TFRP Pedals

  36. #87
    Ace Bonditaria's Avatar
    Join Date
    Oct 2015
    Location
    Rotterdam
    Posts
    1,150
    Post Thanks / Like
    Total Downloaded
    2.82 GB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    This is now fixed!
    Unfortunately, it may result in the stuck-in-mid-air-aircraft no longer being removed ... Looking into that one again...
    My suggestion would be to remove the dead aircraft if that can be done. A DD server mission just ended, and overflying Dover at the end of the mission I could count 32 dead aircraft in the air, on the ground, in the sea. The in-game map was cluttered with icons and useless. I'd say the inconvenience for 110 and other multi-crew aircraft is a very minor thing in comparison to that disaster-scene! In the picture all the aircraft except my own are dead...

    all-dead-but-me.jpg

  37. Likes ATAG_Ribbs liked this post
  38. #88
    ATAG Member ATAG_Ribbs's Avatar
    Join Date
    Jan 2012
    Posts
    1,943
    Post Thanks / Like
    Total Downloaded
    4.11 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by DD_FT View Post
    Could very well be due to the changes made for the refuel and rearm stuff... Will look into it.
    And maybe even remove that RR code again - just need to check how many really use it.
    Please don't do this..we do use it
    Cheers
    Ribbs

    INTEL I5 4670 /16 MB DDR3/ MSI Z97 PCMATE MB
    MSI GTX 1060 3 GIG
    WIN 7 64
    MS Sidewinder 2 precision pro Saitek x52 throttle quadrant


    By ATAG_Lewis

  39. Likes DRock liked this post
  40. #89
    Team Fusion ATAG_Noofy's Avatar
    Join Date
    Feb 2019
    Location
    https://w3w.co/chat.hisses.lofty
    Posts
    2,602
    Post Thanks / Like
    Total Downloaded
    1.25 GB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    Quote Originally Posted by Bonditaria View Post
    My suggestion would be to remove the dead aircraft if that can be done. A DD server mission just ended, and overflying Dover at the end of the mission I could count 32 dead aircraft in the air, on the ground, in the sea. The in-game map was cluttered with icons and useless. I'd say the inconvenience for 110 and other multi-crew aircraft is a very minor thing in comparison to that disaster-scene! In the picture all the aircraft except my own are dead...

    all-dead-but-me.jpg
    Fully agree.
    Also it seems that if one uses a different key than ALT+F2 (default mapping) to get back to pilot seat the multi-crew plane will not disappear.
    Gigabyte Z390 UD | i7 9700K @3.60GHz | 16.0 GB | Windows 10 Pro 64-Bit | NVIDIA GeForce GTX 1070 Ti
    TM Warthog HOTAS | Saitek pro rudder pedals | TrackIR 5 | TeamSpeak 3.3.2 | TS Notifier 1.6.0h

  41. #90
    Supporting Member
    Join Date
    Feb 2015
    Posts
    325
    Post Thanks / Like
    Total Downloaded
    277.05 MB

    Re: The DangerDogz CloD Server - Suggestions - Remarks - All Welcome!

    The cause of the airframe-stuck-in-mid-air issue is now known.

    It's the use of the 'HOT' spawn points...

    So, short term fix is one simple rule: If you have spawned from one of the HOT spawn points, you may NOT bale out! Just keep falling and crash!

    This to keep the sky nice and tidy... If you want do be able to bale, then use one of the normal spawn points.

    Next fix would be to switch off the use of the HOT bases all together.

    The true fix should be applied by TF though. It is an in game bug ...
    Last edited by DD_FT; Oct-17-2019 at 16:06.

Page 3 of 10 FirstFirst 12345 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •