Skip to content

Commit

Permalink
Fix typo, remove old size check
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinRichards committed Oct 12, 2024
1 parent 9f31b0f commit a2a3255
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/constants/event_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@

// Each object event template gets an ID that can be used to refer to it in scripts and elsewhere.
// This is referred to as the "local id" (and it's really just 1 + its index in the templates array).
// There are a few special IDs reserved for objects that don't have a templates in the map data -- one for the player
// There are a few special IDs reserved for objects that don't have templates in the map data -- one for the player
// in regular offline play, five for linked players while playing Berry Blender, and one for an invisible object that
// can be spawned for the camera to track instead of the player. Additionally, the value 0 is reserved as an "empty" indicator.
#define LOCALID_NONE 0
Expand Down
10 changes: 4 additions & 6 deletions tools/mapjson/mapjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,10 @@ void process_event_constants(const vector<string> &map_filepaths, string output_
}
// Get IDs from the warp events.
auto warp_events = map_data["warp_events"].array_items();
if (warp_events.size()) {
for (unsigned int i = 0; i < warp_events.size(); i++) {
auto warp_event = warp_events[i];
if (warp_event.object_items().find("warp_id") != warp_event.object_items().end())
map_ids_text << "#define " << json_to_string(warp_event, "warp_id") << " " << i << "\n";
}
for (unsigned int i = 0; i < warp_events.size(); i++) {
auto warp_event = warp_events[i];
if (warp_event.object_items().find("warp_id") != warp_event.object_items().end())
map_ids_text << "#define " << json_to_string(warp_event, "warp_id") << " " << i << "\n";
}
// Only output if we found any IDs
string temp = map_ids_text.str();
Expand Down

0 comments on commit a2a3255

Please sign in to comment.