]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_edict.c
added developer_entityparsing cvar to aid in debugging entitystring parsing issues...
[xonotic/darkplaces.git] / prvm_edict.c
index 94d74a53be86fa6ac61dea41d4ba646ae8d4a4fe..1dec266c4363d3fba4b52455a9f21e0a3a45fb3c 100644 (file)
@@ -1009,6 +1009,7 @@ ed should be a properly initialized empty edict.
 Used for initial level load and for savegames.
 ====================
 */
+extern cvar_t developer_entityparsing;
 const char *PRVM_ED_ParseEdict (const char *data, prvm_edict_t *ent)
 {
        ddef_t *key;
@@ -1025,6 +1026,8 @@ const char *PRVM_ED_ParseEdict (const char *data, prvm_edict_t *ent)
        // parse key
                if (!COM_ParseToken(&data, false))
                        PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace");
+               if (developer_entityparsing.integer)
+                       Con_Printf("Key: \"%s\"", com_token);
                if (com_token[0] == '}')
                        break;
 
@@ -1055,6 +1058,8 @@ const char *PRVM_ED_ParseEdict (const char *data, prvm_edict_t *ent)
        // parse value
                if (!COM_ParseToken(&data, false))
                        PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace");
+               if (developer_entityparsing.integer)
+                       Con_Printf(" \"%s\"\n", com_token);
 
                if (com_token[0] == '}')
                        PRVM_ERROR ("PRVM_ED_ParseEdict: closing brace without data");