Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #904 from spatialos/0.4.1-rc
Browse files Browse the repository at this point in the history
0.4.1 rc
  • Loading branch information
improbable-valy authored May 1, 2019
2 parents 2907709 + daa8b5e commit 4438e04
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased] - yyyy-mm-dd

## [`0.4.1`](https://github.com/spatialos/UnrealGDK/releases/tag/0.4.1) - 2019-05-01

### Bug fixes:
- Fixed an issue where schema components were sometimes generated with incorrect component IDs.

## [`0.4.0`](https://github.com/spatialos/UnrealGDK/releases/tag/0.4.0) - 2019-04-30

### New Known Issues:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,15 @@ void GenerateActorSchema(FComponentIdGenerator& IdGenerator, UClass* Class, TSha
continue;
}

const Worker_ComponentId ComponentId = SchemaData ? SchemaData->SchemaComponents[PropertyGroupToSchemaComponentType(Group)] : IdGenerator.Next();
Worker_ComponentId ComponentId = 0;
if (SchemaData != nullptr && SchemaData->SchemaComponents[PropertyGroupToSchemaComponentType(Group)] != 0)
{
ComponentId = SchemaData->SchemaComponents[PropertyGroupToSchemaComponentType(Group)];
}
else
{
ComponentId = IdGenerator.Next();
}

Writer.PrintNewLine();

Expand All @@ -359,7 +367,15 @@ void GenerateActorSchema(FComponentIdGenerator& IdGenerator, UClass* Class, TSha
FCmdHandlePropertyMap HandoverData = GetFlatHandoverData(TypeInfo);
if (HandoverData.Num() > 0)
{
const Worker_ComponentId ComponentId = SchemaData ? SchemaData->SchemaComponents[ESchemaComponentType::SCHEMA_Handover] : IdGenerator.Next();
Worker_ComponentId ComponentId = 0;
if (SchemaData != nullptr && SchemaData->SchemaComponents[ESchemaComponentType::SCHEMA_Handover] != 0)
{
ComponentId = SchemaData->SchemaComponents[ESchemaComponentType::SCHEMA_Handover];
}
else
{
ComponentId = IdGenerator.Next();
}

Writer.PrintNewLine();

Expand Down Expand Up @@ -405,7 +421,15 @@ FSubobjectSchemaData GenerateSubobjectSpecificSchema(FCodeWriter& Writer, FCompo
continue;
}

const Worker_ComponentId ComponentId = SubobjectSchemaData ? SubobjectSchemaData->SchemaComponents[PropertyGroupToSchemaComponentType(Group)] : IdGenerator.Next();
Worker_ComponentId ComponentId = 0;
if (SubobjectSchemaData != nullptr && SubobjectSchemaData->SchemaComponents[PropertyGroupToSchemaComponentType(Group)] != 0)
{
ComponentId = SubobjectSchemaData->SchemaComponents[PropertyGroupToSchemaComponentType(Group)];
}
else
{
ComponentId = IdGenerator.Next();
}

Writer.PrintNewLine();

Expand All @@ -422,7 +446,15 @@ FSubobjectSchemaData GenerateSubobjectSpecificSchema(FCodeWriter& Writer, FCompo
FCmdHandlePropertyMap HandoverData = GetFlatHandoverData(TypeInfo);
if (HandoverData.Num() > 0)
{
const Worker_ComponentId ComponentId = SubobjectSchemaData ? SubobjectSchemaData->SchemaComponents[ESchemaComponentType::SCHEMA_Handover] : IdGenerator.Next();
Worker_ComponentId ComponentId = 0;
if (SubobjectSchemaData != nullptr && SubobjectSchemaData->SchemaComponents[ESchemaComponentType::SCHEMA_Handover] != 0)
{
ComponentId = SubobjectSchemaData->SchemaComponents[ESchemaComponentType::SCHEMA_Handover];
}
else
{
ComponentId = IdGenerator.Next();
}

Writer.PrintNewLine();

Expand Down

0 comments on commit 4438e04

Please sign in to comment.