From 075e1226b750f9a8d6d7b9f8c9b5b7453546f6c4 Mon Sep 17 00:00:00 2001 From: wookieejedi Date: Mon, 10 Aug 2026 22:15:32 -0400 Subject: [PATCH] Update type Prop to ensure it's on object list Seems like props were missing from the object type list, so adding them in this relatively small PR. Happy to edit or do something differently if folks want though! --- code/object/object.cpp | 5 ++++- code/object/object.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/object/object.cpp b/code/object/object.cpp index 58a83aeeb6d..76c471ee1f9 100644 --- a/code/object/object.cpp +++ b/code/object/object.cpp @@ -142,10 +142,13 @@ const char *Object_type_names[MAX_OBJECT_TYPES] = { "Asteroid", "Jump Node", "Beam", - "Raw Pof" + "Raw Pof", + "Prop" //XSTR:ON }; +static_assert(MAX_OBJECT_TYPES == OBJ_PROP + 1, "Object_type_names needs an entry for every object type!"); + obj_flag_name Object_flag_names[] = { { Object::Object_Flags::Invulnerable, "invulnerable", }, { Object::Object_Flags::Protected, "protect-ship", }, diff --git a/code/object/object.h b/code/object/object.h index 95e6e77995b..24cda4bd068 100644 --- a/code/object/object.h +++ b/code/object/object.h @@ -54,7 +54,7 @@ #define OBJ_PROP 17 // A prop object like a landscape. Similar to ships but is entirely non-interactable with the exception of collisions //Make sure to change Object_type_names in Object.c when adding another type! -#define MAX_OBJECT_TYPES 17 +#define MAX_OBJECT_TYPES 18 #define UNUSED_OBJNUM (-MAX_OBJECTS*2) // Newer systems use this instead of -1 for invalid object.