Charge le plugin via AdditionalPluginDirectories, conserve ShowCouple et les commandlets anim côté jeu, et documente les lots S0–S8 (CHG-212 à CHG-220). Co-authored-by: Cursor <cursoragent@cursor.com>
72 lines
2.2 KiB
C++
72 lines
2.2 KiB
C++
// Show a deux. Le Blueprint (GI::Show) reste l'ancien chemin : capsules coupees, gravite 0.
|
|
// lp.ShowCouple 1 (defaut) branche le nouveau, comme la sandbox : les deux corps partagent le point,
|
|
// la boite suit les os affiches des deux corps, et les meubles bloquent Pawn le temps de la scene.
|
|
// lp.ShowCouple 0 debranche le nouveau et rend la main a l'ancien, sans rien effacer du Blueprint.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Engine/EngineBaseTypes.h"
|
|
#include "LPCoupleSim.h"
|
|
#include "Subsystems/GameInstanceSubsystem.h"
|
|
#include "LPShowCoupleSubsystem.generated.h"
|
|
|
|
class ACharacter;
|
|
class UAnimSequence;
|
|
class UBoxComponent;
|
|
class UPrimitiveComponent;
|
|
|
|
UCLASS()
|
|
class LIFEPLAY_API ULPShowCoupleSubsystem : public UGameInstanceSubsystem
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
|
|
virtual void Deinitialize() override;
|
|
|
|
private:
|
|
void AfterActors(UWorld* World, ELevelTick TickType, float DeltaSeconds);
|
|
void Engage(ACharacter* InLead, ACharacter* InPartner);
|
|
void Release();
|
|
void Weld();
|
|
void BlockRoomPawn();
|
|
void OpenUseFurniture();
|
|
void LetSittersPass(UWorld* World);
|
|
bool IsUseFurniture(const class UStaticMesh* Mesh);
|
|
bool FitBox(const TArray<UAnimSequence*>& Anims, const FString& Label);
|
|
bool FitToBodies();
|
|
void KeepTogether();
|
|
|
|
FDelegateHandle PostTickHandle;
|
|
TWeakObjectPtr<ACharacter> Lead;
|
|
TWeakObjectPtr<ACharacter> Partner;
|
|
TWeakObjectPtr<UBoxComponent> Box;
|
|
FVector LastSafe = FVector::ZeroVector;
|
|
FString FittedPair;
|
|
FString RejectedPair;
|
|
FVector LoggedExtent = FVector::ZeroVector;
|
|
FString LastBlocker;
|
|
bool bEngaged = false;
|
|
bool bPawnLogged = false;
|
|
|
|
// Mouvement du partenaire gele le temps du show, rendu par Release (LPCoupleSim.h).
|
|
LPCoupleSim::FSavedMove SavedPartnerMove;
|
|
|
|
struct FSavedPawn
|
|
{
|
|
TWeakObjectPtr<UPrimitiveComponent> Comp;
|
|
ECollisionResponse Response = ECR_Ignore;
|
|
};
|
|
TArray<FSavedPawn> SavedFurniture;
|
|
|
|
TSet<FName> UseFurniture;
|
|
TSet<FName> SolidFurniture;
|
|
|
|
struct FSavedSeat
|
|
{
|
|
TWeakObjectPtr<class UCapsuleComponent> Cap;
|
|
ECollisionResponse Response = ECR_Block;
|
|
};
|
|
TArray<FSavedSeat> SavedSeats;
|
|
};
|