diff options
| author | oy <Tom_Adams@web.de> | 2011-04-04 16:58:53 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-04 16:58:53 +0200 |
| commit | 0046825953ce635e2044a16ad046ee01660c1ec7 (patch) | |
| tree | fccc6f4bcb39a296d045f48dc65cbee0d3cd2dcc /src/game/server | |
| parent | 9cb2f07b80d8fb2b612d10766384a880e74d4413 (diff) | |
| download | zcatch-0046825953ce635e2044a16ad046ee01660c1ec7.tar.gz zcatch-0046825953ce635e2044a16ad046ee01660c1ec7.zip | |
fixed server crash on remove vote
Diffstat (limited to 'src/game/server')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index a57cb00f..8958833c 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1139,6 +1139,11 @@ void CGameContext::ConRemoveVote(IConsole::IResult *pResult, void *pUserData) pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", aBuf); return; } + + // inform clients about removed option + CNetMsg_Sv_VoteOptionRemove OptionMsg; + OptionMsg.m_pDescription = pOption->m_aDescription; + pSelf->Server()->SendPackMsg(&OptionMsg, MSGFLAG_VITAL, -1); // TODO: improve this // remove the option @@ -1177,11 +1182,6 @@ void CGameContext::ConRemoveVote(IConsole::IResult *pResult, void *pUserData) pSelf->m_pVoteOptionFirst = pVoteOptionFirst; pSelf->m_pVoteOptionLast = pVoteOptionLast; pSelf->m_NumVoteOptions = NumVoteOptions; - - // inform clients about removed option - CNetMsg_Sv_VoteOptionRemove OptionMsg; - OptionMsg.m_pDescription = pOption->m_aDescription; - pSelf->Server()->SendPackMsg(&OptionMsg, MSGFLAG_VITAL, -1); } void CGameContext::ConForceVote(IConsole::IResult *pResult, void *pUserData) |