Fix two important bugs: the tokenizer was tokenizing '.' in identifiers wrong, and WingComponent was using the native flag incorrectly.
This commit is contained in:
@@ -216,14 +216,14 @@ TMap<FName, FName> UWingComponentReference::CalculateParentNames(USimpleConstruc
|
||||
|
||||
UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
||||
{
|
||||
if (Native) return FindComponentInCDO(BP->GeneratedClass, VariableName);
|
||||
USCS_Node *Node = FindSCSNodeByName(BP, VariableName);
|
||||
if (Node == nullptr) return nullptr;
|
||||
FComponentKey Key(Node);
|
||||
FoundComponent FC = FindComponent(BP, VariableName);
|
||||
if (FC.Native) return FC.Native;
|
||||
if (FC.SCS == nullptr) return nullptr;
|
||||
FComponentKey Key(FC.SCS);
|
||||
|
||||
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(BP, false))
|
||||
{
|
||||
if (Node->GetSCS()->GetBlueprint() == WalkBP) return Node->ComponentTemplate;
|
||||
if (FC.SCS->GetSCS()->GetBlueprint() == WalkBP) return FC.SCS->ComponentTemplate;
|
||||
UInheritableComponentHandler* ICH = WalkBP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ false);
|
||||
if (!ICH) continue;
|
||||
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
||||
@@ -234,12 +234,12 @@ UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
||||
|
||||
UActorComponent* UWingComponentReference::GetMutableTemplate() const
|
||||
{
|
||||
if (Native) return FindComponentInCDO(BP->GeneratedClass, VariableName);
|
||||
USCS_Node* Node = FindSCSNodeByName(BP, VariableName);
|
||||
if (!Node) return nullptr;
|
||||
if (Node->GetSCS()->GetBlueprint() == BP) return Node->ComponentTemplate;
|
||||
FoundComponent FC = FindComponent(BP, VariableName);
|
||||
if (FC.Native) return FC.Native;
|
||||
if (!FC.SCS) return nullptr;
|
||||
if (FC.SCS->GetSCS()->GetBlueprint() == BP) return FC.SCS->ComponentTemplate;
|
||||
|
||||
FComponentKey Key(Node);
|
||||
FComponentKey Key(FC.SCS);
|
||||
UInheritableComponentHandler* ICH = BP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ true);
|
||||
if (!ICH) return nullptr;
|
||||
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
||||
|
||||
@@ -148,7 +148,7 @@ FName WingTokenizer::TokenizeIdentifier(FStringView &Rest, FString &Error)
|
||||
if (Ch == ' ') break;
|
||||
if (Ch == '.')
|
||||
{
|
||||
if (Len < NAME_SIZE) Buffer[Len++] = Ch;
|
||||
if (Len < NAME_SIZE) Buffer[Len++] = ' ';
|
||||
Rest = Rest.RightChop(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user