Revert "Client won't vote on comments by Sushi Tee" caused crashes

This reverts commit ed7a1d5bcd.
This commit is contained in:
GreYFoXGTi 2010-12-06 03:32:44 +02:00
parent 881fd901a6
commit 45fa3d49b5
2 changed files with 2 additions and 13 deletions

View file

@ -129,7 +129,7 @@ int CMenus::DoButton_Icon(int ImageId, int SpriteId, const CUIRect *pRect)
int CMenus::DoButton_Menu(const void *pID, const char *pText, int Checked, const CUIRect *pRect)
{
RenderTools()->DrawUIRect(pRect, (Checked<0)?vec4(0,0,0,0.5f):vec4(1,1,1,0.5f)*ButtonColorMul(pID), CUI::CORNER_ALL, 5.0f);
RenderTools()->DrawUIRect(pRect, vec4(1,1,1,0.5f)*ButtonColorMul(pID), CUI::CORNER_ALL, 5.0f);
UI()->DoLabel(pRect, pText, pRect->h*ms_FontmodHeight, 0);
return UI()->DoButtonLogic(pID, pText, Checked, pRect);
}

View file

@ -400,19 +400,8 @@ void CMenus::RenderServerControl(CUIRect MainView)
CUIRect Button;
Bottom.VSplitRight(120.0f, &Bottom, &Button);
int Vote = m_CallvoteSelectedOption;
CVoting::CVoteOption *pOption = m_pClient->m_pVoting->m_pFirst;
while(pOption && Vote >= 0)
{
if(!Vote)
break;
Vote--;
pOption = pOption->m_pNext;
}
static int s_CallVoteButton = 0;
if(DoButton_Menu(&s_CallVoteButton, Localize("Call vote"), (pOption->m_aCommand[0] < 97 || pOption->m_aCommand[0] > 122)?-1:0, &Button))
if(DoButton_Menu(&s_CallVoteButton, Localize("Call vote"), 0, &Button))
{
if(s_ControlPage == 0)
{