mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
bug fixes from Overhaul:
- Data type changes - Templates removed git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -55,7 +55,7 @@ INT32 CalcPercentBetter(INT32 iOldValue, INT32 iNewValue, INT32 iOldScale, INT32
|
||||
if (iValueChange <= 0)
|
||||
{
|
||||
#ifdef BETAVERSION
|
||||
sprintf((CHAR *)tempstr,"CalcPercentBetter: ERROR - invalid valueChange = %d",valueChange);
|
||||
sprintf(tempstr,"CalcPercentBetter: ERROR - invalid valueChange = %d",valueChange);
|
||||
|
||||
#ifdef RECORDNET
|
||||
fprintf(NetDebugFile,"\n\t%s\n\n",tempstr);
|
||||
@@ -74,7 +74,7 @@ INT32 CalcPercentBetter(INT32 iOldValue, INT32 iNewValue, INT32 iOldScale, INT32
|
||||
if (iScaleSum <= 0)
|
||||
{
|
||||
#ifdef BETAVERSION
|
||||
sprintf((CHAR *)tempstr,"CalcPercentBetter: ERROR - invalid scaleSum = %d",iScaleSum);
|
||||
sprintf(tempstr,"CalcPercentBetter: ERROR - invalid scaleSum = %d",iScaleSum);
|
||||
|
||||
#ifdef RECORDNET
|
||||
fprintf(NetDebugFile,"\n\t%s\n\n",tempstr);
|
||||
@@ -777,7 +777,7 @@ INT16 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
|
||||
// add this opponent's cover value to our current total cover value
|
||||
iCurrentCoverValue += CalcCoverValue(pSoldier,pSoldier->sGridNo,iMyThreatValue,pSoldier->bActionPoints,uiLoop,Threat[uiLoop].iOrigRange,morale,&iCurrentScale);
|
||||
}
|
||||
//sprintf((CHAR *)tempstr,"iCurrentCoverValue after opponent %d is now %d",iLoop,iCurrentCoverValue);
|
||||
//sprintf(tempstr,"iCurrentCoverValue after opponent %d is now %d",iLoop,iCurrentCoverValue);
|
||||
//PopMessage(tempstr);
|
||||
}
|
||||
|
||||
@@ -824,7 +824,7 @@ INT16 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
|
||||
|
||||
#ifdef DEBUGDECISIONS
|
||||
STR tempstr="";
|
||||
sprintf((CHAR *) tempstr, "FBNC: CURRENT iCoverValue = %d\n",iCurrentCoverValue );
|
||||
sprintf( tempstr, "FBNC: CURRENT iCoverValue = %d\n",iCurrentCoverValue );
|
||||
DebugAI( tempstr );
|
||||
#endif
|
||||
|
||||
@@ -960,7 +960,7 @@ INT16 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
|
||||
uiLoop,iThreatRange,morale,&iCoverScale);
|
||||
}
|
||||
|
||||
//sprintf((CHAR *)tempstr,"iCoverValue after opponent %d is now %d",iLoop,iCoverValue);
|
||||
//sprintf(tempstr,"iCoverValue after opponent %d is now %d",iLoop,iCoverValue);
|
||||
//PopMessage(tempstr);
|
||||
}
|
||||
|
||||
@@ -1029,7 +1029,7 @@ INT16 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
|
||||
|
||||
#ifdef DEBUGDECISIONS
|
||||
STR tempstr;
|
||||
sprintf((CHAR *) tempstr,"FBNC: NEW BEST iCoverValue at gridno %d is %d\n",sGridNo,iCoverValue );
|
||||
sprintf( tempstr,"FBNC: NEW BEST iCoverValue at gridno %d is %d\n",sGridNo,iCoverValue );
|
||||
DebugAI( tempstr );
|
||||
#endif
|
||||
// remember it instead
|
||||
@@ -1081,7 +1081,7 @@ INT16 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
|
||||
{
|
||||
#ifdef DEBUGDECISIONS
|
||||
STR tempstr;
|
||||
sprintf((CHAR *) tempstr,"Found Cover: current %ld, best %ld, %%%%Better %ld\n", iCurrentCoverValue,iBestCoverValue,*piPercentBetter );
|
||||
sprintf( tempstr,"Found Cover: current %ld, best %ld, %%%%Better %ld\n", iCurrentCoverValue,iBestCoverValue,*piPercentBetter );
|
||||
DebugAI( tempstr );
|
||||
#endif
|
||||
|
||||
@@ -1937,7 +1937,7 @@ INT8 SearchForItems( SOLDIERTYPE * pSoldier, INT8 bReason, UINT16 usItem )
|
||||
|
||||
if (sBestSpot != NOWHERE)
|
||||
{
|
||||
DebugAI( (STR)String( "%d decides to pick up %S", pSoldier->ubID, ItemNames[ gWorldItems[ iBestItemIndex ].o.usItem ] ) );
|
||||
DebugAI( String( "%d decides to pick up %S", pSoldier->ubID, ItemNames[ gWorldItems[ iBestItemIndex ].o.usItem ] ) );
|
||||
if (Item[gWorldItems[ iBestItemIndex ].o.usItem].usItemClass == IC_GUN)
|
||||
{
|
||||
if (FindBetterSpotForItem( pSoldier, HANDPOS ) == FALSE)
|
||||
@@ -1949,14 +1949,14 @@ INT8 SearchForItems( SOLDIERTYPE * pSoldier, INT8 bReason, UINT16 usItem )
|
||||
if (pSoldier->inv[HANDPOS].fFlags & OBJECT_UNDROPPABLE)
|
||||
{
|
||||
// destroy this item!
|
||||
DebugAI( (STR)String( "%d decides he must drop %S first so destroys it", pSoldier->ubID, ItemNames[ pSoldier->inv[HANDPOS].usItem ] ) );
|
||||
DebugAI( String( "%d decides he must drop %S first so destroys it", pSoldier->ubID, ItemNames[ pSoldier->inv[HANDPOS].usItem ] ) );
|
||||
DeleteObj( &(pSoldier->inv[HANDPOS]) );
|
||||
DeductPoints( pSoldier, AP_PICKUP_ITEM, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// we want to drop this item!
|
||||
DebugAI( (STR)String( "%d decides he must drop %S first", pSoldier->ubID, ItemNames[ pSoldier->inv[HANDPOS].usItem ] ) );
|
||||
DebugAI( String( "%d decides he must drop %S first", pSoldier->ubID, ItemNames[ pSoldier->inv[HANDPOS].usItem ] ) );
|
||||
|
||||
pSoldier->bNextAction = AI_ACTION_PICKUP_ITEM;
|
||||
pSoldier->usNextActionData = sBestSpot;
|
||||
|
||||
Reference in New Issue
Block a user