mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Remove compiler warnings
This commit is contained in:
@@ -2308,7 +2308,7 @@ BOOLEAN PlayVoiceTaunt(SOLDIERTYPE *pCiv, TAUNTTYPE iTauntType, SOLDIERTYPE *pTa
|
||||
if ((OutFile = fopen("VoiceTauntLog.txt", "a+t")) != NULL)
|
||||
{
|
||||
fprintf(OutFile, "Soldier [%d] TauntType %d %s\n",
|
||||
pCiv->ubID,
|
||||
pCiv->ubID.i,
|
||||
iTauntType,
|
||||
filename);
|
||||
fclose(OutFile);
|
||||
|
||||
+1
-1
@@ -9316,7 +9316,7 @@ BOOLEAN DamageItemOnGround( OBJECTTYPE * pObject, INT32 sGridNo, INT8 bLevel, IN
|
||||
{
|
||||
#ifdef JA2BETAVERSION
|
||||
CHAR tmpMPDbgString[512];
|
||||
sprintf(tmpMPDbgString,"DamageItemOnGround ( usItem : %i , sGridNo : %i , bLevel : %i , iDamage : %i , ubOwner : %i )\n",pObject->usItem, sGridNo , bLevel , iDamage , ubOwner );
|
||||
sprintf(tmpMPDbgString,"DamageItemOnGround ( usItem : %i , sGridNo : %i , bLevel : %i , iDamage : %i , ubOwner : %i )\n",pObject->usItem, sGridNo , bLevel , iDamage , ubOwner.i );
|
||||
MPDebugMsg(tmpMPDbgString);
|
||||
#endif
|
||||
|
||||
|
||||
+3
-3
@@ -5639,7 +5639,7 @@ INT8 FireBulletGivenTarget( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY, FLOA
|
||||
fprintf(OutFile, "{ % 9.8f , % 9.8f , % 9.8f , % 9.8f }, //DEBUG: merc %4d fired pellet %4d of %4d using method %4d %12s with SpreadPattern %4d %s\n",
|
||||
ddRawHorizAngle, ddRawVerticAngle,
|
||||
ddHorizAngle, ddVerticAngle,
|
||||
pFirer->ubID, ubLoop, ubShots,
|
||||
pFirer->ubID.i, ubLoop, ubShots,
|
||||
gpSpreadPattern[ubSpreadIndex].method, gSpreadPatternMethodNames[gpSpreadPattern[ubSpreadIndex].method],
|
||||
ubSpreadIndex, gpSpreadPattern[ubSpreadIndex].Name
|
||||
);
|
||||
@@ -6284,7 +6284,7 @@ INT8 FireBulletGivenTargetTrapOnly( SOLDIERTYPE* pThrower, OBJECTTYPE* pObj, INT
|
||||
fprintf(OutFile, "{ % 9.8f , % 9.8f , % 9.8f , % 9.8f }, //DEBUG: merc %4d fired pellet %4d of %4d using method %4d %12s with SpreadPattern %4d %s\n",
|
||||
ddRawHorizAngle, ddRawVerticAngle,
|
||||
ddHorizAngle, ddVerticAngle,
|
||||
NOBODY, ubLoop, ubShots,
|
||||
NOBODY.i, ubLoop, ubShots,
|
||||
gpSpreadPattern[ubSpreadIndex].method, gSpreadPatternMethodNames[gpSpreadPattern[ubSpreadIndex].method],
|
||||
ubSpreadIndex, gpSpreadPattern[ubSpreadIndex].Name
|
||||
);
|
||||
@@ -6834,7 +6834,7 @@ INT8 FireBulletGivenTarget_NoObjectNoSoldier( UINT16 usItem, UINT8 ammotype, UIN
|
||||
fprintf( OutFile, "{ % 9.8f , % 9.8f , % 9.8f , % 9.8f }, //DEBUG: merc %4d fired pellet %4d of %4d using method %4d %12s with SpreadPattern %4d %s\n",
|
||||
ddRawHorizAngle, ddRawVerticAngle,
|
||||
ddHorizAngle, ddVerticAngle,
|
||||
NOBODY, ubLoop, ubShots,
|
||||
NOBODY.i, ubLoop, ubShots,
|
||||
gpSpreadPattern[ubSpreadIndex].method, gSpreadPatternMethodNames[gpSpreadPattern[ubSpreadIndex].method],
|
||||
ubSpreadIndex, gpSpreadPattern[ubSpreadIndex].Name
|
||||
);
|
||||
|
||||
@@ -23977,13 +23977,13 @@ void DebugValidateSoldierData( )
|
||||
!(pSoldier->flags.uiStatusFlags & (SOLDIER_DRIVER | SOLDIER_PASSENGER)) )
|
||||
{
|
||||
// This is bad!
|
||||
swprintf( sString, L"Soldier Data Error: Soldier %d is alive but has a zero group ID.", cnt );
|
||||
swprintf( sString, L"Soldier Data Error: Soldier %d is alive but has a zero group ID.", cnt.i );
|
||||
fProblemDetected = TRUE;
|
||||
}
|
||||
else if ( (pSoldier->ubGroupID != 0) && (GetGroup( pSoldier->ubGroupID ) == NULL) )
|
||||
{
|
||||
// This is bad!
|
||||
swprintf( sString, L"Soldier Data Error: Soldier %d has an invalid group ID of %d.", cnt, pSoldier->ubGroupID );
|
||||
swprintf( sString, L"Soldier Data Error: Soldier %d has an invalid group ID of %d.", cnt.i, pSoldier->ubGroupID );
|
||||
fProblemDetected = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -24003,7 +24003,7 @@ void DebugValidateSoldierData( )
|
||||
(pSoldier->sSectorY <= 0) || (pSoldier->sSectorY >= 17) ||
|
||||
(pSoldier->bSectorZ < 0) || (pSoldier->bSectorZ > (SPY_LOCATION( pSoldier->bAssignment ) ? 13 : 3) ) ) )
|
||||
{
|
||||
swprintf( sString, L"Soldier Data Error: Soldier %d is located at %d/%d/%d.", cnt, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
|
||||
swprintf( sString, L"Soldier Data Error: Soldier %d is located at %d/%d/%d.", cnt.i, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
|
||||
fProblemDetected = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction )
|
||||
|
||||
sprintf(msg, "");
|
||||
|
||||
sprintf(buf, "[%d] (%d)", pSoldier->ubID, pSoldier->sGridNo);
|
||||
sprintf(buf, "[%d] (%d)", pSoldier->ubID.i, pSoldier->sGridNo);
|
||||
strcat(msg, buf);
|
||||
|
||||
if (pSoldier->ubProfile != NO_PROFILE)
|
||||
@@ -301,7 +301,7 @@ void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction )
|
||||
}
|
||||
|
||||
// also log to individual file for selected soldier
|
||||
sprintf(buf, "Logs\\AI_Decisions [%d].txt", pSoldier->ubID);
|
||||
sprintf(buf, "Logs\\AI_Decisions [%d].txt", pSoldier->ubID.i);
|
||||
if ((DebugFile = fopen(buf, "a+t")) != NULL)
|
||||
{
|
||||
if (bMsgType == AI_MSG_START)
|
||||
@@ -697,19 +697,18 @@ void HandleSoldierAI( SOLDIERTYPE *pSoldier ) // FIXME - this function is named
|
||||
// ATE: Display message that deadlock occured...
|
||||
LiveMessage( "Breaking Deadlock" );
|
||||
|
||||
ScreenMsg(FONT_MCOLOR_LTRED, MSG_INTERFACE, L"Aborting AI deadlock for [%d] %s %s data %d", pSoldier->ubID, pSoldier->GetName(), utf8_to_wstring(std::string(szAction[pSoldier->aiData.bAction])), pSoldier->aiData.usActionData);
|
||||
ScreenMsg(FONT_MCOLOR_LTRED, MSG_INTERFACE, L"Aborting AI deadlock for [%d] %s %s data %d", pSoldier->ubID.i, pSoldier->GetName(), utf8_to_wstring(std::string(szAction[pSoldier->aiData.bAction])), pSoldier->aiData.usActionData);
|
||||
DebugAI(String("Aborting AI deadlock for [%d] %s data %d", pSoldier->ubID, szAction[pSoldier->aiData.bAction], pSoldier->aiData.usActionData));
|
||||
|
||||
#ifdef JA2TESTVERSION
|
||||
// display deadlock message
|
||||
gfUIInDeadlock = TRUE;
|
||||
gUIDeadlockedSoldier = pSoldier->ubID;
|
||||
DebugAI( String("DEADLOCK soldier %d action %s ABC %d", pSoldier->ubID, gzActionStr[pSoldier->aiData.bAction], gTacticalStatus.ubAttackBusyCount ) );
|
||||
DebugAI( String("DEADLOCK soldier %d action %s ABC %d", pSoldier->ubID.i, gzActionStr[pSoldier->aiData.bAction], gTacticalStatus.ubAttackBusyCount ) );
|
||||
#else
|
||||
|
||||
// If we are in beta version, also report message!
|
||||
#ifdef JA2BETAVERSION
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_ERROR, L"Aborting AI deadlock for %d. Please sent DEBUG.TXT file and SAVE.", pSoldier->ubID );
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_ERROR, L"Aborting AI deadlock for %d. Please sent DEBUG.TXT file and SAVE.", pSoldier->ubID.i );
|
||||
#endif
|
||||
// just abort
|
||||
EndAIDeadlock();
|
||||
|
||||
@@ -2168,7 +2168,7 @@ BOOLEAN ExpAffect( INT32 sBombGridNo, INT32 sGridNo, UINT32 uiDist, UINT16 usIte
|
||||
#ifdef JA2BETAVERSION
|
||||
if (is_networked) {
|
||||
CHAR tmpMPDbgString[512];
|
||||
sprintf(tmpMPDbgString,"ExpAffect ( sBombGridNo : %i , sGridNo : %i , uiDist : %i , usItem : %i , ubOwner : %i , sSubsequent : %i , fMercHit : %i , bLevel : %i , iSmokeEffectID : %i )\n",sBombGridNo, sGridNo , uiDist , usItem , ubOwner , sSubsequent , (int)*pfMercHit , bLevel , iSmokeEffectID );
|
||||
sprintf(tmpMPDbgString,"ExpAffect ( sBombGridNo : %i , sGridNo : %i , uiDist : %i , usItem : %i , ubOwner : %i , sSubsequent : %i , fMercHit : %i , bLevel : %i , iSmokeEffectID : %i )\n",sBombGridNo, sGridNo , uiDist , usItem , ubOwner.i , sSubsequent , (int)*pfMercHit , bLevel , iSmokeEffectID );
|
||||
MPDebugMsg(tmpMPDbgString);
|
||||
}
|
||||
#endif
|
||||
@@ -2953,7 +2953,7 @@ void SpreadEffect( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, SoldierID ubOwn
|
||||
}
|
||||
#ifdef JA2BETAVERSION
|
||||
CHAR tmpMPDbgString[512];
|
||||
sprintf(tmpMPDbgString,"SpreadEffect ( sGridNo : %i , ubRadius : %i , usItem : %i , ubOwner : %i , fSubsequent : %i , bLevel : %i , iSmokeEffectID : %i , fFromRemote : %i , fNewSmoke : %i )\n",sGridNo, ubRadius , usItem , ubOwner , (int)fSubsequent , bLevel , iSmokeEffectID , fFromRemoteClient , fNewSmokeEffect );
|
||||
sprintf(tmpMPDbgString,"SpreadEffect ( sGridNo : %i , ubRadius : %i , usItem : %i , ubOwner : %i , fSubsequent : %i , bLevel : %i , iSmokeEffectID : %i , fFromRemote : %i , fNewSmoke : %i )\n",sGridNo, ubRadius , usItem , ubOwner.i , (int)fSubsequent , bLevel , iSmokeEffectID , fFromRemoteClient , fNewSmokeEffect );
|
||||
MPDebugMsg(tmpMPDbgString);
|
||||
gfMPDebugOutputRandoms = true;
|
||||
#endif
|
||||
|
||||
@@ -366,7 +366,7 @@ INT32 NewSmokeEffect(INT32 sGridNo, UINT16 usItem, INT8 bLevel, SoldierID ubOwne
|
||||
}
|
||||
#ifdef JA2BETAVERSION
|
||||
CHAR tmpMPDbgString[512];
|
||||
sprintf(tmpMPDbgString, "NewSmokeEffect ( sGridNo : %i , usItem : %i , ubOwner : %i , bLevel : %i , iSmokeEffectID : %i )\n", sGridNo, usItem, ubOwner, bLevel, iSmokeIndex);
|
||||
sprintf(tmpMPDbgString, "NewSmokeEffect ( sGridNo : %i , usItem : %i , ubOwner : %i , bLevel : %i , iSmokeEffectID : %i )\n", sGridNo, usItem, ubOwner.i, bLevel, iSmokeIndex);
|
||||
MPDebugMsg(tmpMPDbgString);
|
||||
gfMPDebugOutputRandoms = true;
|
||||
#endif
|
||||
|
||||
@@ -2188,7 +2188,7 @@ BOOLEAN CalculateLaunchItemChanceToGetThrough( SOLDIERTYPE *pSoldier, OBJECTTYPE
|
||||
|
||||
if ( pSoldier->sGridNo == sGridNo )
|
||||
{
|
||||
printf("Warning! Soldier #%d attempted to launch item at himself\n", pSoldier->ubID);
|
||||
printf("Warning! Soldier #%d attempted to launch item at himself\n", pSoldier->ubID.i);
|
||||
return FALSE;
|
||||
}
|
||||
// Ge7t basic launch params...
|
||||
|
||||
Reference in New Issue
Block a user