mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
game: disable ctf menu if game != ctf
This commit is contained in:
parent
d27fc1f333
commit
977dbc34e6
2 changed files with 3307 additions and 3285 deletions
File diff suppressed because it is too large
Load diff
|
@ -377,7 +377,7 @@ CTFSpawn(void)
|
|||
void
|
||||
CTFInit(void)
|
||||
{
|
||||
ctf = gi.cvar("ctf", "1", CVAR_SERVERINFO);
|
||||
ctf = gi.cvar("ctf", "0", CVAR_SERVERINFO);
|
||||
ctf_forcejoin = gi.cvar("ctf_forcejoin", "", 0);
|
||||
competition = gi.cvar("competition", "0", CVAR_SERVERINFO);
|
||||
matchlock = gi.cvar("matchlock", "1", CVAR_SERVERINFO);
|
||||
|
@ -1215,6 +1215,11 @@ CTFEffects(edict_t *player)
|
|||
{
|
||||
player->s.effects &= ~(EF_FLAG1 | EF_FLAG2);
|
||||
|
||||
if (!flag1_item || !flag2_item)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->health > 0)
|
||||
{
|
||||
if (player->client->pers.inventory[ITEM_INDEX(flag1_item)])
|
||||
|
@ -4236,6 +4241,11 @@ CTFCredits(edict_t *ent, pmenuhnd_t *p)
|
|||
qboolean
|
||||
CTFStartClient(edict_t *ent)
|
||||
{
|
||||
if (!ctf->value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ent->client->resp.ctf_team != CTF_NOTEAM)
|
||||
{
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue