Menu

#16 Melee: Fleet sort bug plus fix

open
nobody
None
5
2007-12-05
2007-12-05
Anonymous
No

When you first start melee against the computer, your fleet is in a different order than after your first battle. The fleet gets sorted to alphabetical after the first ship battle finishes.

The fix is to sort the fleet at the start as well. Details follow.

mmain.cpp
NormalGame::init_players

if ( player[i]->islocal() )
{
player[i]->fleet->load("fleets.ini", sect);
}

SHOULD BE

if ( player[i]->islocal() )
{
player[i]->fleet->load("fleets.ini", sect);
player[i]->fleet->Sort();
}

AND
if ( hostcomputer() )
{
player[i]->fleet->load("fleets.ini", sect);
}

SHOULD BE

if ( hostcomputer() )
{
player[i]->fleet->load("fleets.ini", sect);
player[i]->fleet->Sort();
}

-Winkrometer (same author as 1842210 Numerous bugs plus fixes)

Discussion


Log in to post a comment.