diff --git a/src/game/client/prediction/entities/character.cpp b/src/game/client/prediction/entities/character.cpp index 30614d48f..769866439 100644 --- a/src/game/client/prediction/entities/character.cpp +++ b/src/game/client/prediction/entities/character.cpp @@ -1131,8 +1131,6 @@ CCharacter::CCharacter(CGameWorld *pGameWorld, int ID, CNetObj_Character *pChar, m_Core.Init(&GameWorld()->m_Core, GameWorld()->Collision(), GameWorld()->Teams()); m_Core.m_Id = ID; mem_zero(&m_Core.m_Ninja, sizeof(m_Core.m_Ninja)); - mem_zero(&m_SavedInput, sizeof(m_SavedInput)); - m_LatestInput = m_LatestPrevInput = m_PrevInput = m_Input = m_SavedInput; m_Core.m_LeftWall = true; m_ReloadTimer = 0; m_NumObjectsHit = 0; @@ -1142,6 +1140,7 @@ CCharacter::CCharacter(CGameWorld *pGameWorld, int ID, CNetObj_Character *pChar, m_TeleCheckpoint = 0; m_StrongWeakID = 0; + mem_zero(&m_Input, sizeof(m_Input)); // never initialize both to zero m_Input.m_TargetX = 0; m_Input.m_TargetY = -1; diff --git a/src/game/client/ui.cpp b/src/game/client/ui.cpp index 5e2348ada..356eb1f84 100644 --- a/src/game/client/ui.cpp +++ b/src/game/client/ui.cpp @@ -451,9 +451,8 @@ float CUI::DoTextLabel(float x, float y, float w, float h, const char *pText, fl { float AlignedSize = 0; float MaxCharacterHeightInLine = 0; - float tw = std::numeric_limits::max(); float MaxTextWidth = LabelProps.m_MaxWidth != -1 ? LabelProps.m_MaxWidth : w; - tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); + float tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); while(tw > MaxTextWidth + 0.001f) { if(!LabelProps.m_EnableWidthCheck) @@ -524,9 +523,8 @@ void CUI::DoLabel(CUIElement::SUIElementRect &RectEl, const CUIRect *pRect, cons { float AlignedSize = 0; float MaxCharacterHeightInLine = 0; - float tw = std::numeric_limits::max(); float MaxTextWidth = LabelProps.m_MaxWidth != -1 ? LabelProps.m_MaxWidth : pRect->w; - tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); + float tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); while(tw > MaxTextWidth + 0.001f) { if(!LabelProps.m_EnableWidthCheck) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 0f8b55b62..cf4cbc56f 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -6105,8 +6105,6 @@ void CEditor::Reset(bool CreateDefault) m_ShowEnvelopePreview = SHOWENV_NONE; m_ShiftBy = 1; - - m_Map.m_Modified = false; } int CEditor::GetLineDistance() const