mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Merged revision(s) 7166-7177 from branches/ja2_source_official_2014:
- Flagmasks are unsigned, and should be called and treated as such - Fix: experience gain from interrogation was too high - Fix: chance of a prisoner becoming militia was calculated wrong - default weight maximum for MOVE ITEM assignment increased from 30 to 40 kg - Fix: snitches report the same event multiple times - Fix: snitches treat vehicles as persons - Fix: selection of launchables is inefficient, an does not take into account wether items are depending on day/night cycle - new key combination: in strategic, pressing [CTRL] + [E] wile both a merc's inventory and the sector inventory are open will fill the merc's inventory with sector items - trivial code cleanup - if prisoners are taken in a sector that houses a prison, that prison can also be selected to house them - Fix: distributing newly taken prisoners in a prison sector no longer redistributes all prisoners, only the new ones - GetClosestFlaggedSoldierID can also be called without evaluation of sight - Fix: Covert Ops: throwing/lobbing items or shooting rockets is deemed suspicious behaviour - Fix: boxing was broken by loading a savegame - Fix: campaign history rarely recorded kills in autoresolve - There is no reason why the IDs that boxers are reset to before they are reinitialised would ever need to be altered by a modder. Required script change in stable GameDir r2024. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7178 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+16
-16
@@ -6674,9 +6674,9 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
if ( result < gGameExternalOptions.ubPrisonerProcessDefectChance )
|
||||
{
|
||||
// troops are converted to militia, but there is a chance that they will be demoted in the process
|
||||
if ( i < interrogatedprisoners[PRISONER_ELITE] && Chance(80) )
|
||||
if ( i >= interrogatedprisoners[PRISONER_ADMIN] + interrogatedprisoners[PRISONER_REGULAR] && Chance( 80 ) )
|
||||
++turnedmilitia_elite;
|
||||
else if ( i < interrogatedprisoners[PRISONER_ELITE] + interrogatedprisoners[PRISONER_REGULAR] && Chance(80) )
|
||||
else if ( i >= interrogatedprisoners[PRISONER_ADMIN] && Chance( 80 ) )
|
||||
++turnedmilitia_regular;
|
||||
else
|
||||
++turnedmilitia_admin;
|
||||
@@ -6768,7 +6768,7 @@ void HandlePrisonerProcessingInSector( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
if ( !oldinterrogationpoints )
|
||||
return;
|
||||
|
||||
FLOAT totalexp = (FLOAT) (100 * prisonersinterrogated);
|
||||
FLOAT totalexp = (FLOAT) (1 * prisonersinterrogated);
|
||||
FLOAT expratio = totalexp / (oldinterrogationpoints * 33); // TODO
|
||||
|
||||
// award experience
|
||||
@@ -6979,8 +6979,8 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
if ( distance == 0 )
|
||||
continue;
|
||||
|
||||
// each soldier can carry 30 items, and needs 10 minutes (two way walk) per sector distance, thereby 6 / distance runs possible
|
||||
UINT16 maxitems = 30 * (*it).second * 6 / distance;
|
||||
// each soldier can carry 40 items or 40 kg, and needs 10 minutes (two way walk) per sector distance, thereby 6 / distance runs possible per hour
|
||||
UINT16 maxitems = 40 * (*it).second * 6 / distance;
|
||||
UINT16 maxweight = 400 * (*it).second * 6 / distance;
|
||||
|
||||
// open the inventory of the sector we are taking stuff from
|
||||
@@ -6988,7 +6988,7 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
UINT32 uiTotalNumberOfRealItems_Target = 0;
|
||||
|
||||
// use the new map
|
||||
pWorldItem_Target.clear();//dnl ch75 021113
|
||||
pWorldItem_Target.clear();//dnl ch75 021113
|
||||
|
||||
if( ( gWorldSectorX == targetX )&&( gWorldSectorY == targetY ) && (gbWorldSectorZ == bZ ) )
|
||||
{
|
||||
@@ -11448,9 +11448,9 @@ void SnitchToggleMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else if( iValue == SNITCH_MENU_TOGGLE_ON )
|
||||
{
|
||||
if ( pSoldier->bSoldierFlagMask2 & SOLDIER_SNITCHING_OFF )
|
||||
if ( pSoldier->usSoldierFlagMask2 & SOLDIER_SNITCHING_OFF )
|
||||
{
|
||||
pSoldier->bSoldierFlagMask2 &= ~SOLDIER_SNITCHING_OFF;
|
||||
pSoldier->usSoldierFlagMask2 &= ~SOLDIER_SNITCHING_OFF;
|
||||
fShowSnitchToggleMenu = FALSE;
|
||||
fShowSnitchMenu = FALSE;
|
||||
fShowAssignmentMenu = FALSE;
|
||||
@@ -11459,9 +11459,9 @@ void SnitchToggleMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else if( iValue == SNITCH_MENU_TOGGLE_OFF )
|
||||
{
|
||||
if ( !(pSoldier->bSoldierFlagMask2 & SOLDIER_SNITCHING_OFF) )
|
||||
if ( !(pSoldier->usSoldierFlagMask2 & SOLDIER_SNITCHING_OFF) )
|
||||
{
|
||||
pSoldier->bSoldierFlagMask2 |= SOLDIER_SNITCHING_OFF;
|
||||
pSoldier->usSoldierFlagMask2 |= SOLDIER_SNITCHING_OFF;
|
||||
fShowSnitchToggleMenu = FALSE;
|
||||
fShowSnitchMenu = FALSE;
|
||||
fShowAssignmentMenu = FALSE;
|
||||
@@ -11471,9 +11471,9 @@ void SnitchToggleMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else if( iValue == SNITCH_MENU_MISBEHAVIOUR_ON )
|
||||
{
|
||||
if ( pSoldier->bSoldierFlagMask2 & SOLDIER_PREVENT_MISBEHAVIOUR_OFF )
|
||||
if ( pSoldier->usSoldierFlagMask2 & SOLDIER_PREVENT_MISBEHAVIOUR_OFF )
|
||||
{
|
||||
pSoldier->bSoldierFlagMask2 &= ~SOLDIER_PREVENT_MISBEHAVIOUR_OFF;
|
||||
pSoldier->usSoldierFlagMask2 &= ~SOLDIER_PREVENT_MISBEHAVIOUR_OFF;
|
||||
fShowSnitchToggleMenu = FALSE;
|
||||
fShowSnitchMenu = FALSE;
|
||||
fShowAssignmentMenu = FALSE;
|
||||
@@ -11482,9 +11482,9 @@ void SnitchToggleMenuBtnCallback( MOUSE_REGION * pRegion, INT32 iReason )
|
||||
}
|
||||
else if( iValue == SNITCH_MENU_MISBEHAVIOUR_OFF)
|
||||
{
|
||||
if ( !(pSoldier->bSoldierFlagMask2 & SOLDIER_PREVENT_MISBEHAVIOUR_OFF) )
|
||||
if ( !(pSoldier->usSoldierFlagMask2 & SOLDIER_PREVENT_MISBEHAVIOUR_OFF) )
|
||||
{
|
||||
pSoldier->bSoldierFlagMask2 |= SOLDIER_PREVENT_MISBEHAVIOUR_OFF;
|
||||
pSoldier->usSoldierFlagMask2 |= SOLDIER_PREVENT_MISBEHAVIOUR_OFF;
|
||||
fShowSnitchToggleMenu = FALSE;
|
||||
fShowSnitchMenu = FALSE;
|
||||
fShowAssignmentMenu = FALSE;
|
||||
@@ -15176,7 +15176,7 @@ void HandleShadingOfLinesForSnitchToggleMenu( void )
|
||||
|
||||
pSoldier = GetSelectedAssignSoldier( FALSE );
|
||||
|
||||
if( pSoldier->bSoldierFlagMask2 & SOLDIER_SNITCHING_OFF )
|
||||
if( pSoldier->usSoldierFlagMask2 & SOLDIER_SNITCHING_OFF )
|
||||
{
|
||||
UnShadeStringInBox( ghSnitchToggleBox, SNITCH_MENU_TOGGLE_ON );
|
||||
ShadeStringInBox( ghSnitchToggleBox, SNITCH_MENU_TOGGLE_OFF );
|
||||
@@ -15187,7 +15187,7 @@ void HandleShadingOfLinesForSnitchToggleMenu( void )
|
||||
UnShadeStringInBox( ghSnitchToggleBox, SNITCH_MENU_TOGGLE_OFF );
|
||||
}
|
||||
|
||||
if( pSoldier->bSoldierFlagMask2 & SOLDIER_PREVENT_MISBEHAVIOUR_OFF )
|
||||
if( pSoldier->usSoldierFlagMask2 & SOLDIER_PREVENT_MISBEHAVIOUR_OFF )
|
||||
{
|
||||
UnShadeStringInBox( ghSnitchToggleBox, SNITCH_MENU_MISBEHAVIOUR_ON );
|
||||
ShadeStringInBox( ghSnitchToggleBox, SNITCH_MENU_MISBEHAVIOUR_OFF );
|
||||
|
||||
Reference in New Issue
Block a user