Changeset fa709429de3bf0972b3a1d93b16aab3be261f8b7

Show
Ignore:
Timestamp:
05/22/08 17:42:51 (3 months ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1211470971 +0200
git-parent:

[7a648c6a38f039122ae03ea535db13e979a4b0e7]

git-author:
Sebastian Gift <Madison@gt-knm.de> 1211470971 +0200
Message:

[bug] Alle beteiligten Variablen auf Double geaendert (ebenfalls Int-Divionsproblem) - erst am Ende Umsetzung auf Integer.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/battles/Battle.java

    r89c047d rfa70942  
    292292                } 
    293293                 
    294                 int owncaps = 0; 
    295                 int secondrowcaps = 0; 
     294                double owncaps = 0; 
     295                double secondrowcaps = 0; 
    296296                for( int i=0; i < shiplist.size(); i++ )  
    297297                { 
     
    303303                        ShipTypeData type = aship.getTypeData(); 
    304304                         
    305                         int size = type.getSize(); 
     305                        double size = type.getSize(); 
    306306                        if( (aship.getAction() & BS_SECONDROW) != 0 ) { 
    307307                                if( aship.getShip().getDocked().length() == 0 ) { 
     
    311311                        else { 
    312312                                if( size > ShipType.SMALL_SHIP_MAXSIZE ) { 
    313                                         int countedSize = size; 
     313                                        double countedSize = size; 
    314314                                        if( type.getCrew() > 0 ) { 
    315315                                                countedSize *= (aship.getCrew()/type.getCrew()); 
     
    336336                } 
    337337 
    338                 if( secondrowcaps == 0 ) { 
     338                if( Double.valueOf(secondrowcaps).intValue() == 0 ) { 
    339339                        return true;     
    340340                } 
    341341                                 
    342                 if( owncaps <= secondrowcaps*2 ) { 
     342                if( Double.valueOf(owncaps).intValue() <= Double.valueOf(secondrowcaps).intValue()*2 ) { 
    343343                        return false; 
    344344                }