Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.

Commit

Permalink
added field REGENRESPAWNTIME to set the respan time for regen capture…
Browse files Browse the repository at this point in the history
… mode
  • Loading branch information
super-tux authored and Croydon committed Feb 26, 2018
1 parent 6f3560c commit 00441fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions inexor/client/gamemode/capture_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ struct captureclientmode : clientmode, capturemode_common

int respawnwait(fpsent *d) override
{
if(m_regencapture) return -1;
return max(0, RESPAWNSECS-(lastmillis-d->lastpain)/1000);
// if(m_regencapture) return -1;
return max(0, (m_regencapture ? REGENRESPAWNSECS : RESPAWNSECS)-(lastmillis-d->lastpain)/1000);
}

int clipconsole(int w, int h) override
Expand Down
1 change: 1 addition & 0 deletions inexor/gamemode/capture_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ struct capturemode_common
static const int MAXAMMO = 5;
static const int REPAMMODIST = 32;
static const int RESPAWNSECS = 10;
static const int REGENRESPAWNSECS = 0;
static const int MAXBASES = 100;

struct baseinfo
Expand Down
2 changes: 1 addition & 1 deletion inexor/server/gamemode/capture_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct captureservermode : servmode, capturemode_common

bool canspawn(clientinfo *ci, bool connecting) override
{
return m_regencapture || connecting || !ci->state.lastdeath || gamemillis+curtime-ci->state.lastdeath >= RESPAWNSECS*1000;
return connecting || !ci->state.lastdeath || gamemillis+curtime-ci->state.lastdeath >= (m_regencapture ? REGENRESPAWNSECS : RESPAWNSECS)*1000;
}

void moved(clientinfo *ci, const vec &oldpos, bool oldclip, const vec &newpos, bool newclip) override
Expand Down

0 comments on commit 00441fc

Please sign in to comment.