diff --git a/src/bsp/bsplimits.h b/src/bsp/bsplimits.h index 9c50bb8c..3ccd47b1 100644 --- a/src/bsp/bsplimits.h +++ b/src/bsp/bsplimits.h @@ -5,7 +5,7 @@ #define MAXTEXTURENAME 16 #define MIPLEVELS 4 -#define MAX_KEYS_PER_ENT 64 // just guessing +#define MAX_KEYS_PER_ENT 128 // just guessing #define MAX_KEY_LEN 256 // not sure if this includes the null char #define MAX_VAL_LEN 4096 // not sure if this includes the null char diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index 3a330e0e..532d078d 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -2124,10 +2124,10 @@ void Gui::drawKeyvalueEditor_SmartEditTab(Entity* ent) { if (fgdClass != NULL) { - static InputData inputData[128]; + static InputData inputData[MAX_KEYS_PER_ENT]; static int lastPickCount = 0; - for (int i = 0; i < fgdClass->keyvalues.size() && i < 128; i++) { + for (int i = 0; i < fgdClass->keyvalues.size() && i < MAX_KEYS_PER_ENT; i++) { KeyvalueDef& keyvalue = fgdClass->keyvalues[i]; string key = keyvalue.name; if (key == "spawnflags") { diff --git a/src/editor/Renderer.cpp b/src/editor/Renderer.cpp index 41365c7d..bc777226 100644 --- a/src/editor/Renderer.cpp +++ b/src/editor/Renderer.cpp @@ -1001,7 +1001,7 @@ void Renderer::cameraPickingControls() { draggingAxis = -1; applyTransform(); - if (pickInfo.valid && pickInfo.ent && undoEntityState->getOrigin() != pickInfo.ent->getOrigin()) { + if (pickInfo.valid && pickInfo.ent && undoEntityState && undoEntityState->getOrigin() != pickInfo.ent->getOrigin()) { pushEntityUndoState("Move Entity"); } }