- Fix: profile id was used instead of profile's face id

- Fix: squad names were not used correctly

- Change: spotter minimum preparation time lowered to 2 turns (was 3)
- Change: spotter ct bonus has been doubled
- Cahnge: spotter cth bonus now works for rifles and sniper rifles


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7774 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-03-09 18:19:34 +00:00
parent 68869f77b2
commit 6e824810ab
17 changed files with 37 additions and 20 deletions
+1 -1
View File
@@ -1254,7 +1254,7 @@ void LoadGameExternalOptions()
gGameExternalOptions.fScopeModes = iniReader.ReadBoolean("Tactical Gameplay Settings","USE_SCOPE_MODES", FALSE);
gGameExternalOptions.fDisplayScopeModes = iniReader.ReadBoolean("Tactical Gameplay Settings","DISPLAY_SCOPE_MODES", FALSE);
gGameExternalOptions.usSpotterPreparationTurns = iniReader.ReadInteger("Tactical Gameplay Settings","SPOTTER_PREPARATIONTURNS", 3, 3, 10);
gGameExternalOptions.usSpotterPreparationTurns = iniReader.ReadInteger("Tactical Gameplay Settings","SPOTTER_PREPARATIONTURNS", 2, 2, 10);
gGameExternalOptions.usSpotterRange = iniReader.ReadInteger("Tactical Gameplay Settings","SPOTTER_RANGE", 10, 0, 30);
gGameExternalOptions.usSpotterMaxCTHBoost = iniReader.ReadInteger("Tactical Gameplay Settings","SPOTTER_MAX_CTHBOOST", 50, 0, 100);
+1 -1
View File
@@ -126,7 +126,7 @@ DDBox::Display( )
}
else
{
sprintf( sTemp, "FACES\\%02d.sti", mEvent.usSpeaker );
sprintf( sTemp, "FACES\\%02d.sti", gMercProfiles[mEvent.usSpeaker].ubFaceIndex );
}
FilenameForBPP( sTemp, VObjectDesc.ImageFile );
+2 -2
View File
@@ -484,7 +484,7 @@ BOOLEAN DisplayMercData( UINT8 usProfileA, UINT8 usProfileB )
}
else
{
sprintf( sTemp, "FACES\\%02d.sti", usProfileA );
sprintf( sTemp, "FACES\\%02d.sti", gMercProfiles[usProfileA].ubFaceIndex );
FilenameForBPP( sTemp, VObjectDesc.ImageFile );
CHECKF( AddVideoObject( &VObjectDesc, &uiInsMercFaceImage ) );
}
@@ -518,7 +518,7 @@ BOOLEAN DisplayMercData( UINT8 usProfileA, UINT8 usProfileB )
}
else
{
sprintf( sTemp, "FACES\\%02d.sti", usProfileB );
sprintf( sTemp, "FACES\\%02d.sti", gMercProfiles[usProfileB].ubFaceIndex );
FilenameForBPP( sTemp, VObjectDesc.ImageFile );
CHECKF( AddVideoObject( &VObjectDesc, &uiInsMercFaceImage ) );
}
+5 -1
View File
@@ -96,6 +96,7 @@
#include "teamturns.h"
#include "Options Screen.h"
#include "SaveLoadScreen.h"
#include "Map Screen Interface.h" // added by Flugente for SquadNames
//////////////////////////////////////////////////////////////////////////////
// SANDRO - In this file, all APBPConstants[AP_CROUCH] and APBPConstants[AP_PRONE] were changed to GetAPsCrouch() and GetAPsProne()
@@ -1445,7 +1446,10 @@ UINT32 UIHandleSelectMerc( UI_EVENT *pUIEvent )
// If different, display message
if ( CurrentSquad( ) != iCurrentSquad )
{
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( CurrentSquad( ) + 1 ) );
if ( gGameExternalOptions.fUseXMLSquadNames && CurrentSquad( ) + 1 < ON_DUTY )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[MSG_SQUAD_ACTIVE_STRING], SquadNames[CurrentSquad( ) + 1].squadname );
else
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( CurrentSquad( ) + 1 ) );
}
}
+5 -2
View File
@@ -7301,8 +7301,11 @@ UINT8 FindNextMercInTeamPanel( SOLDIERTYPE *pSoldier, BOOLEAN fGoodForLessOKLife
if ( pNewSoldier->bAssignment != iCurrentSquad )
{
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( CurrentSquad( ) + 1 ) );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( pNewSoldier->bAssignment + 1 ) );
if ( gGameExternalOptions.fUseXMLSquadNames && pNewSoldier->bAssignment < ON_DUTY )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[MSG_SQUAD_ACTIVE_STRING], SquadNames[pNewSoldier->bAssignment].squadname );
else
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( CurrentSquad( ) + 1 ) );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( pNewSoldier->bAssignment + 1 ) );
return( pNewSoldier->ubID );
}
+8 -8
View File
@@ -22342,18 +22342,18 @@ UINT16 GridNoSpotterCTHBonus( SOLDIERTYPE* pSniper, INT32 sGridNo, UINT bTeam )
// relation counts twice. Also account for special background. Effectivity cannot be lower than 0%!
effectivity = max( 0, effectivity + 2 * relation + pSoldier->GetBackgroundValue( BG_PERC_SPOTTER ) );
// a good relation boosts value tremendously - a bad relation makes spotting useless
// the spotter background also alters effectiveness
// -> value between 0 and 2000
value = (value * effectivity) / 100;
// longer spotting gives a linear bonus - up to 100% -> value between 0 and 4000
value = (value * min( pSoldier->usSkillCounter[SOLDIER_COUNTER_SPOTTER], 2 * gGameExternalOptions.usSpotterPreparationTurns )) / gGameExternalOptions.usSpotterPreparationTurns;
// -> value between 0 and 2000, nominal 1000
value = (value * effectivity ) / 100;
// longer spotting gives a linear bonus - up to 100% -> value between 0 and 4000, nominal 2000
value = (value * min(pSoldier->usSkillCounter[SOLDIER_COUNTER_SPOTTER], 2 * gGameExternalOptions.usSpotterPreparationTurns)) / gGameExternalOptions.usSpotterPreparationTurns;
// reasonable values: 0 to gGameExternalOptions.usSpotterMaxCTHBoost
value = (value * gGameExternalOptions.usSpotterMaxCTHBoost) / 4000;
value = (value * gGameExternalOptions.usSpotterMaxCTHBoost) / 2000;
if ( value > bestvalue )
bestvalue = value;
}
+2 -2
View File
@@ -2214,7 +2214,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
HandleLocateSelectMerc( pNewSoldier->ubID, LOCATEANDSELECT_MERC );
if ( gGameExternalOptions.fUseXMLSquadNames && pNewSoldier->bAssignment < ON_DUTY )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], SquadNames[ pNewSoldier->bAssignment ].squadname );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE_STRING ], SquadNames[pNewSoldier->bAssignment].squadname );
else
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( CurrentSquad( ) + 1 ) );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( pNewSoldier->bAssignment + 1 ) );
@@ -5940,7 +5940,7 @@ void ChangeCurrentSquad( INT32 iSquad )
SetCurrentSquad( cnt, FALSE );
if ( gGameExternalOptions.fUseXMLSquadNames && cnt < ON_DUTY )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], SquadNames[ cnt ].squadname );
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE_STRING ], SquadNames[cnt].squadname );
else
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, pMessageStrings[ MSG_SQUAD_ACTIVE ], ( cnt + 1 ) );
+3 -3
View File
@@ -5515,7 +5515,7 @@ if (gGameExternalOptions.fUseNewCTHCalculation)
fAimModifier += pSoldier->GetBackgroundValue(BG_PERC_CTH_CREATURE);
// Flugente: if we are a sniper and a spotter from our team spots the targetted location, we receive a powerful cth bonus
if ( gGameOptions.fNewTraitSystem && Weapon[usInHand].ubWeaponType == GUN_SN_RIFLE )
if ( gGameOptions.fNewTraitSystem && Weapon[usInHand].ubWeaponType == GUN_SN_RIFLE || Weapon[usInHand].ubWeaponType == GUN_RIFLE )
{
fAimModifier += GridNoSpotterCTHBonus( pSoldier, sGridNo, pSoldier->bTeam);
}
@@ -5701,7 +5701,7 @@ else
iTraitModifier += pSoldier->GetBackgroundValue(BG_PERC_CTH_CREATURE);
// Flugente: if we are a sniper and a spotter from our team spots the targetted location, we receive a powerful cth bonus
if ( gGameOptions.fNewTraitSystem && Weapon[usInHand].ubWeaponType == GUN_SN_RIFLE )
if ( gGameOptions.fNewTraitSystem && Weapon[usInHand].ubWeaponType == GUN_SN_RIFLE || Weapon[usInHand].ubWeaponType == GUN_RIFLE )
{
iTraitModifier += (INT8)(GridNoSpotterCTHBonus( pSoldier, sGridNo, pSoldier->bTeam));
}
@@ -7289,7 +7289,7 @@ UINT32 CalcChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTime,
iChance += pSoldier->GetBackgroundValue(BG_PERC_CTH_CREATURE);
// Flugente: if we are a sniper and a spotter from our team spots the targetted location, we receive a powerful cth bonus
if ( gGameOptions.fNewTraitSystem && Weapon[usInHand].ubWeaponType == GUN_SN_RIFLE )
if ( gGameOptions.fNewTraitSystem && Weapon[usInHand].ubWeaponType == GUN_SN_RIFLE || Weapon[usInHand].ubWeaponType == GUN_RIFLE )
{
iChance += (INT32)(GridNoSpotterCTHBonus( pSoldier, sGridNo, pSoldier->bTeam));
}
+2
View File
@@ -488,6 +488,8 @@ enum
MSG_MERC_CASTS_LIGHT_ON,
MSG_MERC_CASTS_LIGHT_OFF,
MSG_SQUAD_ACTIVE_STRING,
TEXT_NUM_MSG,
};
extern STR16 pMessageStrings[];
+1
View File
@@ -6206,6 +6206,7 @@ STR16 pMessageStrings[] =
L"保持佣兵间距关闭",
L"虚拟佣兵光照开启",
L"虚拟佣兵光照关闭",
L"Squad %s active.", //TODO.Translate
};
+1
View File
@@ -6214,6 +6214,7 @@ STR16 pMessageStrings[] =
L"Move in Formation OFF",
L"Artificial Merc Light ON", // TODO.Translate
L"Artificial Merc Light OFF",
L"Squad %s active.", //TODO.Translate
};
+1
View File
@@ -6205,6 +6205,7 @@ STR16 pMessageStrings[] =
L"Move in Formation OFF",
L"Artificial Merc Light ON",
L"Artificial Merc Light OFF",
L"Squad %s active.",
};
+1
View File
@@ -6216,6 +6216,7 @@ STR16 pMessageStrings[] =
L"Déplacement tactique désactivé",
L"Éclairage du mercenaire activé",
L"Éclairage du mercenaire désactivé",
L"Squad %s active.", //TODO.Translate
};
+1
View File
@@ -6051,6 +6051,7 @@ STR16 pMessageStrings[] =
L"In Formation bewegen - AUSGESCHALTET",
L"Artificial Merc Light ON", // TODO.Translate
L"Artificial Merc Light OFF",
L"Squad %s active.", //TODO.Translate
};
CHAR16 ItemPickupHelpPopup[][40] =
+1
View File
@@ -6202,6 +6202,7 @@ STR16 pMessageStrings[] =
L"Move in Formation OFF",
L"Artificial Merc Light ON", // TODO.Translate
L"Artificial Merc Light OFF",
L"Squad %s active.", //TODO.Translate
};
+1
View File
@@ -6220,6 +6220,7 @@ STR16 pMessageStrings[] =
L"Move in Formation OFF",
L"Artificial Merc Light ON", // TODO.Translate
L"Artificial Merc Light OFF",
L"Squad %s active.", //TODO.Translate
};
+1
View File
@@ -6202,6 +6202,7 @@ STR16 pMessageStrings[] =
L"Движение в обычном порядке",
L"Подсветка наемника включена",
L"Подсветка наемника отключена",
L"Squad %s active.", //TODO.Translate
};