Skip to content

Commit 1ece5af

Browse files
committed
goto spectator considered less harmful
1 parent cfe6251 commit 1ece5af

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

source/src/server.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,18 +2113,12 @@ bool updateclientteam(int cln, int newteam, int ftr)
21132113
if (team_isspect(newteam)) {
21142114
cl.state.state = CS_SPECTATE;
21152115
cl.state.lastdeath = sg->gamemillis;
2116-
if(!m_coop) // punishment – compare suicide code in serverdamage()
2116+
if(m_flags_ && clienthasflag(cl.clientnum) >= 0) // switching to spectate while holding the flag punishment
21172117
{
2118-
mlog(ACLOG_INFO, "[%s] %s switched to specators during a match.", cl.hostname, cl.name);
2119-
cl.state.frags--;
2120-
cl.state.teamkills++;
2121-
cl.incrementvitacounter(VS_TKS, 1);
2122-
sendf(-1, 1, "ri5", SV_DIED, -1, cl.clientnum, cl.state.frags, -1); // victim:-1 => no dokill() on client side, gun is irrelevant too
2123-
if( (m_htf || m_ktf) && clienthasflag(cl.clientnum) >= 0 )
2124-
{
2118+
cl.state.antiflags++;
2119+
cl.incrementvitacounter(VS_ANTIFLAGS, 1);
2120+
if(m_htf || m_ktf){
21252121
cl.state.flagscore--;
2126-
cl.state.antiflags++;
2127-
cl.incrementvitacounter(VS_ANTIFLAGS, 1);
21282122
sendf(-1, 1, "riii", SV_FLAGCNT, cl.clientnum, cl.state.flagscore);
21292123
}
21302124
}

0 commit comments

Comments
 (0)