Fixed a bug were nonremappable buildings were getting team colors assigned.

This commit is contained in:
Justin Marshall
2020-08-05 13:36:11 -07:00
parent dcd40b2018
commit d983592f2e
3 changed files with 9 additions and 4 deletions
+5
View File
@@ -4842,6 +4842,11 @@ void const * BuildingClass::Remap_Table(void)
{ {
assert(Buildings.ID(this) == ID); assert(Buildings.ID(this) == ID);
assert(IsActive); assert(IsActive);
// jmarshall
if(!Class->IsRemappable) {
return NULL;
}
// jmarshall end
return(House->Remap_Table(IsBlushing, Class->Remap)); return(House->Remap_Table(IsBlushing, Class->Remap));
} }
+3 -3
View File
@@ -3684,9 +3684,9 @@ void CC_Draw_Shape(void const * shapefile, int shapenum, int x, int y, WindowNum
if ((flags & SHAPE_GHOST) && (!ghostdata)) { if ((flags & SHAPE_GHOST) && (!ghostdata)) {
ghostdata = DisplayClass::SpecialGhost; ghostdata = DisplayClass::SpecialGhost;
} }
if ((flags & SHAPE_FADING) && (!fadingdata)) { //if ((flags & SHAPE_FADING) && (!fadingdata)) {
fadingdata = DisplayClass::FadingShade; // fadingdata = DisplayClass::FadingShade;
} //}
static unsigned char * _xbuffer = 0; static unsigned char * _xbuffer = 0;
+1 -1
View File
@@ -4683,7 +4683,7 @@ void const * TechnoClass::Remap_Table(void) const
if (Techno_Type_Class()->IsRemappable) { if (Techno_Type_Class()->IsRemappable) {
return(House->Remap_Table(IsBlushing, Techno_Type_Class()->Remap)); return(House->Remap_Table(IsBlushing, Techno_Type_Class()->Remap));
} }
return(ColorRemaps[PCOLOR_GOLD].RemapTable); return NULL;
} }