#108 merged 'Pause' PR - work in progress

This commit is contained in:
drian
2021-04-14 09:19:22 +02:00
parent 3546e7bcb5
commit 7d0e84fe95
12 changed files with 114 additions and 22 deletions
+12
View File
@@ -8,6 +8,7 @@ VARP(networkdebug, 0, 0, 1);
extern bool watchingdemo;
extern string clientpassword;
extern int ispaused;
void *downloaddemomenu = NULL;
static vector<mline> demo_mlines;
@@ -1135,6 +1136,13 @@ void parsemessages(int cn, playerent *d, ucharbuf &p, bool demo = false)
break;
}
case SV_PAUSEMODE:
{
ispaused = getint(p);
if (player1->state == CS_ALIVE) player1->attacking = false;
break;
}
case SV_CALLVOTE:
{
int type = getint(p);
@@ -1189,6 +1197,10 @@ void parsemessages(int cn, playerent *d, ucharbuf &p, bool demo = false)
itoa(a2, getint(p));
v = newvotedisplayinfo(d, type, a1, a2);
break;
case SA_PAUSE:
itoa(a1, getint(p));
v = newvotedisplayinfo(d, type, a1, NULL);
break;
default:
itoa(a1, getint(p));
v = newvotedisplayinfo(d, type, a1, NULL);