mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Missed a few.
This commit is contained in:
parent
4de210d435
commit
cce11beec6
2 changed files with 5 additions and 5 deletions
|
@ -598,7 +598,7 @@ static void DistributeHints(std::vector<uint8_t>& selected, size_t stoneCount,
|
|||
}
|
||||
// if stones are left, assign junk to every remaining stone as a fallback.
|
||||
if (stoneCount > 0) {
|
||||
selected[static_cast<uint8_t>(selected.size()) - 1] += stoneCount;
|
||||
selected[static_cast<uint8_t>(selected.size()) - 1] += static_cast<uint8_t>(stoneCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1892,16 +1892,16 @@ static std::set<std::string> rainbowCVars = {
|
|||
|
||||
int hue = 0;
|
||||
void RainbowTick() {
|
||||
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f));
|
||||
float freqHue = hue * 2 * static_cast<float>(M_PI) / (360 * CVarGetFloat(CVAR_COSMETIC("RainbowSpeed"), 0.6f));
|
||||
for (auto& cvar : rainbowCVars) {
|
||||
if (CVarGetInteger((cvar + ".Rainbow").c_str(), 0) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Color_RGBA8 newColor;
|
||||
newColor.r = sin(freqHue + 0) * 127 + 128;
|
||||
newColor.g = sin(freqHue + (2 * M_PI / 3)) * 127 + 128;
|
||||
newColor.b = sin(freqHue + (4 * M_PI / 3)) * 127 + 128;
|
||||
newColor.r = static_cast<uint8_t>(sin(freqHue + 0) * 127) + 128;
|
||||
newColor.g = static_cast<uint8_t>(sin(freqHue + (2 * M_PI / 3)) * 127) + 128;
|
||||
newColor.b = static_cast<uint8_t>(sin(freqHue + (4 * M_PI / 3)) * 127) + 128;
|
||||
newColor.a = 255;
|
||||
|
||||
CVarSetColor((cvar + ".Value").c_str(), newColor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue