Skip to content

Commit 8115daa

Browse files
committed
Fix Tag Definition Handling
If we have a null definition type, then the definition doesn't exist
1 parent 428de2a commit 8115daa

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

TagTool/Shaders/ShaderMatching/ShaderMatcher.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,6 @@ public Rmt2Descriptor RebuildRmt2Options(Rmt2Descriptor srcRmt2Descriptor, strin
283283

284284
if (PortingCache.Version == CacheVersion.HaloReach)
285285
{
286-
switch ($"{methodName}")
287-
{
288-
// #TODO: Figure out way around this - I hit the sampler limit :/
289-
case "alpha_blend_source" when srcRmt2Descriptor.Type == "shader":
290-
optionName = "from_albedo_alpha_without_fresnel";
291-
break;
292-
}
293-
294286
switch ($"{methodName}\\{optionName}")
295287
{
296288
// keep in sync with cubemap conversion - not needed anymore?

TagTool/Tags/TagDefinitions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public bool TagDefinitionExists(TagGroup group)
5757

5858
public bool TagDefinitionExists(Tag tag)
5959
{
60-
return Definitions.TagToTypeLookup.ContainsKey(tag);
60+
return Definitions.TagToTypeLookup.TryGetValue(tag, out var val) && val != null;
6161
}
6262

6363
public Type GetTagDefinitionType(TagGroup group)

0 commit comments

Comments
 (0)