Some People just don't know when they have to sleep xD

Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
GreYFoXGTi 2010-09-26 17:30:43 +03:00
parent a91d6c0cc1
commit 7ecae53f6c
4 changed files with 9 additions and 8 deletions

View file

@ -53,7 +53,7 @@ MACRO_CONFIG_INT(SvEmoticonDelay, sv_emoticon_delay, 3, 0, 9999, CFGFLAG_SERVER,
MACRO_CONFIG_INT(SvVotes, sv_votes, 1, 0, 1, CFGFLAG_SERVER, "Whether votes are enabled", 3)
MACRO_CONFIG_INT(SvVoteKick, sv_vote_kick, 1, 0, 1, CFGFLAG_SERVER, "Allow voting to kick players", 3)
MACRO_CONFIG_INT(SvVoteKickBantime, sv_vote_kick_bantime, 300, 0, 1000000, CFGFLAG_SERVER, "The time a vote-kicked player will be banned. (0 = take the time from 'kick')", 3)
MACRO_CONFIG_INT(SvVoteKickBanTime, sv_vote_kick_bantime, 300, 0, 1000000, CFGFLAG_SERVER, "The time a vote-kicked player will be banned. (0 = take the time from 'kick')", 3)
MACRO_CONFIG_INT(SvVotePercentage, sv_vote_percentage, 50, 1, 100, CFGFLAG_SERVER, "The percent of people that need to agree or deny for the vote to succeed/fail", 3)
MACRO_CONFIG_INT(SvMaxAfkTime, sv_max_afk_time, 0, 0, 9999, CFGFLAG_SERVER, "The time in seconds a player is allowed to be afk (0 = disabled)", 3)

View file

@ -239,14 +239,14 @@ void CCollision::SetCollisionAt(float x, float y, int flag)
void CCollision::SetDTile(float x, float y, int Team, bool State)
{
if(!m_pDoor || ((Team < 0 || Team > 15) && Team !=99))
if(!m_pDoor || ((Team < 0 || Team > MAX_CLIENTS) && Team !=99))
return;
int nx = clamp(round(x)/32, 0, m_Width-1);
int ny = clamp(round(y)/32, 0, m_Height-1);
if(Team == 99)
{
for (int i = 0; i < 15; ++i)
for (int i = 0; i < MAX_CLIENTS; ++i)
{
m_pDoor[ny * m_Width + nx].m_Team[i] = State;
}
@ -257,7 +257,7 @@ void CCollision::SetDTile(float x, float y, int Team, bool State)
void CCollision::SetDCollisionAt(float x, float y, int Flag, int Team)
{
if(!m_pDoor || ((Team < 0 || Team > 15) && Team !=99))
if(!m_pDoor || ((Team < 0 || Team > MAX_CLIENTS) && Team !=99))
return;
int nx = clamp(round(x)/32, 0, m_Width-1);
int ny = clamp(round(y)/32, 0, m_Height-1);
@ -265,7 +265,7 @@ void CCollision::SetDCollisionAt(float x, float y, int Flag, int Team)
m_pDoor[ny * m_Width + nx].m_Index = Flag;
if(Team == 99)
{
for (int i = 0; i < 15; ++i)
for (int i = 0; i < MAX_CLIENTS; ++i)
{
m_pDoor[ny * m_Width + nx].m_Team[i] = true;
}
@ -276,7 +276,7 @@ void CCollision::SetDCollisionAt(float x, float y, int Flag, int Team)
int CCollision::GetDTileIndex(int Index,int Team)
{
if(!m_pDoor || !m_pDoor[Index].m_Index || ((Team < 0 || Team > 15) && Team !=99))
if(!m_pDoor || !m_pDoor[Index].m_Index || ((Team < 0 || Team > MAX_CLIENTS) && Team !=99))
{
return 0;
}

View file

@ -1,5 +1,6 @@
#ifndef GAME_MAPITEMS_H
#define GAME_MAPITEMS_H
#include<engine\shared\protocol.h>
// layer types
enum
@ -219,7 +220,7 @@ class CDoorTile
{
public:
unsigned char m_Index;
bool m_Team[16];
bool m_Team[MAX_CLIENTS];
};
struct CMapItemGroup_v1

View file

@ -1217,7 +1217,7 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
{
char aBuf[64] = {0};
Server()->GetClientIP(KickId, aBuf, sizeof(aBuf));
str_format(aCmd, sizeof(aCmd), "ban %s %d", aBuf, g_Config.m_SvVoteKickBantime);
str_format(aCmd, sizeof(aCmd), "ban %s %d", aBuf, g_Config.m_SvVoteKickBanTime);
}
m_apPlayers[ClientId]->m_Last_KickVote = time_get();
m_VoteKick = true;