demo playback fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1155 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -514,6 +514,9 @@ void preparectf(bool cleanonly=false)
|
||||
e.spawned = true;
|
||||
if(e.attr2>2) { conoutf("\f3invalid ctf-flag entity (%i)", i); e.attr2 = 0; }
|
||||
flaginfo &f = flaginfos[e.attr2];
|
||||
f.ack = false;
|
||||
f.actor = NULL;
|
||||
f.actor_cn = -1;
|
||||
f.team = e.attr2;
|
||||
f.flag = &e;
|
||||
f.state = CTFF_INBASE;
|
||||
|
||||
@@ -137,7 +137,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
|
||||
}
|
||||
|
||||
case SV_SOUND:
|
||||
playsound(getint(p), !d || localdemoplayer1st() ? NULL : &d->o);
|
||||
playsound(getint(p), !d || (localdemoplayer1st() && cn==democlientnum) ? NULL : &d->o);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ void text_endcolumns()
|
||||
|
||||
int text_width(const char *str, int limit)
|
||||
{
|
||||
if(!str) return 0;
|
||||
int x = 0, col = 0;
|
||||
for(int i = 0; str[i] && (limit<0 || i<limit); i++)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,6 @@ void renderscore(void *menu, playerent *d, int cn)
|
||||
if(m_ctf) s_sprintf(s)("%d\t%d\t%d\t%s\t%d\t%s\t%s%s\t%d", d->flagscore, d->frags, d->lifesequence, d->state==CS_LAGGED ? "LAG" : lag, d->ping, d->team, status, colorname(d), cn);
|
||||
else if(m_teammode) s_sprintf(s)("%d\t%d\t%s\t%d\t%s\t%s%s\t%d", d->frags, d->lifesequence, d->state==CS_LAGGED ? "LAG" : lag, d->ping, m_teammode ? d->team : "", status, colorname(d), cn);
|
||||
else s_sprintf(s)("%d\t%d\t%s\t%d\t%s%s\t%d", d->frags, d->lifesequence, d->state==CS_LAGGED ? "LAG" : lag, d->ping, status, colorname(d), cn);
|
||||
menumanual(menu, scorelines.length()-1, s);
|
||||
}
|
||||
|
||||
static int scorecmp(const playerent **x, const playerent **y)
|
||||
@@ -100,7 +99,7 @@ void renderscores(void *menu, bool init)
|
||||
else s_sprintf(s)("[ %s: %d ]", teamscores[i].team, teamscores[i].score);
|
||||
s_strcat(teamline, s);
|
||||
}
|
||||
menumanual(menu, scorelines.length(), teamline);
|
||||
}
|
||||
loopv(scorelines) menumanual(menu, i, scorelines[i].s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user