|
Space Plunder
|
A weapon base class. More...
#include <WeaponFramework.h>
Public Member Functions | |
| AWeaponFramework () | |
Public Attributes | |
| bool | bDebuggingMode = false |
| bool | bInfiniteAmmo = false |
| bool | bBottomlessClip = false |
| float | DrawDebugTime = 2.0f |
| float | DrawDebugColorDarkMultiplier = 0.1f |
| float | DrawDebugColorLightMultiplier = 2.0f |
| float | DrawDebugPointSize = 16.0f |
| FLinearColor | MainTraceColor = FLinearColor(0.9f, 0.1f, 0.1f) |
| FLinearColor | BlindFireTraceColor = FLinearColor(0.1f, 0.9f, 0.1f) |
| bool | bTraceComplex = false |
| bool | bReturnPhysicalMaterial = false |
| float | TraceDistanceTooClose = 0.075f |
Protected Member Functions | |
| virtual void | BeginPlay () override |
| virtual void | SetupWeaponEffects () |
| void | LogDebugMessage (const FString &Message, const bool bError=false) const |
| void | Server_InitWeapon () |
| virtual void | InitWeapon () override |
| virtual void | Fire (const FVector Location, const FRotator Rotation, const AActor *ActorToIgnore, const float Accuracy) override |
| virtual void | Reload (const float ReloadTime) override |
| virtual void | CancelReload () override |
| virtual void | SwitchAutoMode () override |
| virtual void | BlindFireWeapon (const FVector Location, const FRotator Rotation, const AActor *ActorToIgnore, const float Accuracy) override |
| virtual void | AddAttachment (const FString &AttachmentID) override |
| virtual void | ToggleAttachment (const EAttachmentType &AttachmentType) override |
| virtual void | MoveUMG (bool bIsRightShoulder) override |
| virtual void | Aiming (bool bIsAiming) override |
| virtual FWeaponData_T | GetWeaponData () const override |
| virtual FWeaponStats_T | GetWeaponStats () const override |
| virtual EWeaponType | GetWeaponType () const override |
| virtual EWeaponFireMode | GetFireMode () const override |
| virtual FTransform | GetPivotPoint () const override |
| virtual FTransform | GetAimDownSightSocket () const override |
| virtual float | GetWeaponFOV () const override |
| virtual bool | IsClipEmpty () const override |
| virtual void | SetWeaponData (const FWeaponData_T NewWeaponData) override |
| virtual void | SetWeaponShouldAutoReload (const bool bValue) override |
| virtual void | SetWeaponMesh (USkeletalMesh *SkeletalMesh) override |
| virtual void | SetMuzzleOffset (const FVector &Location, const FRotator &Rotation) override |
| virtual void | SetRecoilPivotPoint (const FVector &Location, const FRotator &Rotation) override |
| virtual void | SetWeaponMeshHidden (const bool bValue) override |
| void | Multicast_SetWeaponMeshHidden (const bool bValue) |
| virtual void | SetDebuggingStats (const bool bDebug, const bool bInfinite, const bool bBottomless) override |
| virtual void | ToggleLaser (const bool bForceOff=false) |
| void | ReceiveFire (FHitResult Hit, APawn *InstigatorPawn) |
| TArray< FWeaponModifiers > | GetAllWeaponAttachmentModifiers () const |
| TArray< FWeaponAttachment > | GetAllWeaponAttachments () const |
| FWeaponAttachment | GetWeaponAttachment (const FString &AttachmentID) const |
| bool | RemoveAttachment (const FString AttachmentID, const EAttachmentType AttachmentType) |
| void | RemoveAllAttachments () |
| bool | CanShoot () const |
| float | GetAccuracyMultiplier () const |
| void | ApplyDamageToActor (const FHitResult &Hit, FVector ShotDirection, float Multiplier=1.0f) |
| void | ServerFire (const FVector Location, const FRotator Rotation, const AActor *ActorToIgnore, const float Accuracy) |
| virtual void | ServerShoot () |
| void | ServerSetReloading (const bool bReloading) |
| void | ServerReload () |
| virtual void | Server_SetWeaponShouldAutoReload (const bool bValue) |
| void | CalculateBulletSpread (FVector &NewBulletSpread) const |
| virtual float | CalculateDistanceDamage (const float Distance) const |
| virtual FHitResult | BlindFireWeaponTrace (const float Accuracy, const AActor *ActorToIgnore=nullptr) |
| virtual bool | LineTrace (FHitResult &Hit, FVector &ShotDirection, const FLinearColor &Color=FLinearColor::Green, const FVector &CustomLineEnd=FVector::ZeroVector) const |
| void | OnMeshReplicated () |
| void | OnRep_WeaponStats () |
Protected Attributes | |
| UHitscanWeaponComponent * | HitscanWeaponComponent |
| UProjectileWeaponComponent * | ProjectileWeaponComponent |
| FVector | TraceLocation |
| FRotator | TraceRotation |
| const AActor * | TraceActorToIgnore |
| TArray< AActor * > | ActorsToIgnore |
| APawn * | OwnerPawn |
| FWeaponData_T | WeaponData |
| EWeaponType | WeaponType = EWeaponType::Default |
| USceneComponent * | SceneRoot |
| USkeletalMeshComponent * | GunMeshComponent |
| USceneComponent * | Muzzle |
| USceneComponent * | RecoilPivotPoint |
| TArray< UStaticMeshComponent * > | AttachmentComponents |
| class UWeaponEffectsComponent * | WeaponEffects |
| USkeletalMesh * | WeaponMesh |
| TSubclassOf< class AActor > | ProjectileClass |
Private Member Functions | |
| void | SetWeaponFireMode () |
| void | AddWeaponAttachments () |
| void | ShootHitScan () |
| void | ShootProjectile () |
Private Attributes | |
| FWeaponStats_T | CurrentWeaponStats |
| bool | bWeaponEffectsSetup = false |
| float | AccuracyMultiplier = 1.0f |
| bool | bLaserOn = false |
| bool | bIsBeingReloaded |
| FTimerHandle | ReloadTimerHandle |
A weapon base class.
This class represents a weapon in the game. It inherits from AActor, IWeapon, and IBaseInterface. It provides functionality for firing, reloading, switching fire mode, aiming, and other weapon-related actions.
| AWeaponFramework::AWeaponFramework | ( | ) |
|
overrideprotectedvirtual |
Attachments
Implements IWeapon.
|
private |
|
overrideprotectedvirtual |
Implements IWeapon.
Reimplemented in AProjectileWeaponFramework.
|
protected |
|
overrideprotectedvirtual |
Reimplemented in AProjectileWeaponFramework.
|
overrideprotectedvirtual |
Implements IWeapon.
|
protectedvirtual |
Reimplemented in AHitscanWeaponFramework.
|
protected |
|
protectedvirtual |
Reimplemented in AHitscanWeaponFramework.
|
overrideprotectedvirtual |
Implements IWeapon.
|
protected |
|
overrideprotectedvirtual |
Shooting
Implements IWeapon.
|
inlineprotected |
|
overrideprotectedvirtual |
Implements IWeapon.
|
protected |
Weapon Attachments
|
protected |
|
inlineoverrideprotectedvirtual |
Implements IWeapon.
|
inlineoverrideprotectedvirtual |
Implements IWeapon.
|
protected |
|
inlineoverrideprotectedvirtual |
|
overrideprotectedvirtual |
Implements IWeapon.
|
overrideprotectedvirtual |
Implements IWeapon.
|
inlineoverrideprotectedvirtual |
Implements IWeapon.
|
overrideprotectedvirtual |
Implements IWeapon.
|
inlineoverrideprotectedvirtual |
Implements IWeapon.
|
protectedvirtual |
Reimplemented in AHitscanWeaponFramework.
|
protected |
|
overrideprotectedvirtual |
Implements IWeapon.
|
protected |
|
protected |
|
protected |
|
protected |
|
overrideprotectedvirtual |
Implements IWeapon.
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Reimplemented in AMeleeWeaponFramework, and AProjectileWeaponFramework.
|
inlineoverrideprotectedvirtual |
Implements IWeapon.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Implements IWeapon.
|
protectedvirtual |
|
inlineoverrideprotectedvirtual |
Implements IWeapon.
|
private |
|
overrideprotectedvirtual |
Implements IWeapon.
|
overrideprotectedvirtual |
Sets the Guns Mesh to be Hidden in Game, Used for Turrets and Ships, Things with invisible Weapons
Implements IWeapon.
|
overrideprotectedvirtual |
Implements IWeapon.
|
private |
|
private |
|
overrideprotectedvirtual |
Implements IWeapon.
|
overrideprotectedvirtual |
Implements IWeapon.
|
protectedvirtual |
|
private |
|
protected |
|
protected |
| bool AWeaponFramework::bBottomlessClip = false |
| bool AWeaponFramework::bDebuggingMode = false |
| bool AWeaponFramework::bInfiniteAmmo = false |
|
private |
|
private |
| FLinearColor AWeaponFramework::BlindFireTraceColor = FLinearColor(0.1f, 0.9f, 0.1f) |
| bool AWeaponFramework::bReturnPhysicalMaterial = false |
| bool AWeaponFramework::bTraceComplex = false |
|
private |
|
private |
| float AWeaponFramework::DrawDebugColorDarkMultiplier = 0.1f |
| float AWeaponFramework::DrawDebugColorLightMultiplier = 2.0f |
| float AWeaponFramework::DrawDebugPointSize = 16.0f |
| float AWeaponFramework::DrawDebugTime = 2.0f |
|
protected |
|
protected |
| FLinearColor AWeaponFramework::MainTraceColor = FLinearColor(0.9f, 0.1f, 0.1f) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
| float AWeaponFramework::TraceDistanceTooClose = 0.075f |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |