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
  #1  
Old 06-21-2012, 08:58 AM
moggel moggel is offline
Approved Member
 
Join Date: Mar 2011
Posts: 70
Default What class are Players flying anyway?

Scripters,

I'm writing a solution that's simulating Fighter Command to some extent (Chain Home, Observer Corps, Filter Rooms and Command). In doing so I'm also trying to implement the concept of Flight Leaders but I'm currently stuck.

I mistakingly believed all Players fly AiAicrafts and that all aicrafts are in AiGroups. This it seems is only true for non-player aicrafts (hence the "Ai" part I guess ) and for players running in single player mode.

My implementation fell apart when I tried it out on a dedicated server last night but Osprey hinted that I should probably look at the "Regiment" property instead as a basis for grouping online players together.

If so, can someone help me get my head around what a "Regiment" is and how it's handled by the sim in the online (and offline) context?

My initial experiment got stuck on the fact that "Regiment" is a property of AiAicraft and when I safe cast the player's AiActor to an AiAircraft i get a null result, which means whatever a Player is riding is not a AiAicraft type.

I tried to find out what type is implementing AiActor for a online Players by simply fetching its type name but the resulting string is just a sequence of seemingly random letters. This is likely a remoting marshaling thingy but I still have no idea what I'm dealing with.

Example:
Code:
public override void OnPlaceEnter(AMission mission, Player player, AiActor actor, int placeIndex)
{
    var playerAircraft = actor as AiAicraft; // <-- 'playerAircraft' is null
    var typeOfPlayerActor = actor.GetType().Name;  // <-- type name is gibberish
}
Can someone please shed some light on:
  1. How is "Regiment" being used by the sim?
  2. What type is implementing AiActor for online Players?

Thanks,
Mog
__________________
Core i7 3930K @ 4.8GHz; 16Gb DDR3 (Vengeance); nVidia GTX580; OS disk: 150Gb 10000rpm; SIM disk: 300Gb 10000rpm; Windows 7 x64 Ultimate
Reply With Quote
 


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:53 PM.


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