Skip to content

Commit

Permalink
ddnet merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 committed Oct 7, 2024
1 parent 41f0050 commit 3c64916
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 37 deletions.
16 changes: 8 additions & 8 deletions src/game/client/components/menus_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3692,8 +3692,8 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)
OwnSkinInfo.m_CustomColoredSkin = *pUseCustomColor;
if(*pUseCustomColor)
{
OwnSkinInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(*pColorBody).UnclampLighting());
OwnSkinInfo.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(*pColorFeet).UnclampLighting());
OwnSkinInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(*pColorBody).UnclampLighting(ColorHSLA::DARKEST_LGT));
OwnSkinInfo.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(*pColorFeet).UnclampLighting(ColorHSLA::DARKEST_LGT));
}
else
{
Expand Down Expand Up @@ -3772,8 +3772,8 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)
}
if(*pUseCustomColor && doColors && LoadProfile.BodyColor != -1 && LoadProfile.FeetColor != -1)
{
OwnSkinInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(LoadProfile.BodyColor).UnclampLighting());
OwnSkinInfo.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(LoadProfile.FeetColor).UnclampLighting());
OwnSkinInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(LoadProfile.BodyColor).UnclampLighting(ColorHSLA::DARKEST_LGT));
OwnSkinInfo.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(LoadProfile.FeetColor).UnclampLighting(ColorHSLA::DARKEST_LGT));
}

RenderTools()->GetRenderTeeOffsetToRenderedTee(pIdleState, &OwnSkinInfo, OffsetToMid);
Expand Down Expand Up @@ -3984,8 +3984,8 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)
if(Item.m_Visible)
{
CTeeRenderInfo Info;
Info.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.BodyColor).UnclampLighting());
Info.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.FeetColor).UnclampLighting());
Info.m_ColorBody = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.BodyColor).UnclampLighting(ColorHSLA::DARKEST_LGT));
Info.m_ColorFeet = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.FeetColor).UnclampLighting(ColorHSLA::DARKEST_LGT));
Info.m_CustomColoredSkin = 1;
Info.m_OriginalRenderSkin = pSkinToBeDraw->m_OriginalSkin;
Info.m_ColorableRenderSkin = pSkinToBeDraw->m_ColorableSkin;
Expand Down Expand Up @@ -4026,8 +4026,8 @@ void CMenus::RenderSettingsProfiles(CUIRect MainView)

if(CurrentProfile.BodyColor != -1 && CurrentProfile.FeetColor != -1)
{
ColorRGBA BodyColor = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.BodyColor).UnclampLighting());
ColorRGBA FeetColor = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.FeetColor).UnclampLighting());
ColorRGBA BodyColor = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.BodyColor).UnclampLighting(ColorHSLA::DARKEST_LGT));
ColorRGBA FeetColor = color_cast<ColorRGBA>(ColorHSLA(CurrentProfile.FeetColor).UnclampLighting(ColorHSLA::DARKEST_LGT));

Graphics()->TextureClear();
Graphics()->QuadsBegin();
Expand Down
28 changes: 0 additions & 28 deletions src/game/client/gameclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2084,34 +2084,6 @@ void CGameClient::OnNewSnapshot()
m_Effects.AirJump(Pos, Alpha);
}
}
if(g_Config.m_ClFreezeStars)
{
for(int i = 0; i < MAX_CLIENTS; i++)
{
if(m_Snap.m_aCharacters[i].m_Active && m_Snap.m_aCharacters[i].m_HasExtendedData && m_Snap.m_aCharacters[i].m_PrevExtendedData)
{
int FreezeTimeNow = m_Snap.m_aCharacters[i].m_ExtendedData.m_FreezeEnd - Client()->GameTick(g_Config.m_ClDummy);
int FreezeTimePrev = m_Snap.m_aCharacters[i].m_PrevExtendedData->m_FreezeEnd - Client()->PrevGameTick(g_Config.m_ClDummy);
vec2 Pos = vec2(m_Snap.m_aCharacters[i].m_Cur.m_X, m_Snap.m_aCharacters[i].m_Cur.m_Y);
int StarsNow = (FreezeTimeNow + 1) / Client()->GameTickSpeed();
int StarsPrev = (FreezeTimePrev + 1) / Client()->GameTickSpeed();
if(StarsNow < StarsPrev || (StarsPrev == 0 && StarsNow > 0))
{
int Amount = StarsNow + 1;
float a = 3 * pi / 2;
float s = a - pi / 3;
float e = a + pi / 3;
for(int j = 0; j < Amount; j++)
{
float f = mix(s, e, (j + 1) / (float)(Amount + 2));
vec2 Dir = vec2(cos(f), sin(f));
m_Effects.DamageIndicator(Pos, Dir);
}
}
}
}
}

if(g_Config.m_ClFreezeStars && !m_SuppressEvents)
{
for(auto &Character : m_Snap.m_aCharacters)
Expand Down
2 changes: 1 addition & 1 deletion src/game/tater_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ MACRO_CONFIG_INT(ClColorFreezeFeet, tc_color_freeze_feet, 0, 0, 1, CFGFLAG_CLIEN

//Revert Variables
MACRO_CONFIG_INT(ClSmoothPredictionMargin, tc_prediction_margin_smooth, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Makes prediction margin transition smooth, causes worse ping jitter adjustment (reverts a ddnet change)")
MACRO_CONFIG_INT(ClFreezeStars, tc_freeze_stars, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show old freeze stars")
// MACRO_CONFIG_INT(ClFreezeStars, tc_freeze_stars, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show old freeze stars")
MACRO_CONFIG_INT(ClOldMouseZoom, tc_old_mouse_zoom, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Does not zoom mouse based on camera to prevent precision loss at low zoom levels")


Expand Down

0 comments on commit 3c64916

Please sign in to comment.