View Single Post
  #6  
Old 10-06-2011, 02:12 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by FG28_Kodiak View Post
I see a little problem
How to handle if one side don't have human pilots. Then your formula tries a division by zero and this will results in an error.
Maybe it is possible to check if human pilots > 0 first.

Or maybe divide (1 + friendlyFgtrs + friendlyBmbrs/2) / (1+ enmyFgtrs + enmyBmbrs/2). It will do.

Or we can deny premium planes at all if say other side has less than 2 human players.

edit
What I do not know is how to handle other side players which are still in the menu and not flying. Can they be taken into account? If yes, probably 80% of them should be accounted as fighters and 20% as bombers if you do not mind. But it is not very important I think.

Last edited by Ataros; 10-06-2011 at 02:23 PM.
Reply With Quote