Skip to content

Commit

Permalink
[Guerilla] Well not *all* fields.
Browse files Browse the repository at this point in the history
No need to show blocks that can't be used.
  • Loading branch information
num0005 committed Oct 21, 2019
1 parent 09f268a commit 82c3406
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions H2Codez/H2Guerilla/H2Guerilla.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ static bool __fastcall field_information__should_hide(field_information *thisptr
{
ASSERT_CHECK(thisptr);
ASSERT_CHECK(thisptr->field);

/*
Hide blocks that can't be used
*/
if (thisptr->field->type == tag_field::block)
{
auto block_def = reinterpret_cast<tag_block_defintions*>(thisptr->field->defintion);
if (block_def->max_count == 0)
return true;
}

if (show_hidden_fields && conf.getBoolean("show_all_fields", false))
return false;

Expand Down

0 comments on commit 82c3406

Please sign in to comment.