mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- DIRT_GLOBAL_MODIFIER is a global modifier to dirt generation
- second cleaning button in menu now orders entire team to clean their guns - global overheating modifier now also multiplies attachment modifiers - cleaning kits always use up 1% on use git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5913 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1571,6 +1571,7 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.fDirtSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","DIRT_SYSTEM", FALSE);
|
||||
gGameExternalOptions.fFullRepairCleansGun = iniReader.ReadBoolean("Strategic Gameplay Settings","FULL_REPAIR_CLEANS_GUN", FALSE);
|
||||
gGameExternalOptions.usSectorDirtDivider = iniReader.ReadInteger("Strategic Gameplay Settings","SECTOR_DIRT_DIVIDER", 1000, 1, 100000);
|
||||
gGameExternalOptions.iDirtGlobalModifier = iniReader.ReadFloat ("Strategic Gameplay Settings","DIRT_GLOBAL_MODIFIER", 1.25f, 0.1f, 10.0f);
|
||||
|
||||
// Flugente: prisoner system
|
||||
gGameExternalOptions.fAllowPrisonerSystem = iniReader.ReadBoolean("Strategic Gameplay Settings","ALLOW_TAKE_PRISONERS", TRUE);
|
||||
|
||||
+2
-1
@@ -1164,7 +1164,7 @@ typedef struct
|
||||
BOOLEAN fDisplayOverheatThermometer; // Should a 'thermometer' for guns and replacable barrels be displayed?
|
||||
UINT8 ubOverheatThermometerRedOffset; // amount of red colour while temperature is below threshold
|
||||
FLOAT iCooldownModificatorLonelyBarrel; // Cooldown modificator for barrels left alone in the landscape ;-)
|
||||
FLOAT iOverheatTemperatureGlobalModfier; // a global modifier to the singel shot temperature value, if one feels that all values should be lower/higher
|
||||
FLOAT iOverheatTemperatureGlobalModfier; // a global modifier to the single shot temperature value, if one feels that all values should be lower/higher
|
||||
|
||||
// Flugente: Weapon Mounting
|
||||
BOOLEAN fWeaponResting; // Should it be possible to rest your weapon on structures in crouched position?
|
||||
@@ -1184,6 +1184,7 @@ typedef struct
|
||||
BOOLEAN fDirtSystem; // allow dirt on items increase the chance for weapon jamming
|
||||
BOOLEAN fFullRepairCleansGun; // repairing a gun up to its current repair threshold also cleans the gun
|
||||
UINT32 usSectorDirtDivider; // divide a guns dirt factor by this to get dirt increase for every turn
|
||||
FLOAT iDirtGlobalModifier; // a global modifier to dirt generation, if one feels that all values should be lower/higher
|
||||
|
||||
// Flugente: prisoner related settings
|
||||
BOOLEAN fAllowPrisonerSystem;
|
||||
|
||||
@@ -134,7 +134,7 @@ void StartBombMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo );
|
||||
|
||||
// added by Flugente
|
||||
void StartTacticalFunctionSelectionMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo, INT8 bLevel );
|
||||
void CleanWeapons( BOOLEAN fCleanAll );
|
||||
void CleanWeapons( BOOLEAN fEntireTeam );
|
||||
void Strip( SOLDIERTYPE * pSoldier );
|
||||
void StartCorpseMessageBox( SOLDIERTYPE * pSoldier, INT32 sGridNo, INT8 bLevel );
|
||||
|
||||
@@ -4748,7 +4748,7 @@ void StartTacticalFunctionSelectionMessageBox( SOLDIERTYPE * pSoldier, INT32 sGr
|
||||
DoMessageBox( MSG_BOX_BASIC_MEDIUM_BUTTONS, TacticalStr[ FUNCTION_SELECTION_STR ], GAME_SCREEN, MSG_BOX_FLAG_GENERIC_EIGHT_BUTTONS, TacticalFunctionSelectionMessageBoxCallBack, NULL );
|
||||
}
|
||||
|
||||
void CleanWeapons( BOOLEAN fCleanAll )
|
||||
void CleanWeapons( BOOLEAN fEntireTeam )
|
||||
{
|
||||
if ( !gGameExternalOptions.fDirtSystem )
|
||||
return;
|
||||
@@ -4758,7 +4758,7 @@ void CleanWeapons( BOOLEAN fCleanAll )
|
||||
return;
|
||||
|
||||
// if in turnbased mode, perform this action only for the selected merc, and use up APs
|
||||
if ( gTacticalStatus.uiFlags & TURNBASED )
|
||||
if ( !fEntireTeam || gTacticalStatus.uiFlags & TURNBASED )
|
||||
{
|
||||
if ( gusSelectedSoldier == NOBODY )
|
||||
return;
|
||||
@@ -4766,7 +4766,7 @@ void CleanWeapons( BOOLEAN fCleanAll )
|
||||
SOLDIERTYPE* pSoldier = MercPtrs[ gusSelectedSoldier ];
|
||||
|
||||
if ( pSoldier->bActive )
|
||||
pSoldier->CleanWeapon(fCleanAll);
|
||||
pSoldier->CleanWeapon(FALSE);
|
||||
}
|
||||
else // perform action for every merc in this sector
|
||||
{
|
||||
@@ -4782,7 +4782,7 @@ void CleanWeapons( BOOLEAN fCleanAll )
|
||||
//if the merc is in this sector
|
||||
if ( pSoldier->bActive && pSoldier->ubProfile != NO_PROFILE && pSoldier->bInSector && ( pSoldier->sSectorX == gWorldSectorX ) && ( pSoldier->sSectorY == gWorldSectorY ) && ( pSoldier->bSectorZ == gbWorldSectorZ) )
|
||||
{
|
||||
pSoldier->CleanWeapon(fCleanAll);
|
||||
pSoldier->CleanWeapon(TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4905,11 +4905,11 @@ void TacticalFunctionSelectionMessageBoxCallBack( UINT8 ubExitValue )
|
||||
SectorFillCanteens();
|
||||
break;
|
||||
case 2:
|
||||
// clean a single weapon
|
||||
// clean weapons of selected merc
|
||||
CleanWeapons(FALSE);
|
||||
break;
|
||||
case 3:
|
||||
// clean all weapons
|
||||
// clean weapons of entire team
|
||||
CleanWeapons(TRUE);
|
||||
break;
|
||||
case 4:
|
||||
|
||||
@@ -11425,7 +11425,7 @@ void DrawAdvancedValues( OBJECTTYPE *gpItemDescObject )
|
||||
sTop = gItemDescAdvRegions[cnt-sFirstLine][1].sTop;
|
||||
sHeight = gItemDescAdvRegions[cnt-sFirstLine][1].sBottom - sTop;
|
||||
|
||||
iFloatModifier[0] = Item[ gpItemDescObject->usItem ].dirtIncreaseFactor;
|
||||
iFloatModifier[0] = Item[ gpItemDescObject->usItem ].dirtIncreaseFactor * gGameExternalOptions.iDirtGlobalModifier;
|
||||
iFloatModifier[2] = GetItemDirtIncreaseFactor( gpItemDescObject, TRUE );
|
||||
iFloatModifier[1] = iFloatModifier[2] - iFloatModifier[0];
|
||||
|
||||
|
||||
+4
-1
@@ -14702,9 +14702,12 @@ FLOAT GetItemDirtIncreaseFactor( OBJECTTYPE * pObj, BOOLEAN fConsiderAmmo )
|
||||
}
|
||||
}
|
||||
|
||||
// ammo modifies how much dirt a single shot makes, but only while shooting
|
||||
// ammo modifies how much dirt a single shot makes, but only while shooting, not when a gun gets dirty due to environmental effects
|
||||
if ( fConsiderAmmo )
|
||||
dirtincreasefactor *= (1.0f + AmmoTypes[(*pObj)[0]->data.gun.ubGunAmmoType].dirtModificator);
|
||||
|
||||
// multiply again for global modifer
|
||||
dirtincreasefactor *= gGameExternalOptions.iDirtGlobalModifier;
|
||||
|
||||
// dirt factor has to be >= 0 (items don't clean themselves)
|
||||
dirtincreasefactor = max(0.0f, dirtincreasefactor);
|
||||
|
||||
@@ -3177,7 +3177,7 @@ BOOLEAN RepairIsDone(DEALER_SPECIAL_ITEM* pSpecial)
|
||||
// fix it up
|
||||
(*iter)[0]->data.objectStatus = 100;
|
||||
|
||||
// Flugente: shopkeepers will also restore an item's repair threshold
|
||||
// Flugente: shopkeepers will also restore an item's repair threshold and clean it
|
||||
(*iter)[0]->data.sRepairThreshold = 100;
|
||||
(*iter)[0]->data.bDirtLevel = 0.0f;
|
||||
}
|
||||
|
||||
@@ -14485,7 +14485,7 @@ OBJECTTYPE* SOLDIERTYPE::GetCleaningKit()
|
||||
return( pObj );
|
||||
}
|
||||
|
||||
// use cleaning kits to clean weapons in inventory. fCleanAll = TRUE: clean all eapons found, otherwise just the first one
|
||||
// use cleaning kits to clean weapons in inventory. fCleanAll = TRUE: clean all weapons found, otherwise just the first one
|
||||
void SOLDIERTYPE::CleanWeapon( BOOLEAN fCleanAll )
|
||||
{
|
||||
// in turnbased, this action costs APs. remove them if possible, otherwise, return
|
||||
@@ -14526,16 +14526,15 @@ void SOLDIERTYPE::CleanWeapon( BOOLEAN fCleanAll )
|
||||
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[WEAPON_CLEANING_STR], this->name, Item[pObj->usItem].szItemName );
|
||||
|
||||
// 33% chance to use up 1% of the cleaning kit
|
||||
if ( Random(2) > 0 )
|
||||
UseKitPoints( pCleaningKit, 1, this );
|
||||
// always use up 1% of the cleaning kit (they last too long otherwise)
|
||||
UseKitPoints( pCleaningKit, 1, this );
|
||||
|
||||
if ( gTacticalStatus.uiFlags & TURNBASED )
|
||||
{
|
||||
// use up APs
|
||||
DeductPoints( this, apcost, 0, AFTERACTION_INTERRUPT );
|
||||
|
||||
// if fCleanAll is false, only clean one weapon
|
||||
// if fCleanAll is false, only clean first weapon
|
||||
if (!fCleanAll )
|
||||
return;
|
||||
|
||||
|
||||
@@ -11762,7 +11762,7 @@ FLOAT GetSingleShotTemperature( OBJECTTYPE *pObj )
|
||||
singleshottemperature = Weapon[ pObj->usItem ].usOverheatingSingleShotTemperature;
|
||||
|
||||
// determine modificator according to attachments
|
||||
FLOAT modificator = gGameExternalOptions.iOverheatTemperatureGlobalModfier;
|
||||
FLOAT modificator = 1.0f;
|
||||
|
||||
attachmentList::iterator iterend = (*pObj)[0]->attachments.end();
|
||||
for (attachmentList::iterator iter = (*pObj)[0]->attachments.begin(); iter != iterend; ++iter)
|
||||
@@ -11777,6 +11777,9 @@ FLOAT GetSingleShotTemperature( OBJECTTYPE *pObj )
|
||||
modificator += AmmoTypes[(*pObj)[0]->data.gun.ubGunAmmoType].temperatureModificator;
|
||||
|
||||
singleshottemperature *= modificator;
|
||||
|
||||
// multiply again for global modifer
|
||||
singleshottemperature *= gGameExternalOptions.iOverheatTemperatureGlobalModfier;
|
||||
}
|
||||
|
||||
return singleshottemperature;
|
||||
|
||||
@@ -2922,8 +2922,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical
|
||||
L"你想要做的是什么?",
|
||||
L"装满水壶",
|
||||
L"清理枪支污垢",
|
||||
L"清理所有枪支污垢",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"脱掉衣服",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2919,8 +2919,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical // TODO.Translate
|
||||
L"What do you want to do?",
|
||||
L"Fill canteens",
|
||||
L"Clean gun",
|
||||
L"Clean all guns",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"Take off clothes",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2921,8 +2921,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical
|
||||
L"What do you want to do?",
|
||||
L"Fill canteens",
|
||||
L"Clean gun",
|
||||
L"Clean all guns",
|
||||
L"Clean guns (Merc)",
|
||||
L"Clean guns (Team)",
|
||||
L"Take off clothes",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2926,8 +2926,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical // TODO.Translate
|
||||
L"What do you want to do?",
|
||||
L"Fill canteens",
|
||||
L"Clean gun",
|
||||
L"Clean all guns",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"Take off clothes",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2924,8 +2924,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical
|
||||
L"Was möchten Sie tun?",
|
||||
L"Feldflasche auffüllen",
|
||||
L"Waffe reinigen",
|
||||
L"Alle Waffen reinigen",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"Kleidung ausziehen",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2913,8 +2913,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical // TODO.Translate
|
||||
L"What do you want to do?",
|
||||
L"Fill canteens",
|
||||
L"Clean gun",
|
||||
L"Clean all guns",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"Take off clothes",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2930,8 +2930,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical // TODO.Translate
|
||||
L"What do you want to do?",
|
||||
L"Fill canteens",
|
||||
L"Clean gun",
|
||||
L"Clean all guns",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"Take off clothes",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2921,8 +2921,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical // TODO.Translate
|
||||
L"Что будем делать?",
|
||||
L"Наполнить фляги",
|
||||
L"Почистить оружие",
|
||||
L"Почистить всё оружие",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"Снять одежду",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
@@ -2923,8 +2923,8 @@ CHAR16 TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
// added by Flugente: selection of a function to call in tactical // TODO.Translate
|
||||
L"What do you want to do?",
|
||||
L"Fill canteens",
|
||||
L"Clean gun",
|
||||
L"Clean all guns",
|
||||
L"Clean guns (Merc)",//TODO.Translate
|
||||
L"Clean guns (Team)",
|
||||
L"Take off clothes",
|
||||
|
||||
// added by Flugente: decide what to do with the corpses
|
||||
|
||||
Reference in New Issue
Block a user