Skip to content

Commit

Permalink
Unreal SDK fix for setting capacity for Player Tracking and Editor er…
Browse files Browse the repository at this point in the history
…ror messages (#2846)

* Added initialization of members in FDuration and FPlayerCapacity to avoid run-time warnings and errors

* Corrected the HTTP method of the SetPlayerCapacity to FHttpVerb::Put
  • Loading branch information
Titantompa authored Dec 5, 2022
1 parent 94092f9 commit a57d334
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sdks/unreal/Agones/Source/Agones/Classes/Classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ struct FDuration
GENERATED_BODY()

UPROPERTY(BlueprintReadOnly, Category="Agones")
int64 Seconds;
int64 Seconds = 0;
};

USTRUCT(BlueprintType)
Expand All @@ -284,7 +284,7 @@ struct FPlayerCapacity
GENERATED_BODY()

UPROPERTY(BlueprintReadOnly, Category="Agones")
int64 Count;
int64 Count = 0;
};

USTRUCT(BlueprintType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ void UAgonesComponent::SetPlayerCapacity(
return;
}

FHttpRequestRef Request = BuildAgonesRequest("alpha/player/capacity", FHttpVerb::Post, Json);
FHttpRequestRef Request = BuildAgonesRequest("alpha/player/capacity", FHttpVerb::Put, Json);
Request->OnProcessRequestComplete().BindWeakLambda(this,
[SuccessDelegate, ErrorDelegate](FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded) {
if (!IsValidResponse(bSucceeded, HttpResponse, ErrorDelegate))
Expand Down

0 comments on commit a57d334

Please sign in to comment.