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
|
UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
||||||
{
|
{
|
||||||
if (Native) return FindComponentInCDO(BP->GeneratedClass, VariableName);
|
FoundComponent FC = FindComponent(BP, VariableName);
|
||||||
USCS_Node *Node = FindSCSNodeByName(BP, VariableName);
|
if (FC.Native) return FC.Native;
|
||||||
if (Node == nullptr) return nullptr;
|
if (FC.SCS == nullptr) return nullptr;
|
||||||
FComponentKey Key(Node);
|
FComponentKey Key(FC.SCS);
|
||||||
|
|
||||||
for (UBlueprint *WalkBP : WingUtils::GetAncestorBlueprints(BP, false))
|
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);
|
UInheritableComponentHandler* ICH = WalkBP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ false);
|
||||||
if (!ICH) continue;
|
if (!ICH) continue;
|
||||||
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
||||||
@@ -234,12 +234,12 @@ UActorComponent* UWingComponentReference::GetImmutableTemplate() const
|
|||||||
|
|
||||||
UActorComponent* UWingComponentReference::GetMutableTemplate() const
|
UActorComponent* UWingComponentReference::GetMutableTemplate() const
|
||||||
{
|
{
|
||||||
if (Native) return FindComponentInCDO(BP->GeneratedClass, VariableName);
|
FoundComponent FC = FindComponent(BP, VariableName);
|
||||||
USCS_Node* Node = FindSCSNodeByName(BP, VariableName);
|
if (FC.Native) return FC.Native;
|
||||||
if (!Node) return nullptr;
|
if (!FC.SCS) return nullptr;
|
||||||
if (Node->GetSCS()->GetBlueprint() == BP) return Node->ComponentTemplate;
|
if (FC.SCS->GetSCS()->GetBlueprint() == BP) return FC.SCS->ComponentTemplate;
|
||||||
|
|
||||||
FComponentKey Key(Node);
|
FComponentKey Key(FC.SCS);
|
||||||
UInheritableComponentHandler* ICH = BP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ true);
|
UInheritableComponentHandler* ICH = BP->GetInheritableComponentHandler(/*bCreateIfNecessary=*/ true);
|
||||||
if (!ICH) return nullptr;
|
if (!ICH) return nullptr;
|
||||||
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
UActorComponent* Override = ICH->GetOverridenComponentTemplate(Key);
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ FName WingTokenizer::TokenizeIdentifier(FStringView &Rest, FString &Error)
|
|||||||
if (Ch == ' ') break;
|
if (Ch == ' ') break;
|
||||||
if (Ch == '.')
|
if (Ch == '.')
|
||||||
{
|
{
|
||||||
if (Len < NAME_SIZE) Buffer[Len++] = Ch;
|
if (Len < NAME_SIZE) Buffer[Len++] = ' ';
|
||||||
Rest = Rest.RightChop(1);
|
Rest = Rest.RightChop(1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user