mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merged from revision: 7197
Fixes (by Buggler) - Allow hotkey squad switching to include squads in vehicles as well - Fixed wrong sign used for bSpeedModifierTrainingMilitia and bSpeedModifierTeachingOthers - Fixed usMobileMilitiaTraining value not read causing mobile militia training speed to be doubled git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7198 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2740,8 +2740,8 @@ UINT8 CalculateRepairPointsForRepairman(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts
|
|||||||
// SANDRO - Technician trait gives a good bonus to repair items
|
// SANDRO - Technician trait gives a good bonus to repair items
|
||||||
if ( gGameOptions.fNewTraitSystem )
|
if ( gGameOptions.fNewTraitSystem )
|
||||||
{
|
{
|
||||||
usRepairPts = usRepairPts * (100 - gSkillTraitValues.bSpeedModifierRepairing) / 100;
|
usRepairPts = usRepairPts * (100 + gSkillTraitValues.bSpeedModifierRepairing) / 100;
|
||||||
*pusMaxPts = *pusMaxPts * (100 - gSkillTraitValues.bSpeedModifierRepairing) / 100;
|
*pusMaxPts = *pusMaxPts * (100 + gSkillTraitValues.bSpeedModifierRepairing) / 100;
|
||||||
|
|
||||||
if ( HAS_SKILL_TRAIT( pSoldier, TECHNICIAN_NT ) )
|
if ( HAS_SKILL_TRAIT( pSoldier, TECHNICIAN_NT ) )
|
||||||
{
|
{
|
||||||
@@ -6041,7 +6041,7 @@ INT16 GetBonusTrainingPtsDueToInstructor( SOLDIERTYPE *pInstructor, SOLDIERTYPE
|
|||||||
*pusMaxPts = max( 10, ( bTrainerNatSkill - bTraineeSkill )) * ( bTraineeNatWisdom + ( pInstructor->stats.bWisdom + pInstructor->stats.bLeadership ) / 2 ) / gGameExternalOptions.ubInstructedTrainingDivisor;
|
*pusMaxPts = max( 10, ( bTrainerNatSkill - bTraineeSkill )) * ( bTraineeNatWisdom + ( pInstructor->stats.bWisdom + pInstructor->stats.bLeadership ) / 2 ) / gGameExternalOptions.ubInstructedTrainingDivisor;
|
||||||
|
|
||||||
// penalty for non-specialized mercs
|
// penalty for non-specialized mercs
|
||||||
bTrainingBonus = bTrainingBonus * (100 - gSkillTraitValues.bSpeedModifierTeachingOthers) / 100;
|
bTrainingBonus = bTrainingBonus * (100 + gSkillTraitValues.bSpeedModifierTeachingOthers) / 100;
|
||||||
|
|
||||||
// check for teaching skill bonuses
|
// check for teaching skill bonuses
|
||||||
if ( HAS_SKILL_TRAIT( pInstructor, TEACHING_NT) )
|
if ( HAS_SKILL_TRAIT( pInstructor, TEACHING_NT) )
|
||||||
@@ -20087,7 +20087,7 @@ void RecordNumMilitiaTrainedForMercs( INT16 sX, INT16 sY, INT8 bZ, UINT8 ubMilit
|
|||||||
if ( gGameOptions.fNewTraitSystem ) //old/new traits
|
if ( gGameOptions.fNewTraitSystem ) //old/new traits
|
||||||
{
|
{
|
||||||
// -10% penalty for untrained mercs
|
// -10% penalty for untrained mercs
|
||||||
usTrainerEffectiveLeadership = (usTrainerEffectiveLeadership * (100 - gSkillTraitValues.bSpeedModifierTrainingMilitia) / 100);
|
usTrainerEffectiveLeadership = (usTrainerEffectiveLeadership * (100 + gSkillTraitValues.bSpeedModifierTrainingMilitia) / 100);
|
||||||
|
|
||||||
if (HAS_SKILL_TRAIT( pTrainer, TEACHING_NT ))
|
if (HAS_SKILL_TRAIT( pTrainer, TEACHING_NT ))
|
||||||
{
|
{
|
||||||
@@ -20130,7 +20130,7 @@ void RecordNumMilitiaTrainedForMercs( INT16 sX, INT16 sY, INT8 bZ, UINT8 ubMilit
|
|||||||
if ( gGameOptions.fNewTraitSystem ) //old/new traits
|
if ( gGameOptions.fNewTraitSystem ) //old/new traits
|
||||||
{
|
{
|
||||||
// -10% penalty for untrained mercs
|
// -10% penalty for untrained mercs
|
||||||
usTrainerEffectiveLeadership = (usTrainerEffectiveLeadership * (100 - gSkillTraitValues.bSpeedModifierTrainingMilitia) / 100);
|
usTrainerEffectiveLeadership = (usTrainerEffectiveLeadership * (100 + gSkillTraitValues.bSpeedModifierTrainingMilitia) / 100);
|
||||||
|
|
||||||
if (HAS_SKILL_TRAIT( pTrainer, TEACHING_NT ))
|
if (HAS_SKILL_TRAIT( pTrainer, TEACHING_NT ))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1935,7 +1935,7 @@ UINT8 FindBestMilitiaTrainingLeadershipInSector ( INT16 sMapX, INT16 sMapY, INT8
|
|||||||
if ( gGameOptions.fNewTraitSystem ) // SANDRO - old/new traits
|
if ( gGameOptions.fNewTraitSystem ) // SANDRO - old/new traits
|
||||||
{
|
{
|
||||||
// -10% penalty for untrained mercs
|
// -10% penalty for untrained mercs
|
||||||
usTrainerEffectiveLeadership = (usTrainerEffectiveLeadership * (100 - gSkillTraitValues.bSpeedModifierTrainingMilitia) / 100);
|
usTrainerEffectiveLeadership = (usTrainerEffectiveLeadership * (100 + gSkillTraitValues.bSpeedModifierTrainingMilitia) / 100);
|
||||||
|
|
||||||
if (HAS_SKILL_TRAIT( pCheckedTrainer, TEACHING_NT ))
|
if (HAS_SKILL_TRAIT( pCheckedTrainer, TEACHING_NT ))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -417,14 +417,14 @@ facilitytypeEndElementHandle(void *userData, const XML_Char *name)
|
|||||||
if (!FacilityTypes_TextOnly)
|
if (!FacilityTypes_TextOnly)
|
||||||
{
|
{
|
||||||
// Begin with basic facility data
|
// Begin with basic facility data
|
||||||
wcscpy(gFacilityTypes[pData->curIndex].szFacilityName, pData->curFacilityTypeData.szFacilityName);
|
wcscpy(gFacilityTypes[pData->curIndex].szFacilityName, pData->curFacilityTypeData.szFacilityName);
|
||||||
wcscpy(gFacilityTypes[pData->curIndex].szFacilityShortName, pData->curFacilityTypeData.szFacilityShortName);
|
wcscpy(gFacilityTypes[pData->curIndex].szFacilityShortName, pData->curFacilityTypeData.szFacilityShortName);
|
||||||
gFacilityTypes[pData->curIndex].ubTotalStaffLimit = pData->curFacilityTypeData.ubTotalStaffLimit;
|
gFacilityTypes[pData->curIndex].ubTotalStaffLimit = pData->curFacilityTypeData.ubTotalStaffLimit;
|
||||||
|
|
||||||
gFacilityTypes[pData->curIndex].ubMilitiaTrainersAllowed = pData->curFacilityTypeData.ubMilitiaTrainersAllowed;
|
gFacilityTypes[pData->curIndex].ubMilitiaTrainersAllowed = pData->curFacilityTypeData.ubMilitiaTrainersAllowed;
|
||||||
gFacilityTypes[pData->curIndex].ubMobileMilitiaTrainersAllowed = pData->curFacilityTypeData.ubMobileMilitiaTrainersAllowed;
|
gFacilityTypes[pData->curIndex].ubMobileMilitiaTrainersAllowed = pData->curFacilityTypeData.ubMobileMilitiaTrainersAllowed;
|
||||||
gFacilityTypes[pData->curIndex].usMilitiaTraining = pData->curFacilityTypeData.usMilitiaTraining;
|
gFacilityTypes[pData->curIndex].usMilitiaTraining = pData->curFacilityTypeData.usMilitiaTraining;
|
||||||
gFacilityTypes[pData->curIndex].usMilitiaTraining = pData->curFacilityTypeData.usMilitiaTraining;
|
gFacilityTypes[pData->curIndex].usMobileMilitiaTraining = pData->curFacilityTypeData.usMobileMilitiaTraining;
|
||||||
|
|
||||||
// Set assignment-specific data
|
// Set assignment-specific data
|
||||||
for (UINT16 cnt = 0; cnt < NUM_FACILITY_ASSIGNMENTS; cnt++)
|
for (UINT16 cnt = 0; cnt < NUM_FACILITY_ASSIGNMENTS; cnt++)
|
||||||
|
|||||||
@@ -4544,7 +4544,7 @@ SOLDIERTYPE *FindNextActiveSquad( SOLDIERTYPE *pSoldier )
|
|||||||
{
|
{
|
||||||
for( cnt2 =0; cnt2 < NUMBER_OF_SOLDIERS_PER_SQUAD; cnt2++ )
|
for( cnt2 =0; cnt2 < NUMBER_OF_SOLDIERS_PER_SQUAD; cnt2++ )
|
||||||
{
|
{
|
||||||
if ( Squad[ cnt ][ cnt2 ] != NULL && Squad[ cnt ][ cnt2 ]->bInSector && OK_INTERRUPT_MERC( Squad[ cnt ][ cnt2 ] ) && OK_CONTROLLABLE_MERC( Squad[ cnt ][ cnt2 ] ) && !(Squad[ cnt ][ cnt2 ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
|
if ( Squad[ cnt ][ cnt2 ] != NULL && Squad[ cnt ][ cnt2 ]->bInSector && OK_INTERRUPT_MERC( Squad[ cnt ][ cnt2 ] ) && OK_CONTROLLABLE_MERC( Squad[ cnt ][ cnt2 ] ) )
|
||||||
{
|
{
|
||||||
return( Squad[ cnt ][ cnt2 ] );
|
return( Squad[ cnt ][ cnt2 ] );
|
||||||
}
|
}
|
||||||
@@ -4557,7 +4557,7 @@ SOLDIERTYPE *FindNextActiveSquad( SOLDIERTYPE *pSoldier )
|
|||||||
{
|
{
|
||||||
for( cnt2 =0; cnt2 < NUMBER_OF_SOLDIERS_PER_SQUAD; cnt2++ )
|
for( cnt2 =0; cnt2 < NUMBER_OF_SOLDIERS_PER_SQUAD; cnt2++ )
|
||||||
{
|
{
|
||||||
if ( Squad[ cnt ][ cnt2 ] != NULL && Squad[ cnt ][ cnt2 ]->bInSector && OK_INTERRUPT_MERC( Squad[ cnt ][ cnt2 ] ) && OK_CONTROLLABLE_MERC( Squad[ cnt ][ cnt2 ] ) && !(Squad[ cnt ][ cnt2 ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
|
if ( Squad[ cnt ][ cnt2 ] != NULL && Squad[ cnt ][ cnt2 ]->bInSector && OK_INTERRUPT_MERC( Squad[ cnt ][ cnt2 ] ) && OK_CONTROLLABLE_MERC( Squad[ cnt ][ cnt2 ] ) )
|
||||||
{
|
{
|
||||||
return( Squad[ cnt ][ cnt2 ] );
|
return( Squad[ cnt ][ cnt2 ] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5758,7 +5758,7 @@ void ChangeCurrentSquad( INT32 iSquad )
|
|||||||
{
|
{
|
||||||
for( cnt2 = 0; cnt2 < NUMBER_OF_SOLDIERS_PER_SQUAD; cnt2++ )
|
for( cnt2 = 0; cnt2 < NUMBER_OF_SOLDIERS_PER_SQUAD; cnt2++ )
|
||||||
{
|
{
|
||||||
if ( Squad[ cnt ][ cnt2 ] != NULL && Squad[ cnt ][ cnt2 ]->bInSector && OK_INTERRUPT_MERC( Squad[ cnt ][ cnt2 ] ) && OK_CONTROLLABLE_MERC( Squad[ cnt ][ cnt2 ] ) && !(Squad[ cnt ][ cnt2 ]->flags.uiStatusFlags & SOLDIER_VEHICLE) )
|
if ( Squad[ cnt ][ cnt2 ] != NULL && Squad[ cnt ][ cnt2 ]->bInSector && OK_INTERRUPT_MERC( Squad[ cnt ][ cnt2 ] ) && OK_CONTROLLABLE_MERC( Squad[ cnt ][ cnt2 ] ) )
|
||||||
{
|
{
|
||||||
cnt3++;
|
cnt3++;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -6589,11 +6589,11 @@ STR16 gzTooltipStrings[] =
|
|||||||
L"%s|Compétence 1 : %s\n",
|
L"%s|Compétence 1 : %s\n",
|
||||||
L"%s|Compétence 2 : %s\n",
|
L"%s|Compétence 2 : %s\n",
|
||||||
L"%s|Compétence 3 : %s\n",
|
L"%s|Compétence 3 : %s\n",
|
||||||
// Additional suppression effects - sevenfm
|
// Additional suppression effects - sevenfm // TODO.Translate
|
||||||
L"%s|P|A perdu(s) en raison de |S|uppression : %d\n",
|
L"%s|A|Ps lost due to |S|uppression: %d\n",
|
||||||
L"%s|Tolérance de |Suppression : %d\n",
|
L"%s|Suppression |Tolerance: %d\n",
|
||||||
L"|Niveau |effectif du |C|hoc : %d\n",
|
L"%s|Effective |S|hock |Level: %d\n",
|
||||||
L"%s|Moral de l'|I|A : %d\n",
|
L"%s|A|I |Morale: %d\n",
|
||||||
};
|
};
|
||||||
|
|
||||||
STR16 New113Message[] =
|
STR16 New113Message[] =
|
||||||
|
|||||||
Reference in New Issue
Block a user