forked from Mirrors/openclonk
Default all unowned ColorByOwner objects to blue (#486)
parent
a70b36b0b5
commit
59594a9ef2
|
@ -286,6 +286,8 @@ bool C4Object::Init(C4PropList *pDef, C4Object *pCreator,
|
|||
if (Def->ColorByOwner)
|
||||
if (ValidPlr(Owner))
|
||||
Color=::Players.Get(Owner)->ColorDw;
|
||||
else
|
||||
Color=0xff; // no-owner color: blue
|
||||
|
||||
// Shape & face
|
||||
Shape=Def->Shape;
|
||||
|
|
|
@ -166,7 +166,7 @@ public:
|
|||
IDirect3DSurface9 *GetSurface(); // get internal surface
|
||||
#endif
|
||||
bool GetSurfaceSize(int &irX, int &irY); // get surface size
|
||||
void SetClr(DWORD toClr) { ClrByOwnerClr=toClr?toClr:0xff; }
|
||||
void SetClr(DWORD toClr) { ClrByOwnerClr=toClr; }
|
||||
DWORD GetClr() { return ClrByOwnerClr; }
|
||||
bool CopyBytes(BYTE *pImageData); // assumes an array of wdt*hgt*bitdepth/8 and copies data directly from it
|
||||
protected:
|
||||
|
|
Loading…
Reference in New Issue