ktf cleanup; demo playback fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2628 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -386,7 +386,7 @@ void findplayerstart(playerent *d, bool mapcenter, int arenaspawn)
|
||||
loopi(arenaspawn + 1) x = findentity(PLAYERSTART, x+1, type);
|
||||
if(x >= 0) e = &ents[x];
|
||||
}
|
||||
else if((m_teammode || m_arena) && !(m_ktf || m_tktf)) // ktf uses ffa spawns
|
||||
else if((m_teammode || m_arena) && !m_ktf) // ktf uses ffa spawns
|
||||
{
|
||||
loopi(r) spawncycle = findentity(PLAYERSTART, spawncycle+1, type);
|
||||
if(spawncycle >= 0) e = &ents[spawncycle];
|
||||
@@ -397,7 +397,7 @@ void findplayerstart(playerent *d, bool mapcenter, int arenaspawn)
|
||||
|
||||
loopi(r)
|
||||
{
|
||||
spawncycle = (m_ktf || m_tktf) && numspawn[2] > 5 ? findentity(PLAYERSTART, spawncycle+1, 100) : findentity(PLAYERSTART, spawncycle+1);
|
||||
spawncycle = m_ktf && numspawn[2] > 5 ? findentity(PLAYERSTART, spawncycle+1, 100) : findentity(PLAYERSTART, spawncycle+1);
|
||||
if(spawncycle < 0) continue;
|
||||
float dist = nearestenemy(vec(ents[spawncycle].x, ents[spawncycle].y, ents[spawncycle].z), d->team);
|
||||
if(!e || dist < 0 || (bestdist >= 0 && dist > bestdist)) { e = &ents[spawncycle]; bestdist = dist; }
|
||||
@@ -605,7 +605,7 @@ void preparectf(bool cleanonly=false)
|
||||
f.actor = NULL;
|
||||
f.actor_cn = -1;
|
||||
f.team = i;
|
||||
f.state = m_ktf || m_tktf ? CTFF_IDLE : CTFF_INBASE;
|
||||
f.state = m_ktf ? CTFF_IDLE : CTFF_INBASE;
|
||||
}
|
||||
loopv(ents)
|
||||
{
|
||||
@@ -654,7 +654,7 @@ void startmap(const char *name) // called just after a map load
|
||||
showscores(false);
|
||||
intermission = false;
|
||||
minutesremaining = -1;
|
||||
bool noflags = (m_ctf || m_ktf || m_tktf) && (!numflagspawn[0] || !numflagspawn[1]);
|
||||
bool noflags = (m_ctf || m_ktf) && (!numflagspawn[0] || !numflagspawn[1]);
|
||||
if(*clientmap) conoutf("game mode is \"%s\"%s", modestr(gamemode, modeacronyms > 0), noflags ? " - \f2but there are no flag bases on this map" : "");
|
||||
|
||||
// run once
|
||||
@@ -693,7 +693,7 @@ void flagmsg(int flag, int message, int actor, int flagtime)
|
||||
bool own = flag == team_int(player1->team);
|
||||
bool firstperson = actor == getclientnum();
|
||||
bool teammate = !act ? true : isteam(player1->team, act->team);
|
||||
const char *teamstr = m_ktf || m_tktf ? "the" : own ? "your" : "the enemy";
|
||||
const char *teamstr = m_ktf ? "the" : own ? "your" : "the enemy";
|
||||
|
||||
switch(message)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user