Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add implementations for FG WP runtime spatial hash #339

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Th3Fanbus
Copy link
Contributor

Add the implementations of FGWorldPartitionRuntimeSpatialHash.cpp and FWPSaveDataMigrationContext.cpp, kindly provided by Archengius. These should allow custom levels that use World Partition. The level must use the FGWorldPartitionRuntimeSpatialHash class (using the default class will result in a cast failure crash), but it was impossible to cook the level with the stubs we had in the project.

Arch also provided FWPSaveDataMigrationContext.cpp as it gets used by FGWorldPartitionRuntimeSpatialHash.cpp to generate WP migration data, needed to support WP migration for modded WP worlds.

Should address #315

@Th3Fanbus
Copy link
Contributor Author

Currently fails to build due to missing stuff about FGObjectReference (the operator<< for FArchive lacks a definition, we may need the implementation of the rest of the class anyway).

@Th3Fanbus Th3Fanbus marked this pull request as draft January 24, 2025 16:50
Add the implementations of `FGWorldPartitionRuntimeSpatialHash.cpp` and
`FWPSaveDataMigrationContext.cpp`, kindly provided by Archengius. These
should allow custom levels that use World Partition. The level must use
the `FGWorldPartitionRuntimeSpatialHash` class (using the default class
will result in a cast failure crash), but it was impossible to cook the
level with the stubs we had in the project.

Arch also provided `FWPSaveDataMigrationContext.cpp` as it gets used by
`FGWorldPartitionRuntimeSpatialHash.cpp` to generate WP migration data,
needed to support WP migration for modded WP worlds.

TODO: I had to implement a function in FGObjectReference.cpp but I have
      no idea if the implementation is correct. Without this function's
      definition, the Arch-provided code does not build (linker error).

Signed-off-by: Angel Pons <th3fanbus@gmail.com>
@Th3Fanbus Th3Fanbus force-pushed the wp-runtime-spatial-hash branch from c835bc0 to 4d25750 Compare March 3, 2025 10:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant