Fix R_GetEntityToken ending prematurely

If spawn var key or value is "" it caused R_GetEntityToken (available to
cgame, used by opengl2) to stop parsing, whereas game VM would continue.

Changed it to match parsing used for game VM
(see G_GET_ENTITY_TOKEN in code/server/sv_game.c).

The map poq3dm5 has a "wait" key with value "".
This commit is contained in:
Zack Middleton 2014-03-10 16:19:02 -05:00
parent 5a3e10d716
commit c8c7bb1dc3
2 changed files with 2 additions and 2 deletions

View file

@ -1776,7 +1776,7 @@ qboolean R_GetEntityToken( char *buffer, int size ) {
s = COM_Parse( &s_worldData.entityParsePoint );
Q_strncpyz( buffer, s, size );
if ( !s_worldData.entityParsePoint || !s[0] ) {
if ( !s_worldData.entityParsePoint && !s[0] ) {
s_worldData.entityParsePoint = s_worldData.entityString;
return qfalse;
} else {

View file

@ -2722,7 +2722,7 @@ qboolean R_GetEntityToken( char *buffer, int size ) {
s = COM_Parse( &s_worldData.entityParsePoint );
Q_strncpyz( buffer, s, size );
if ( !s_worldData.entityParsePoint || !s[0] ) {
if ( !s_worldData.entityParsePoint && !s[0] ) {
s_worldData.entityParsePoint = s_worldData.entityString;
return qfalse;
} else {