diff options
author | Zack Middleton <zturtleman@gmail.com> | 2014-03-10 16:19:02 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:41 +0100 |
commit | 1686d30c166397db7b8daa5ac629ffdebe5123b0 (patch) | |
tree | 38d9baa2a53d8c9fb9ed35404c6da0297ec8f921 /src | |
parent | 0c7e57b7c87602024b9ebc5263b09b898625bfcc (diff) |
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 "".
Diffstat (limited to 'src')
-rw-r--r-- | src/renderergl1/tr_bsp.c | 2 | ||||
-rw-r--r-- | src/renderergl2/tr_bsp.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/renderergl1/tr_bsp.c b/src/renderergl1/tr_bsp.c index bccc2ba2..bf4c7e31 100644 --- a/src/renderergl1/tr_bsp.c +++ b/src/renderergl1/tr_bsp.c @@ -1777,7 +1777,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/src/renderergl2/tr_bsp.c b/src/renderergl2/tr_bsp.c index 75b2d1f5..742d6b57 100644 --- a/src/renderergl2/tr_bsp.c +++ b/src/renderergl2/tr_bsp.c @@ -2723,7 +2723,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 { |