From 6e7cc1878afeefd4b728479b6cf8fc087548a81c Mon Sep 17 00:00:00 2001 From: terminx Date: Thu, 8 Mar 2018 02:39:21 +0000 Subject: [PATCH] Improve CON perf tracking's ability to determine actor names git-svn-id: https://svn.eduke32.com/eduke32@6737 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/gamedef.cpp | 11 ++++++++--- source/duke3d/src/gamedef.h | 1 + source/duke3d/src/osdcmds.cpp | 8 +++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/source/duke3d/src/gamedef.cpp b/source/duke3d/src/gamedef.cpp index 1945e3e28..544f48c52 100644 --- a/source/duke3d/src/gamedef.cpp +++ b/source/duke3d/src/gamedef.cpp @@ -3559,6 +3559,11 @@ DO_DEFSTATE: } g_szCurrentBlockName[j] = 0; + j = hash_find(&h_labels, g_szCurrentBlockName); + + if (j != -1) + labeltype[j] |= LABEL_ACTOR; + if (tw == CON_USERACTOR) { j = *g_scriptPtr; @@ -3574,7 +3579,7 @@ DO_DEFSTATE: } } - C_GetNextValue(LABEL_DEFINE); + C_GetNextValue(LABEL_ACTOR); g_scriptPtr--; if (EDUKE32_PREDICT_FALSE((unsigned)*g_scriptPtr >= MAXTILES)) @@ -3680,7 +3685,7 @@ DO_DEFSTATE: } g_szCurrentBlockName[j] = 0; // g_labelsOnly = 1; - C_GetNextValue(LABEL_DEFINE); + C_GetNextValue(LABEL_EVENT); g_labelsOnly = 0; g_scriptPtr--; j= *g_scriptPtr; // type of event @@ -6271,7 +6276,7 @@ static void C_AddDefinition(const char *lLabel,int32_t lValue,int32_t lType) static void C_AddDefaultDefinitions(void) { for (int i=0; i