mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: individual militia in impassable sectors cannot be dismissed via website
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8837 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -319,8 +319,10 @@ MilitiaPersonalDataTable::Display( )
|
|||||||
// if we can still fire this guy, set up the button
|
// if we can still fire this guy, set up the button
|
||||||
if ( !(militia.flagmask & (MILITIAFLAG_DEAD | MILITIAFLAG_FIRED | MILITIAFLAG_DESERTION )) )
|
if ( !(militia.flagmask & (MILITIAFLAG_DEAD | MILITIAFLAG_FIRED | MILITIAFLAG_DESERTION )) )
|
||||||
{
|
{
|
||||||
// we can't fire someone if they are in combat
|
// we can only fire someone in sectors we control that are not in combat
|
||||||
if ( SectorOursAndPeaceful( SECTORX( militia.sector ), SECTORY( militia.sector ), 0 ) )
|
// if we've managed to misplace a militia into an impassable sector (HOW???), we can at least fire them, too
|
||||||
|
if ( SectorOursAndPeaceful( SECTORX( militia.sector ), SECTORY( militia.sector ), 0 )
|
||||||
|
|| SectorIsImpassable( militia.sector ) )
|
||||||
{
|
{
|
||||||
mButtonFire = CreateTextButton( szIdividualMilitiaWebsiteText[8], FONT12ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
mButtonFire = CreateTextButton( szIdividualMilitiaWebsiteText[8], FONT12ARIAL, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
usPosX, usPosY, 120, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, MilitiaPersonalDataTableFireCallback );
|
usPosX, usPosY, 120, 20, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH, DEFAULT_MOVE_CALLBACK, MilitiaPersonalDataTableFireCallback );
|
||||||
|
|||||||
Reference in New Issue
Block a user