Skip to content

Commit

Permalink
game: Don't start game entity loops at index 1, fix cvars which are
Browse files Browse the repository at this point in the history
changed during registration
  • Loading branch information
zturtleman authored and IR4T4 committed Oct 12, 2017
1 parent 631dc32 commit b5940d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game/g_main.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ void G_FindTeams(void)
int i, j; int i, j;
int c = 0, c2 = 0; int c = 0, c2 = 0;


for (i = 1, e = g_entities + i ; i < level.num_entities ; i++, e++) for (i = MAX_CLIENTS, e = g_entities + i ; i < level.num_entities ; i++, e++)
{ {
if (!e->inuse) if (!e->inuse)
{ {
Expand Down Expand Up @@ -1790,15 +1790,18 @@ void G_RegisterCvars(void)
if (match_readypercent.integer < 1) if (match_readypercent.integer < 1)
{ {
trap_Cvar_Set("match_readypercent", "1"); trap_Cvar_Set("match_readypercent", "1");
trap_Cvar_Update(&match_readypercent);
} }


if (pmove_msec.integer < 8) if (pmove_msec.integer < 8)
{ {
trap_Cvar_Set("pmove_msec", "8"); trap_Cvar_Set("pmove_msec", "8");
trap_Cvar_Update(&pmove_msec);
} }
else if (pmove_msec.integer > 33) else if (pmove_msec.integer > 33)
{ {
trap_Cvar_Set("pmove_msec", "33"); trap_Cvar_Set("pmove_msec", "33");
trap_Cvar_Update(&pmove_msec);
} }
} }


Expand Down

0 comments on commit b5940d9

Please sign in to comment.