forked from Mirrors/openclonk
Fix player color alpha after /plrclr change command (#254)
parent
23e1713990
commit
4ee3f9d011
|
@ -807,6 +807,12 @@ void C4PlayerInfoList::UpdatePlayerAttributes(C4ClientPlayerInfos *pForInfo, boo
|
||||||
pInfo->SetColor(dwForceClr);
|
pInfo->SetColor(dwForceClr);
|
||||||
pForInfo->SetUpdated();
|
pForInfo->SetUpdated();
|
||||||
}
|
}
|
||||||
|
// make sure colors have correct alpha (modified engines might send malformed packages of transparent colors)
|
||||||
|
if ((pInfo->GetColor() & 0xff000000u) != 0xff000000u)
|
||||||
|
{
|
||||||
|
pInfo->SetColor(pInfo->GetColor() | 0xff000000u);
|
||||||
|
pForInfo->SetUpdated();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (fResolveConflicts) ResolvePlayerAttributeConflicts(pForInfo);
|
if (fResolveConflicts) ResolvePlayerAttributeConflicts(pForInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -540,7 +540,7 @@ namespace C4GameLobby
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// color validation
|
// color validation
|
||||||
dwNewClr &= 0xffffff;
|
dwNewClr |= 0xff000000;
|
||||||
if (!dwNewClr) ++dwNewClr;
|
if (!dwNewClr) ++dwNewClr;
|
||||||
// request a color change to this color
|
// request a color change to this color
|
||||||
C4ClientPlayerInfos LocalInfoRequest = *pCltNfo;
|
C4ClientPlayerInfos LocalInfoRequest = *pCltNfo;
|
||||||
|
|
Loading…
Reference in New Issue