mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
sv_reset_pickups 1 to remove weapons on start tiles
This commit is contained in:
parent
6e3818c779
commit
cd998a2a93
|
@ -208,6 +208,7 @@ MACRO_CONFIG_INT(ClDDRaceScoreBoard, cl_ddrace_scoreboard, 1, 0, 1, CFGFLAG_SAVE
|
|||
MACRO_CONFIG_INT(SvChatPenalty, sv_chat_penalty, 250, 50, 1000, CFGFLAG_SERVER, "chatscore will be increased by this on every message, and decremented by 1 on every tick.", 3)
|
||||
MACRO_CONFIG_INT(SvChatThreshold, sv_chat_threshold, 1000, 50, 10000 , CFGFLAG_SERVER, "if chatscore exceeds this, the player will be muted for sv_spam_mute_duration seconds", 3)
|
||||
MACRO_CONFIG_INT(SvSpamMuteDuration, sv_spam_mute_duration, 60, 0, 3600 , CFGFLAG_SERVER, "how many seconds to mute, if player triggers mute on spam. 0 = off", 3)
|
||||
MACRO_CONFIG_INT(SvResetPickus, sv_reset_pickups, 0, 0, 1, CFGFLAG_SERVER, "Whether the weapons are reset on passing the start tile or not", 4)
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1344,6 +1344,15 @@ void CCharacter::HandleTiles(int Index)
|
|||
if(((m_TileIndex == TILE_BEGIN) || (m_TileFIndex == TILE_BEGIN) || FTile1 == TILE_BEGIN || FTile2 == TILE_BEGIN || FTile3 == TILE_BEGIN || FTile4 == TILE_BEGIN || Tile1 == TILE_BEGIN || Tile2 == TILE_BEGIN || Tile3 == TILE_BEGIN || Tile4 == TILE_BEGIN) && (m_DDRaceState == DDRACE_NONE || m_DDRaceState == DDRACE_FINISHED || (m_DDRaceState == DDRACE_STARTED && !Team())))
|
||||
{
|
||||
bool CanBegin = true;
|
||||
if(g_Config.m_SvResetPickus)
|
||||
{
|
||||
for (int i = WEAPON_SHOTGUN; i < NUM_WEAPONS; ++i)
|
||||
{
|
||||
m_aWeapons[i].m_Got = false;
|
||||
if(m_ActiveWeapon == i)
|
||||
m_ActiveWeapon = WEAPON_GUN;
|
||||
}
|
||||
}
|
||||
if(g_Config.m_SvTeam == 2 && (Team() == TEAM_FLOCK || Teams()->Count(Team()) <= 1))
|
||||
{
|
||||
if(m_LastStartWarning < Server()->Tick() - 3 * Server()->TickSpeed())
|
||||
|
|
Loading…
Reference in a new issue