Skip to content

Commit

Permalink
Fix R_GetEntityToken ending prematurely
Browse files Browse the repository at this point in the history
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 "".
  • Loading branch information
zturtleman committed Mar 10, 2014
1 parent 5a3e10d commit c8c7bb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/renderergl1/tr_bsp.c
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion code/renderergl2/tr_bsp.c
Expand Up @@ -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 {
Expand Down

0 comments on commit c8c7bb1

Please sign in to comment.