IVSmoke 1.0
Loading...
Searching...
No Matches
IVSmokeHoleRequestComponent.h
1// Copyright (c) 2026, Team SDB. All rights reserved.
2
3#pragma once
4
5#include "Components/ActorComponent.h"
6#include "IVSmokeHoleRequestComponent.generated.h"
7
10
11/**
12 * @brief Handles network routing for hole requests.
13 * This component enables clients to request holes on VoxelVolumes
14 * by routing Server RPCs through the PlayerController's connection.
15 */
16UCLASS(ClassGroup = (IVSmoke), meta = (BlueprintSpawnableComponent))
17class IVSMOKE_API UIVSmokeHoleRequestComponent : public UActorComponent
18{
19 GENERATED_BODY()
20
21public:
23
24 //~============================================================================
25 // Public API
26#pragma region API
27 UFUNCTION(BlueprintCallable, Category = "IVSmoke | Hole | API", meta = (DefaultToSelf = "Caller", HidePin = "Caller"))
28 static void RequestPenetrationHole(AActor* Caller, AActor* IVSmokeVoxelVolume, const FVector3f& BulletOrigin, const FVector3f& BulletDirection, UIVSmokeHolePreset* BulletPreset);
29
30 UFUNCTION(BlueprintCallable, Category = "IVSmoke | Hole | API", meta = (DefaultToSelf = "Caller", HidePin = "Caller"))
31 static void RequestExplosionHole(AActor* Caller, AActor* IVSmokeVoxelVolume, const FVector3f& ExplosionOrigin, UIVSmokeHolePreset* ExplosionPreset);
32
33 UFUNCTION(BlueprintCallable, Category = "IVSmoke | Hole | API", meta = (DefaultToSelf = "Caller", HidePin = "Caller"))
34 static void RequestDynamicHole(AActor* Caller, AActor* IVSmokeVoxelVolume, UIVSmokeHolePreset* DynamicPreset);
35#pragma endregion
36
37 //~============================================================================
38 // Server RPC
39#pragma region RPC
40private:
41 /** Request a penetration hole. Always executed on server. */
42 UFUNCTION(Server, Reliable, Category = "IVSmoke | Hole | RPC")
43 void Internal_RequestPenetrationHole(UIVSmokeHoleGeneratorComponent* IVSmokeHoleGeneratorComponent, const FVector3f& Origin, const FVector3f& Direction, UIVSmokeHolePreset* Preset);
44
45 /** Request an explosion hole. Always executed on server. */
46 UFUNCTION(Server, Reliable, Category = "IVSmoke | Hole | RPC")
47 void Internal_RequestExplosionHole(UIVSmokeHoleGeneratorComponent* IVSmokeHoleGeneratorComponent, const FVector3f& Origin, UIVSmokeHolePreset* Preset);
48
49 /** Request a dynamic hole. Always executed on server. */
50 UFUNCTION(Server, Reliable, Category = "IVSmoke | Hole | RPC")
51 void Internal_RequestDynamicHole(UIVSmokeHoleGeneratorComponent* IVSmokeHoleGeneratorComponent, AActor* TargetActor, UIVSmokeHolePreset* Preset);
52#pragma endregion
53};
Component that generates hole texture for volumetric smoke. Provides public API for penetration and e...
Handles network routing for hole requests. This component enables clients to request holes on VoxelVo...