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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 06-05-2011, 11:51 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Just looked through your cs code and it looks great. I wish I could know c# half as good as you do. Sure I have many questions if you do not mind )

We use similar actor destroy code on Repka. It used to have an issue of stopping bomber engines when a player switches to a gunner or navigator position. Did you manage to solve this issue? Does adding this line helps in this respect or it was added for different purposes?
Code:
        foreach (AiActor actor in actorMain.Group().GetItems())
Quote:
Originally Posted by TheEnlightenedFlorist View Post
Also, players are allowed to spawn groups of up to four bombers so they don't have to fly alone.
What happens if a player creates 20 bomber groups in a row one by one? I think they should be destroyed immediately in this case or this can ruin any server. I have seen people creating 20 single Stukas on Repka just for fun. They were destroyed with 5 minutes delay. But with groups different code is probably needed. Just a thought.

Code:
        List<Player> bluePlayers = new List<Player>();

        foreach (Player p in GamePlay.gpRemotePlayers())
        {
            if (p.Army() == 2)
                bluePlayers.Add(p);
        }

        GamePlay.gpHUDLogCenter(bluePlayers.ToArray(), msg);
Why do you have to add players to a list first and then print message to the list members. Can you print message directly to array members like in this example (for server log msg)?

Code:
	private void serverMessage(string msg)
        {
            Player pl = GamePlay.gpPlayer();
            Player[] players = { pl };
            object[] args = { msg };
            GamePlay.gpLogServer(players, msg, args);
        }
This is not my code and I did not check if this code works but I think it does.
Reply With Quote
 

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 09:00 AM.


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