mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
refactor UpDateStateOfStartButton
This commit is contained in:
committed by
majcosta
parent
0ebcf0fa06
commit
3d95c47356
+2
-15
@@ -5998,20 +5998,15 @@ void UpDateStateOfStartButton( void )
|
||||
ButtonList[giPersonnelATMStartButton[gubPersonnelInfoState]]->uiFlags |= BUTTON_CLICKED_ON;
|
||||
|
||||
// if in current mercs and the currently selected guy is valid, enable button, else disable it
|
||||
if (fCurrentTeamMode)
|
||||
if (fCurrentTeamMode && currentTeamIndex != -1)
|
||||
{
|
||||
// is the current guy valid
|
||||
if (currentTeamIndex != -1)
|
||||
{
|
||||
for ( int i = 0; i < PERSONNEL_NUM_BTN; ++i )
|
||||
EnableButton( giPersonnelATMStartButton[ i ] );
|
||||
|
||||
SoldierID iId = currentTeamList[currentTeamIndex];
|
||||
|
||||
if (iId != NOBODY)
|
||||
if (iId != NOBODY && iId->bAssignment == ASSIGNMENT_POW )
|
||||
{
|
||||
if ( iId->bAssignment == ASSIGNMENT_POW )
|
||||
{
|
||||
DisableButton( giPersonnelATMStartButton[ PERSONNEL_INV_BTN ] );
|
||||
|
||||
if ( gubPersonnelInfoState == PERSONNEL_INV_BTN )
|
||||
@@ -6019,15 +6014,7 @@ void UpDateStateOfStartButton( void )
|
||||
gubPersonnelInfoState = PERSONNEL_STAT_BTN;
|
||||
fPausedReDrawScreenFlag = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// not valid, disable
|
||||
for ( int i = 0; i < PERSONNEL_NUM_BTN; ++i )
|
||||
DisableButton( giPersonnelATMStartButton[ i ] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user