From c8c7bb1dc3562723473e2eabaca30e7a9e0ecb28 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 10 Mar 2014 16:19:02 -0500 Subject: [PATCH] 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 "". --- code/renderergl1/tr_bsp.c | 2 +- code/renderergl2/tr_bsp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderergl1/tr_bsp.c b/code/renderergl1/tr_bsp.c index 7ca4d977..b5eac338 100644 --- a/code/renderergl1/tr_bsp.c +++ b/code/renderergl1/tr_bsp.c @@ -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 { diff --git a/code/renderergl2/tr_bsp.c b/code/renderergl2/tr_bsp.c index 9402c4e5..2198646e 100644 --- a/code/renderergl2/tr_bsp.c +++ b/code/renderergl2/tr_bsp.c @@ -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 {