From fbeace52723509604e390f0a20e9f922aa26d1d6 Mon Sep 17 00:00:00 2001 From: oy Date: Sat, 26 Mar 2011 17:44:34 +0100 Subject: cleaned up some voting code --- src/game/server/gamecontext.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/game/server/gamecontext.h') diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h index bd8140c3..399e0058 100644 --- a/src/game/server/gamecontext.h +++ b/src/game/server/gamecontext.h @@ -8,6 +8,7 @@ #include #include +#include #include "eventhandler.h" #include "gamecontroller.h" @@ -95,9 +96,9 @@ public: int64 m_VoteCloseTime; bool m_VoteUpdate; int m_VotePos; - char m_aVoteDescription[64]; - char m_aVoteCommand[512]; - char m_aVoteReason[16]; + char m_aVoteDescription[VOTE_DESC_LENGTH]; + char m_aVoteCommand[VOTE_CMD_LENGTH]; + char m_aVoteReason[VOTE_REASON_LENGTH]; int m_VoteEnforce; enum { @@ -105,16 +106,9 @@ public: VOTE_ENFORCE_NO, VOTE_ENFORCE_YES, }; - struct CVoteOption - { - CVoteOption *m_pNext; - CVoteOption *m_pPrev; - char m_aDescription[64]; - char m_aCommand[1]; - }; CHeap *m_pVoteOptionHeap; - CVoteOption *m_pVoteOptionFirst; - CVoteOption *m_pVoteOptionLast; + CVoteOptionServer *m_pVoteOptionFirst; + CVoteOptionServer *m_pVoteOptionLast; // helper functions void CreateDamageInd(vec2 Pos, float AngleMod, int Amount); -- cgit 1.4.1