- Fix: crash when trying to delete an item with invalid GridNo

- Fix: adjusted squadname when discovering NPCs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5890 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-03-03 08:57:26 +00:00
parent b41653aeea
commit fc2e10314b
11 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -5271,7 +5271,7 @@ BOOLEAN HandlePlayerGroupEnteringSectorToCheckForNPCsOfNote( GROUP *pGroup )
GetSectorIDString( sSectorX, sSectorY, bSectorZ, wSectorName, FALSE );
if ( gGameExternalOptions.fUseXMLSquadNames && pGroup->pPlayerList->pSoldier->bAssignment < ON_DUTY )
swprintf( sString, pLandMarkInSectorString[ 0 ], SquadNames[ pGroup->pPlayerList->pSoldier->bAssignment ].squadname, wSectorName );
swprintf( sString, pLandMarkInSectorString[ 1 ], SquadNames[ pGroup->pPlayerList->pSoldier->bAssignment ].squadname, wSectorName );
else
swprintf( sString, pLandMarkInSectorString[ 0 ], pGroup->pPlayerList->pSoldier->bAssignment + 1, wSectorName );
+3 -1
View File
@@ -3733,7 +3733,9 @@ void SearchItemRetrieval( WORLDITEM* pWorldItem, ItemSearchStruct* pSi, SOLDIERC
if ( pWorldItem[ pSi->pos ].object.ubNumberOfObjects < 1 )
{
RemoveItemFromPool(pWorldItem[ pSi->pos ].sGridNo, (pSi->pos), pWorldItem[ pSi->pos ].ubLevel);
// account for items with invalid gridnos...
if ( pWorldItem[ pSi->pos ].sGridNo != NOWHERE )
RemoveItemFromPool(pWorldItem[ pSi->pos ].sGridNo, (pSi->pos), pWorldItem[ pSi->pos ].ubLevel);
// setting this to false can lead to cases where we 'forget' items without a valid gridno - though I am unsure why.
//pWorldItem[ pSi->pos ].fExists = FALSE;
+1
View File
@@ -5063,6 +5063,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"第%d小队在%s地区发现有人",
L"Squad %s has noticed someone in sector %s",// TODO.Translate
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -5064,6 +5064,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"Team %d is heeft iemand ontdekt in sector %s",
L"Team %s is heeft iemand ontdekt in sector %s",
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -5062,6 +5062,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"Squad %d has noticed someone in sector %s",
L"Squad %s has noticed someone in sector %s",
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -5064,6 +5064,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"L'escouade %d a remarqué quelque chose dans le secteur %s",
L"L'escouade %s a remarqué quelque chose dans le secteur %s",
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -4910,6 +4910,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"Trupp %d hat in Sektor %s jemanden bemerkt.",
L"Trupp %s hat in Sektor %s jemanden bemerkt.",
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -5048,6 +5048,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"La squadra %d ha notato qualcuno nel settore %s",
L"La squadra %s ha notato qualcuno nel settore %s",
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -5066,6 +5066,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"Oddział %d zauważył kogoŚ w sektorze %s",
L"Oddział %s zauważył kogoŚ w sektorze %s",
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -5062,6 +5062,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"Отряд %d заметил кого-то в секторе %s.",
L"Отряд %s заметил кого-то в секторе %s.",
};
// confirm the player wants to pay X dollars to build a militia force in town
+1
View File
@@ -5065,6 +5065,7 @@ STR16 zMarksMapScreenText[] =
STR16 pLandMarkInSectorString[] =
{
L"Squad %d has noticed someone in sector %s",
L"Squad %s has noticed someone in sector %s",// TODO.Translate
};
// confirm the player wants to pay X dollars to build a militia force in town