-
Notifications
You must be signed in to change notification settings - Fork 7
Input buffer #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input buffer #260
Conversation
Source/GameBaseFramework/Private/Animation/GBFAnimNotifyState_InputBuffer.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Animation/GBFAnimNotifyState_InputBuffer.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Animation/GBFAnimNotifyState_InputBuffer.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
Outdated
Show resolved
Hide resolved
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 8 files at r1, 1 of 2 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 20 unresolved discussions (waiting on @Fr0oZzFred, @MaxDaniels, @ThibNach, and @VectorGamez)
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 8 at r3 (raw file):
#include "Input/GBFInputComponent.h" UGBFAbilityInputBufferComponent::UGBFAbilityInputBufferComponent( const FObjectInitializer & ObjectInitializer ) :
object_initializer
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 16 at r3 (raw file):
} void UGBFAbilityInputBufferComponent::TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction )
CS on function parameters
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 216 at r3 (raw file):
} FGameplayTag most_triggered_tag = triggered_tag_map.FindAndRemoveChecked( max );
you could use a TSortedMap
to avoid this code
Source/GameBaseFramework/Private/Characters/Components/GBFHeroComponent.cpp
line 227 at r3 (raw file):
} TMap< const UGBFInputConfig *, TArray< uint32 > > UGBFHeroComponent::GetBoundActionsByInputconfig() const
return by const XXX &
to avoid a copy
Source/GameBaseFramework/Private/GAS/Components/GBFAbilitySystemComponent.cpp
line 382 at r3 (raw file):
} UGameplayAbility * UGBFAbilitySystemComponent::FindAbilityClassWithInputTag( FGameplayTag input_tag )
FindAbilityByInputTag
Source/GameBaseFramework/Private/GAS/Components/GBFAbilitySystemComponent.cpp
line 382 at r3 (raw file):
} UGameplayAbility * UGBFAbilitySystemComponent::FindAbilityClassWithInputTag( FGameplayTag input_tag )
the function can be const
Source/GameBaseFramework/Public/Animation/GBFAnimNotifyState_InputBuffer.h
line 5 at r3 (raw file):
#include "Characters/Components/GBFAbilityInputBufferComponent.h" #include <Animation/AnimNotifies/AnimNotifyState.h>
<>
Source/GameBaseFramework/Public/Animation/GBFAnimNotifyState_InputBuffer.h
line 28 at r3 (raw file):
UPROPERTY( EditAnywhere ) ETriggerPriority TriggerPriority; UPROPERTY( EditAnywhere, Meta = ( Categories = "Input" ) )
missing empty line
Source/GameBaseFramework/Public/Characters/Components/GBFAbilityInputBufferComponent.h
line 17 at r3 (raw file):
UCLASS( Blueprintable ) class GAMEBASEFRAMEWORK_API UGBFAbilityInputBufferComponent : public UPawnComponent
final
Source/GameBaseFramework/Public/Characters/Components/GBFAbilityInputBufferComponent.h
line 24 at r3 (raw file):
UGBFAbilityInputBufferComponent( const FObjectInitializer & ObjectInitializer ); void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction ) override; UFUNCTION( BlueprintCallable )
empty line above
{ | ||
Super::TickComponent( DeltaTime, TickType, ThisTickFunction ); | ||
MonitoringTime += DeltaTime; | ||
if ( !ensureAlwaysMsgf( MonitoringTime <= MaxMonitoringTime, TEXT( "Ability Input Buffer didn't call Stop Monitor 5 secs after activation, please call it manually !" ) ) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print the actual MaxMonitoringTime instead of 5
this->PrimaryComponentTick.bCanEverTick = true; | ||
} | ||
|
||
void UGBFAbilityInputBufferComponent::TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the tick would only be fired #if !UE_BUILD_SHIPPING, you can surround the function by that too, both in .h and cpp
public: | ||
UGBFAbilityInputBufferComponent( const FObjectInitializer & ObjectInitializer ); | ||
void TickComponent( float DeltaTime, ELevelTick TickType, FActorComponentTickFunction * ThisTickFunction ) override; | ||
UFUNCTION( BlueprintCallable ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UFUNCTION before other functions, except for constructor and inline functions
@@ -38,4 +41,8 @@ class GAMEBASEFRAMEWORK_API UGBFAbilityInputBufferComponent : public UPawnCompon | |||
FGameplayTagContainer InputTagsToCheck; | |||
TArray< FGameplayTag > TriggeredTags; | |||
TArray< uint32 > BindHandles; | |||
}; | |||
|
|||
UPROPERTY( EditDefaultsOnly ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UPROPERTY before all other properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 14 unresolved discussions (waiting on @Fr0oZzFred, @MaxDaniels, and @ThibNach)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r4, all commit messages.
Reviewable status: all files reviewed, 12 unresolved discussions (waiting on @Fr0oZzFred, @MaxDaniels, and @ThibNach)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 12 unresolved discussions (waiting on @MaxDaniels, @TheEmidee, @ThibNach, and @VectorGamez)
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 8 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
object_initializer
Done.
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 16 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
CS on function parameters
Done.
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 16 at r3 (raw file):
Previously, VectorGamez (Viktor Blomme) wrote…
Since the tick would only be fired #if !UE_BUILD_SHIPPING, you can surround the function by that too, both in .h and cpp
Done.
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 20 at r3 (raw file):
Previously, VectorGamez (Viktor Blomme) wrote…
print the actual MaxMonitoringTime instead of 5
Done.
Source/GameBaseFramework/Private/Characters/Components/GBFAbilityInputBufferComponent.cpp
line 216 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
you could use a
TSortedMap
to avoid this code
Done.
Source/GameBaseFramework/Private/Characters/Components/GBFHeroComponent.cpp
line 227 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
return by
const XXX &
to avoid a copy
Done.
Source/GameBaseFramework/Private/GAS/Components/GBFAbilitySystemComponent.cpp
line 382 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
FindAbilityByInputTag
Done.
Source/GameBaseFramework/Private/GAS/Components/GBFAbilitySystemComponent.cpp
line 382 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
the function can be
const
Done.
Source/GameBaseFramework/Public/Animation/GBFAnimNotifyState_InputBuffer.h
line 5 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
<>
already done
Source/GameBaseFramework/Public/Animation/GBFAnimNotifyState_InputBuffer.h
line 28 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
missing empty line
Done.
Source/GameBaseFramework/Public/Characters/Components/GBFAbilityInputBufferComponent.h
line 17 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
final
Done.
Source/GameBaseFramework/Public/Characters/Components/GBFAbilityInputBufferComponent.h
line 24 at r3 (raw file):
Previously, TheEmidee (Michael Delva) wrote…
empty line above
Done.
Source/GameBaseFramework/Public/Characters/Components/GBFAbilityInputBufferComponent.h
line 24 at r3 (raw file):
Previously, VectorGamez (Viktor Blomme) wrote…
UFUNCTION before other functions, except for constructor and inline functions
Done.
Source/GameBaseFramework/Public/Characters/Components/GBFAbilityInputBufferComponent.h
line 45 at r3 (raw file):
Previously, VectorGamez (Viktor Blomme) wrote…
UPROPERTY before all other properties
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @MaxDaniels, @ThibNach, and @VectorGamez)
Add input buffer
This change is