mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Bugfixes (by Flugente)
- fixed a bug that prevented zombies from rising in turnbased mode - fixed a bug that prevented weapons on the floor from cooling down in turnbased mode - fixed a bug that caused gun traps with buckshot ammo to deduct to much ammo - fixed a bug that could crash the game when firing a lot of gun traps at the same time git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5346 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -341,7 +341,6 @@ SOLDIERCREATE_STRUCT::SOLDIERCREATE_STRUCT() {
|
||||
SOLDIERCREATE_STRUCT::SOLDIERCREATE_STRUCT(const SOLDIERCREATE_STRUCT& src) {
|
||||
memcpy(this, &src, SIZEOF_SOLDIERCREATE_STRUCT_POD);
|
||||
this->Inv = src.Inv;
|
||||
this->fNoGenNewPalette = src.fNoGenNewPalette;
|
||||
}
|
||||
|
||||
// Assignment operator
|
||||
@@ -350,7 +349,6 @@ SOLDIERCREATE_STRUCT& SOLDIERCREATE_STRUCT::operator=(const SOLDIERCREATE_STRUCT
|
||||
if (this != &src) {
|
||||
memcpy(this, &src, SIZEOF_SOLDIERCREATE_STRUCT_POD);
|
||||
this->Inv = src.Inv;
|
||||
this->fNoGenNewPalette = src.fNoGenNewPalette;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@@ -1360,6 +1358,10 @@ void GeneratePaletteForSoldier( SOLDIERTYPE *pSoldier, UINT8 ubSoldierClass )
|
||||
BOOLEAN fMercClothingScheme;
|
||||
hair = -1;
|
||||
|
||||
// Flugente: if all palettes are already set, no need to rebuild them. This allows zombies to use a corpses palettes
|
||||
if( pSoldier->PantsPal[0] && pSoldier->VestPal[0] && pSoldier->SkinPal[0] && pSoldier->HeadPal[0] )
|
||||
return;
|
||||
|
||||
//choose random skin tone which will limit the choice of hair colors.
|
||||
skin = (INT8)Random( NUMSKINS );
|
||||
switch( skin )
|
||||
@@ -1739,8 +1741,7 @@ BOOLEAN TacticalCopySoldierFromCreateStruct( SOLDIERTYPE *pSoldier, SOLDIERCREAT
|
||||
}
|
||||
|
||||
//Generate colors for soldier based on the body type.
|
||||
if ( !pCreateStruct->fNoGenNewPalette )
|
||||
GeneratePaletteForSoldier( pSoldier, pCreateStruct->ubSoldierClass );
|
||||
GeneratePaletteForSoldier( pSoldier, pCreateStruct->ubSoldierClass );
|
||||
|
||||
// Copy item info over
|
||||
pSoldier->inv = pCreateStruct->Inv;
|
||||
|
||||
Reference in New Issue
Block a user