Clean up net cull deprecation warnings
This commit is contained in:
@@ -865,9 +865,14 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe
|
|||||||
- [x] Can reconnect and retain state. Added a reconnect state-retention QA gate tied to logout/restart player snapshots, safe player identity, transform, survival, care history, inventory restore, normal-spawn fallback behavior, and the two-client manual reconnect evidence path.
|
- [x] Can reconnect and retain state. Added a reconnect state-retention QA gate tied to logout/restart player snapshots, safe player identity, transform, survival, care history, inventory restore, normal-spawn fallback behavior, and the two-client manual reconnect evidence path.
|
||||||
- [x] Can restart server and retain placed shelter. Added a server-restart shelter persistence QA gate tied to `primitive_shelter` persistent actor state, world actor save/load, game-mode class registration, load-on-server-start behavior, shelter weather protection, and a release smoke requirement to place, save, restart, and confirm the shelter transform remains.
|
- [x] Can restart server and retain placed shelter. Added a server-restart shelter persistence QA gate tied to `primitive_shelter` persistent actor state, world actor save/load, game-mode class registration, load-on-server-start behavior, shelter weather protection, and a release smoke requirement to place, save, restart, and confirm the shelter transform remains.
|
||||||
- [x] No critical log spam during 30-minute test. Added a 30-minute critical log soak QA gate plus `scan_critical_log_spam.py` so client/server/release logs can be checked for fatal, crash, assertion, ensure, access-violation, callstack, and critical-error spam before a milestone package is treated as investor-stable.
|
- [x] No critical log spam during 30-minute test. Added a 30-minute critical log soak QA gate plus `scan_critical_log_spam.py` so client/server/release logs can be checked for fatal, crash, assertion, ensure, access-violation, callstack, and critical-error spam before a milestone package is treated as investor-stable.
|
||||||
- [ ] Clean up Unreal API deprecation warnings from packaged builds, starting
|
- [x] Clean up Unreal API deprecation warnings from packaged builds, starting
|
||||||
with direct `NetCullDistanceSquared` access on replicated world actors before
|
with direct `NetCullDistanceSquared` access on replicated world actors before
|
||||||
future Unreal upgrades turn the warning into a compile blocker.
|
future Unreal upgrades turn the warning into a compile blocker. Replaced direct
|
||||||
|
`NetCullDistanceSquared = FMath::Square(...)` assignments with
|
||||||
|
`SetNetCullDistanceSquared(FMath::Square(...))` on item pickups, resource
|
||||||
|
nodes, campfires, shelters, wildlife, water sources, weather exposure zones,
|
||||||
|
and wildlife spawn managers, then added verifier coverage to prevent the
|
||||||
|
deprecated assignment style from returning.
|
||||||
- [ ] Server remains stable with target test player count.
|
- [ ] Server remains stable with target test player count.
|
||||||
|
|
||||||
## 0.1.R Knowledge And Skill Foundation
|
## 0.1.R Knowledge And Skill Foundation
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Verify replicated world actors no longer use deprecated net cull assignment."""
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md"
|
||||||
|
|
||||||
|
EXPECTED_SETTERS = {
|
||||||
|
"Source/AgrarianGame/AgrarianItemPickup.cpp": "SetNetCullDistanceSquared(FMath::Square(3000.0f));",
|
||||||
|
"Source/AgrarianGame/AgrarianResourceNode.cpp": "SetNetCullDistanceSquared(FMath::Square(4500.0f));",
|
||||||
|
"Source/AgrarianGame/AgrarianCampfire.cpp": "SetNetCullDistanceSquared(FMath::Square(6000.0f));",
|
||||||
|
"Source/AgrarianGame/AgrarianShelterActor.cpp": "SetNetCullDistanceSquared(FMath::Square(6000.0f));",
|
||||||
|
"Source/AgrarianGame/AgrarianWildlifeBase.cpp": "SetNetCullDistanceSquared(FMath::Square(6000.0f));",
|
||||||
|
"Source/AgrarianGame/AgrarianWaterSource.cpp": "SetNetCullDistanceSquared(FMath::Square(6500.0f));",
|
||||||
|
"Source/AgrarianGame/AgrarianWeatherExposureZone.cpp": "SetNetCullDistanceSquared(FMath::Square(6500.0f));",
|
||||||
|
"Source/AgrarianGame/AgrarianWildlifeSpawnManager.cpp": "SetNetCullDistanceSquared(FMath::Square(8000.0f));",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
missing: list[str] = []
|
||||||
|
for relative_path, setter in EXPECTED_SETTERS.items():
|
||||||
|
path = ROOT / relative_path
|
||||||
|
text = path.read_text(encoding="utf-8")
|
||||||
|
if "NetCullDistanceSquared =" in text:
|
||||||
|
missing.append(f"{relative_path} still uses direct NetCullDistanceSquared assignment")
|
||||||
|
if setter not in text:
|
||||||
|
missing.append(f"{relative_path} missing {setter!r}")
|
||||||
|
|
||||||
|
roadmap_text = ROADMAP.read_text(encoding="utf-8")
|
||||||
|
if "[x] Clean up Unreal API deprecation warnings from packaged builds" not in roadmap_text:
|
||||||
|
missing.append("roadmap item is not marked complete")
|
||||||
|
if "SetNetCullDistanceSquared" not in roadmap_text:
|
||||||
|
missing.append("roadmap summary does not mention SetNetCullDistanceSquared")
|
||||||
|
|
||||||
|
if missing:
|
||||||
|
raise SystemExit("FAILED: " + "; ".join(missing))
|
||||||
|
print("OK: net cull deprecation cleanup uses SetNetCullDistanceSquared across replicated world actors.")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -22,14 +22,14 @@ def require(content: str, needle: str, context: str) -> None:
|
|||||||
def main() -> int:
|
def main() -> int:
|
||||||
errors: list[str] = []
|
errors: list[str] = []
|
||||||
checks = {
|
checks = {
|
||||||
"Source/AgrarianGame/AgrarianItemPickup.cpp": ["NetCullDistanceSquared = FMath::Square(3000.0f);"],
|
"Source/AgrarianGame/AgrarianItemPickup.cpp": ["SetNetCullDistanceSquared(FMath::Square(3000.0f));"],
|
||||||
"Source/AgrarianGame/AgrarianResourceNode.cpp": ["NetCullDistanceSquared = FMath::Square(4500.0f);"],
|
"Source/AgrarianGame/AgrarianResourceNode.cpp": ["SetNetCullDistanceSquared(FMath::Square(4500.0f));"],
|
||||||
"Source/AgrarianGame/AgrarianCampfire.cpp": ["NetCullDistanceSquared = FMath::Square(6000.0f);"],
|
"Source/AgrarianGame/AgrarianCampfire.cpp": ["SetNetCullDistanceSquared(FMath::Square(6000.0f));"],
|
||||||
"Source/AgrarianGame/AgrarianShelterActor.cpp": ["NetCullDistanceSquared = FMath::Square(6000.0f);"],
|
"Source/AgrarianGame/AgrarianShelterActor.cpp": ["SetNetCullDistanceSquared(FMath::Square(6000.0f));"],
|
||||||
"Source/AgrarianGame/AgrarianWildlifeBase.cpp": ["NetCullDistanceSquared = FMath::Square(6000.0f);"],
|
"Source/AgrarianGame/AgrarianWildlifeBase.cpp": ["SetNetCullDistanceSquared(FMath::Square(6000.0f));"],
|
||||||
"Source/AgrarianGame/AgrarianWaterSource.cpp": ["NetCullDistanceSquared = FMath::Square(6500.0f);"],
|
"Source/AgrarianGame/AgrarianWaterSource.cpp": ["SetNetCullDistanceSquared(FMath::Square(6500.0f));"],
|
||||||
"Source/AgrarianGame/AgrarianWeatherExposureZone.cpp": ["NetCullDistanceSquared = FMath::Square(6500.0f);"],
|
"Source/AgrarianGame/AgrarianWeatherExposureZone.cpp": ["SetNetCullDistanceSquared(FMath::Square(6500.0f));"],
|
||||||
"Source/AgrarianGame/AgrarianWildlifeSpawnManager.cpp": ["NetCullDistanceSquared = FMath::Square(8000.0f);"],
|
"Source/AgrarianGame/AgrarianWildlifeSpawnManager.cpp": ["SetNetCullDistanceSquared(FMath::Square(8000.0f));"],
|
||||||
"Docs/MultiplayerNetworkingDesign.md": [
|
"Docs/MultiplayerNetworkingDesign.md": [
|
||||||
"MVP actor cull distances",
|
"MVP actor cull distances",
|
||||||
"item pickups: 30 meters",
|
"item pickups: 30 meters",
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ AAgrarianCampfire::AAgrarianCampfire()
|
|||||||
{
|
{
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(6000.0f);
|
SetNetCullDistanceSquared(FMath::Square(6000.0f));
|
||||||
|
|
||||||
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
||||||
RootComponent = Mesh;
|
RootComponent = Mesh;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
AAgrarianItemPickup::AAgrarianItemPickup()
|
AAgrarianItemPickup::AAgrarianItemPickup()
|
||||||
{
|
{
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(3000.0f);
|
SetNetCullDistanceSquared(FMath::Square(3000.0f));
|
||||||
|
|
||||||
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
||||||
RootComponent = Mesh;
|
RootComponent = Mesh;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
AAgrarianResourceNode::AAgrarianResourceNode()
|
AAgrarianResourceNode::AAgrarianResourceNode()
|
||||||
{
|
{
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(4500.0f);
|
SetNetCullDistanceSquared(FMath::Square(4500.0f));
|
||||||
|
|
||||||
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
||||||
RootComponent = Mesh;
|
RootComponent = Mesh;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace
|
|||||||
AAgrarianShelterActor::AAgrarianShelterActor()
|
AAgrarianShelterActor::AAgrarianShelterActor()
|
||||||
{
|
{
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(6000.0f);
|
SetNetCullDistanceSquared(FMath::Square(6000.0f));
|
||||||
|
|
||||||
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
||||||
RootComponent = Mesh;
|
RootComponent = Mesh;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
AAgrarianWaterSource::AAgrarianWaterSource()
|
AAgrarianWaterSource::AAgrarianWaterSource()
|
||||||
{
|
{
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(6500.0f);
|
SetNetCullDistanceSquared(FMath::Square(6500.0f));
|
||||||
|
|
||||||
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
Mesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Mesh"));
|
||||||
RootComponent = Mesh;
|
RootComponent = Mesh;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
AAgrarianWeatherExposureZone::AAgrarianWeatherExposureZone()
|
AAgrarianWeatherExposureZone::AAgrarianWeatherExposureZone()
|
||||||
{
|
{
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(6500.0f);
|
SetNetCullDistanceSquared(FMath::Square(6500.0f));
|
||||||
|
|
||||||
ExposureVolume = CreateDefaultSubobject<UBoxComponent>(TEXT("ExposureVolume"));
|
ExposureVolume = CreateDefaultSubobject<UBoxComponent>(TEXT("ExposureVolume"));
|
||||||
RootComponent = ExposureVolume;
|
RootComponent = ExposureVolume;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ AAgrarianWildlifeBase::AAgrarianWildlifeBase()
|
|||||||
{
|
{
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(6000.0f);
|
SetNetCullDistanceSquared(FMath::Square(6000.0f));
|
||||||
AutoPossessAI = EAutoPossessAI::PlacedInWorldOrSpawned;
|
AutoPossessAI = EAutoPossessAI::PlacedInWorldOrSpawned;
|
||||||
AIControllerClass = AAIController::StaticClass();
|
AIControllerClass = AAIController::StaticClass();
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ AAgrarianWildlifeSpawnManager::AAgrarianWildlifeSpawnManager()
|
|||||||
{
|
{
|
||||||
PrimaryActorTick.bCanEverTick = true;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
bReplicates = true;
|
bReplicates = true;
|
||||||
NetCullDistanceSquared = FMath::Square(8000.0f);
|
SetNetCullDistanceSquared(FMath::Square(8000.0f));
|
||||||
SetReplicatingMovement(false);
|
SetReplicatingMovement(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user