Skip to content

Commit

Permalink
fixed editmode invincibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandru Stan committed Jul 21, 2010
1 parent 1dad551 commit e3c5621
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fpsgame/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ namespace server

bool pickup(int i, int sender) // server side item pickup, acknowledge first client that gets it
{
if(gamemillis>=gamelimit || !sents.inrange(i) || !sents[i].spawned) return false;
if((m_timed && gamemillis>=gamelimit) || !sents.inrange(i) || !sents[i].spawned) return false;
clientinfo *ci = getinfo(sender);
if(!ci || (!ci->local && !ci->state.canpickup(sents[i].type))) return false;
sents[i].spawned = false;
Expand Down Expand Up @@ -908,7 +908,7 @@ namespace server

int welcomepacket(packetbuf &p, clientinfo *ci)
{
int hasmap = (m_edit && (clients.length()>1 || (ci && ci->local))) || (smapname[0] && (gamemillis<gamelimit || (ci && ci->state.state==CS_SPECTATOR && !ci->privilege && !ci->local) || numclients(ci ? ci->clientnum : -1, true, true, true)));
int hasmap = (m_edit && (clients.length()>1 || (ci && ci->local))) || (smapname[0] && (!m_timed || gamemillis<gamelimit || (ci && ci->state.state==CS_SPECTATOR && !ci->privilege && !ci->local) || numclients(ci ? ci->clientnum : -1, true, true, true)));
putint(p, N_WELCOME);
putint(p, hasmap);
if(hasmap)
Expand Down Expand Up @@ -1351,7 +1351,7 @@ namespace server
if(!gamepaused) gamemillis += curtime;

if(m_demo) readdemo();
else if(!gamepaused && gamemillis < gamelimit)
else if(!gamepaused && (!m_timed || gamemillis < gamelimit))
{
processevents();
if(curtime)
Expand Down

0 comments on commit e3c5621

Please sign in to comment.