mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- removed the CLOTHES_CIVILIAN-flag, as it is not needed anymore
- the Strip function now removes the covert tags, or takes off custom clothes if already not covert - fix: XML_Clothes.cpp was not included git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5567 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4594,7 +4594,7 @@ void CleanWeapons( BOOLEAN fCleanAll )
|
||||
}
|
||||
}
|
||||
|
||||
// take off custom clothes
|
||||
// undisguise or take off custom clothes
|
||||
void Strip( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
pSoldier->Strip();
|
||||
@@ -4719,7 +4719,7 @@ void TacticalFunctionSelectionMessageBoxCallBack( UINT8 ubExitValue )
|
||||
CleanWeapons(TRUE);
|
||||
break;
|
||||
case 4:
|
||||
// take off custom clothes
|
||||
// undisguise or take off custom clothes
|
||||
Strip(gpTempSoldier);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -740,7 +740,7 @@ extern OBJECTTYPE gTempObject;
|
||||
#define CAMO_REMOVAL 0x00000400 //1024 // item can be used to remove camo
|
||||
#define CLEANING_KIT 0x00000800 //2048 // weapon cleaning kit
|
||||
|
||||
#define CLOTHES_CIVILIAN 0x00001000 //4096 // with this item you can disguise as a civilian
|
||||
//#define CLOTHES_CIVILIAN 0x00001000 //4096 // with this item you can disguise as a civilian // not used anymore
|
||||
#define GAROTTE 0x00002000 //8192 // this item is a garotte
|
||||
#define COVERT 0x00004000 //16384 // if LBE, any gun inside will be covert. On a gun, it will covert in any LBE, even if the LBE does not have that tag itself
|
||||
#define CORPSE 0x00008000 //32768 // a dead body
|
||||
|
||||
@@ -15073,56 +15073,76 @@ void SOLDIERTYPE::LooseDisguise( void )
|
||||
this->bSoldierFlagMask &= ~(SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER);
|
||||
}
|
||||
|
||||
// take off any clothes item and switch back to original clothes
|
||||
// undisguise or take off any clothes item and switch back to original clothes
|
||||
// no - this function does not want you think it does. Leave Fox alone, you perv.
|
||||
void SOLDIERTYPE::Strip()
|
||||
{
|
||||
// loose any covert and clothes flags
|
||||
this->bSoldierFlagMask &= ~(SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER|SOLDIER_NEW_VEST|SOLDIER_NEW_PANTS);
|
||||
|
||||
UINT16 vestitem = 0;
|
||||
if ( GetFirstClothesItemWithSpecificData(&vestitem, this->VestPal, "blank") )
|
||||
// if covert, loose that ability
|
||||
if ( this->bSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
||||
{
|
||||
CreateItem( vestitem, 100, &gTempObject );
|
||||
if ( !AutoPlaceObject( this, &gTempObject, FALSE ) )
|
||||
AddItemToPool( this->sGridNo, &gTempObject, 1, 0, 0, -1 );
|
||||
// loose any covert flags
|
||||
this->bSoldierFlagMask &= ~(SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER);
|
||||
}
|
||||
// if already not covert, take off clothes
|
||||
else if ( this->bSoldierFlagMask & (SOLDIER_NEW_VEST|SOLDIER_NEW_PANTS) )
|
||||
{
|
||||
// loose any clothes flags
|
||||
this->bSoldierFlagMask &= ~(SOLDIER_NEW_VEST|SOLDIER_NEW_PANTS);
|
||||
|
||||
UINT16 vestitem = 0;
|
||||
if ( GetFirstClothesItemWithSpecificData(&vestitem, this->VestPal, "blank") )
|
||||
{
|
||||
CreateItem( vestitem, 100, &gTempObject );
|
||||
if ( !AutoPlaceObject( this, &gTempObject, FALSE ) )
|
||||
AddItemToPool( this->sGridNo, &gTempObject, 1, 0, 0, -1 );
|
||||
}
|
||||
else
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NO_CLOTHES_ITEM] );
|
||||
|
||||
UINT16 pantsitem = 0;
|
||||
if ( GetFirstClothesItemWithSpecificData(&pantsitem, "blank", this->PantsPal) )
|
||||
{
|
||||
CreateItem( pantsitem, 100, &gTempObject );
|
||||
if ( !AutoPlaceObject( this, &gTempObject, FALSE ) )
|
||||
AddItemToPool( this->sGridNo, &gTempObject, 1, 0, 0, -1 );
|
||||
}
|
||||
else
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NO_CLOTHES_ITEM] );
|
||||
|
||||
// show our true colours
|
||||
UINT16 usPaletteAnimSurface = LoadSoldierAnimationSurface( this, this->usAnimState );
|
||||
|
||||
if ( usPaletteAnimSurface != INVALID_ANIMATION_SURFACE )
|
||||
{
|
||||
UINT8 ubProfileIndex;
|
||||
MERCPROFILESTRUCT * pProfile;
|
||||
|
||||
ubProfileIndex = this->ubProfile;
|
||||
pProfile = &(gMercProfiles[ubProfileIndex]);
|
||||
|
||||
SET_PALETTEREP_ID ( this->VestPal, pProfile->VEST );
|
||||
SET_PALETTEREP_ID ( this->PantsPal, pProfile->PANTS );
|
||||
|
||||
// Use palette from HVOBJECT, then use substitution for pants, etc
|
||||
memcpy( this->p8BPPPalette, gAnimSurfaceDatabase[ usPaletteAnimSurface ].hVideoObject->pPaletteEntry, sizeof( this->p8BPPPalette ) * 256 );
|
||||
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->HeadPal );
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->VestPal );
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->PantsPal );
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->SkinPal );
|
||||
|
||||
this->CreateSoldierPalettes();
|
||||
}
|
||||
}
|
||||
else
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NO_CLOTHES_ITEM] );
|
||||
|
||||
UINT16 pantsitem = 0;
|
||||
if ( GetFirstClothesItemWithSpecificData(&pantsitem, "blank", this->PantsPal) )
|
||||
{
|
||||
CreateItem( pantsitem, 100, &gTempObject );
|
||||
if ( !AutoPlaceObject( this, &gTempObject, FALSE ) )
|
||||
AddItemToPool( this->sGridNo, &gTempObject, 1, 0, 0, -1 );
|
||||
}
|
||||
else
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szCovertTextStr[STR_COVERT_NO_CLOTHES_ITEM] );
|
||||
|
||||
// show our true colours
|
||||
UINT16 usPaletteAnimSurface = LoadSoldierAnimationSurface( this, this->usAnimState );
|
||||
|
||||
if ( usPaletteAnimSurface != INVALID_ANIMATION_SURFACE )
|
||||
{
|
||||
UINT8 ubProfileIndex;
|
||||
MERCPROFILESTRUCT * pProfile;
|
||||
|
||||
ubProfileIndex = this->ubProfile;
|
||||
pProfile = &(gMercProfiles[ubProfileIndex]);
|
||||
|
||||
SET_PALETTEREP_ID ( this->VestPal, pProfile->VEST );
|
||||
SET_PALETTEREP_ID ( this->PantsPal, pProfile->PANTS );
|
||||
|
||||
// Use palette from HVOBJECT, then use substitution for pants, etc
|
||||
memcpy( this->p8BPPPalette, gAnimSurfaceDatabase[ usPaletteAnimSurface ].hVideoObject->pPaletteEntry, sizeof( this->p8BPPPalette ) * 256 );
|
||||
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->HeadPal );
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->VestPal );
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->PantsPal );
|
||||
SetPaletteReplacement( this->p8BPPPalette, this->SkinPal );
|
||||
|
||||
this->CreateSoldierPalettes();
|
||||
// if the player is an annoying little perv, tell them so, girls!
|
||||
if ( this->ubBodyType == REGFEMALE )
|
||||
{
|
||||
// sigh. We were hired by an idiot.
|
||||
TacticalCharacterDialogue( this, QUOTE_IMPATIENT_QUOTE );
|
||||
this->aiData.bMorale = max(0, this->aiData.bMorale - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1491,7 +1491,7 @@ public:
|
||||
// loose disguise, dress up in our natural state
|
||||
void LooseDisguise( void );
|
||||
|
||||
// take off any clothes item and switch back to original clothes
|
||||
// lose disguise or take off any clothes item and switch back to original clothes
|
||||
void Strip();
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
<ClCompile Include="XML_AttachmentSlots.cpp" />
|
||||
<ClCompile Include="XML_BurstSounds.cpp" />
|
||||
<ClCompile Include="XML_CivGroupNames.cpp" />
|
||||
<ClCompile Include="XML_Clothes.cpp" />
|
||||
<ClCompile Include="XML_ComboMergeInfo.cpp" />
|
||||
<ClCompile Include="XML_CompatibleFaceItems.cpp" />
|
||||
<ClCompile Include="XML_Drugs.cpp" />
|
||||
|
||||
@@ -629,5 +629,8 @@
|
||||
<ClCompile Include="XML_Food.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="XML_Clothes.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user