mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
- bugfix: Getting incorrect data & CTDs when using multiple IMP characters with same voices. Now it is possible to have up to 6 merc with the same voice without getting incorrect data. No more need to use different voices! (IF YOU PLAY WITH MULTIPLE IMPS, YOU SHOULD START A NEW GAME, BECAUSE THE IMP CHARACTERS GAME DATA IS INCORRECT!)
- bugfix: CTD when using Random personality in I.M.P creation - moved Random personality flag from INI to option screen - added MAX_IMP_CHARACTERS entry in the ja2_options.ini (Range: 0 - 6) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@528 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+38
-28
@@ -382,6 +382,8 @@ void HandleTextEvent( UINT32 uiKey )
|
||||
|
||||
void ProcessPlayerInputActivationString( void )
|
||||
{
|
||||
INT16 iNextSlot = -1;
|
||||
|
||||
// prcess string to see if it matches activation string
|
||||
|
||||
if( NumberOfMercsOnPlayerTeam() >= 18 )
|
||||
@@ -390,39 +392,47 @@ void ProcessPlayerInputActivationString( void )
|
||||
char charPlayerActivationString[32];
|
||||
wcstombs(charPlayerActivationString,pPlayerActivationString,32);
|
||||
|
||||
//Madd multiple imps if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) )&&( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
|
||||
if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
|
||||
iNextSlot = GetNextFreeIMPSlot();
|
||||
|
||||
// We have at least one more free slot for a imp character
|
||||
if (iNextSlot != -1)
|
||||
{
|
||||
// Kaiden: Need to reset skills, attributes and personalities with the new UB Method.
|
||||
ResetSkillsAttributesAndPersonality( );
|
||||
ClearAllSkillsList( );
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
//Madd multiple imps if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) )&&( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
|
||||
if( ( ( wcscmp(pPlayerActivationString, L"XEP624") == 0 ) || ( wcscmp(pPlayerActivationString, L"xep624") == 0 ) ) &&( LaptopSaveInfo.gfNewGameLaptop < 2 ) )
|
||||
{
|
||||
// Kaiden: Need to reset skills, attributes and personalities with the new UB Method.
|
||||
ResetSkillsAttributesAndPersonality( );
|
||||
ClearAllSkillsList( );
|
||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||
|
||||
}
|
||||
//Madd multiple imps else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) && ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) )
|
||||
else if( wcscmp(pPlayerActivationString, L"90210") == 0 )
|
||||
{
|
||||
LoadImpCharacter( IMP_MERC_FILENAME );
|
||||
}
|
||||
// Madd: load characters by name
|
||||
else if ( ImpExists( charPlayerActivationString ) )
|
||||
{
|
||||
LoadImpCharacter( charPlayerActivationString );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ( ( wcscmp(pPlayerActivationString, L"XEP624") != 0 ) && ( wcscmp(pPlayerActivationString, L"xep624") != 0 ) ) )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 0 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
}
|
||||
else if( LaptopSaveInfo.fIMPCompletedFlag == TRUE )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 6 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Madd multiple imps else if( ( wcscmp(pPlayerActivationString, L"90210") == 0 ) && ( LaptopSaveInfo.fIMPCompletedFlag == FALSE ) )
|
||||
else if( wcscmp(pPlayerActivationString, L"90210") == 0 )
|
||||
else
|
||||
{
|
||||
LoadImpCharacter( IMP_MERC_FILENAME );
|
||||
}
|
||||
// Madd: load characters by name
|
||||
else if ( ImpExists( charPlayerActivationString ) )
|
||||
{
|
||||
LoadImpCharacter( charPlayerActivationString );
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if( ( ( wcscmp(pPlayerActivationString, L"XEP624") != 0 ) && ( wcscmp(pPlayerActivationString, L"xep624") != 0 ) ) )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 0 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
}
|
||||
else if( LaptopSaveInfo.fIMPCompletedFlag == TRUE )
|
||||
{
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 6 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user