Merge branch 'start-netid-at-1' into 'next'
Avoid CV_FindNetVar returning a normal cvar (closes #251) Closes #251 See merge request STJr/SRB2!1137
This commit is contained in:
commit
9684149ba6
|
@ -1262,12 +1262,12 @@ void CV_RegisterVar(consvar_t *variable)
|
||||||
// check net variables
|
// check net variables
|
||||||
if (variable->flags & CV_NETVAR)
|
if (variable->flags & CV_NETVAR)
|
||||||
{
|
{
|
||||||
variable->netid = consvar_number_of_netids++;
|
|
||||||
|
|
||||||
/* in case of overflow... */
|
/* in case of overflow... */
|
||||||
if (variable->netid > consvar_number_of_netids)
|
if (consvar_number_of_netids + 1 < consvar_number_of_netids)
|
||||||
I_Error("Way too many netvars");
|
I_Error("Way too many netvars");
|
||||||
|
|
||||||
|
variable->netid = ++consvar_number_of_netids;
|
||||||
|
|
||||||
#ifdef OLD22DEMOCOMPAT
|
#ifdef OLD22DEMOCOMPAT
|
||||||
CV_RegisterOldDemoVar(variable);
|
CV_RegisterOldDemoVar(variable);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue