Permalink
Browse files

game: Don't start game entity loops at index 1, fix cvars which are

changed during registration
  • Loading branch information...
zturtleman authored and IR4T4 committed Oct 12, 2017
1 parent 631dc32 commit b5940d94b53d956486223780772883fefe7f6dd9
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/game/g_main.c
View
@@ -1675,7 +1675,7 @@ void G_FindTeams(void)
int i, j;
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)
{
@@ -1790,15 +1790,18 @@ void G_RegisterCvars(void)
if (match_readypercent.integer < 1)
{
trap_Cvar_Set("match_readypercent", "1");
trap_Cvar_Update(&match_readypercent);
}
if (pmove_msec.integer < 8)
{
trap_Cvar_Set("pmove_msec", "8");
trap_Cvar_Update(&pmove_msec);
}
else if (pmove_msec.integer > 33)
{
trap_Cvar_Set("pmove_msec", "33");
trap_Cvar_Update(&pmove_msec);
}
}

0 comments on commit b5940d9

Please sign in to comment.