Character walking is fixed, using the new Movement Component State model.
This commit is contained in:
@@ -575,6 +575,23 @@ UK2Node_FormatLogMessage::UK2Node_FormatLogMessage(const FObjectInitializer& Obj
|
||||
|
||||
void UK2Node_FormatMessage::FormatLogMessageInternal(UObject *Context, ElxLogVerbosity Verbosity, const FString &InPattern, TArray<FFormatArgumentData> InArgs)
|
||||
{
|
||||
// For throttled verbosity levels, suppress repeated messages with the
|
||||
// same format pattern. We key on the blueprint name + format pattern,
|
||||
// and allow at most one message per second per key.
|
||||
//
|
||||
if (Verbosity == ElxLogVerbosity::ThrottledDisplay || Verbosity == ElxLogVerbosity::ThrottledLog)
|
||||
{
|
||||
static TMap<FString, double> LastLogTime;
|
||||
double Now = FPlatformTime::Seconds();
|
||||
FString Key = Context->GetClass()->GetName() + TEXT("::") + InPattern;
|
||||
double &Last = LastLogTime.FindOrAdd(Key, 0.0);
|
||||
if (Now - Last < 1.0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Last = Now;
|
||||
}
|
||||
|
||||
// Generate the formatted string.
|
||||
//
|
||||
FText InPatternText(FText::FromString(InPattern));
|
||||
|
||||
Reference in New Issue
Block a user