So we got a (pretty rare) crash on our dedicated servers where it would incorrectly execute a client RPC call.
I’ve traced the issue down to the following code. GAllowActorScriptExecutionInEditor is true in this case. But… why are we even checking a bool that is supposed to gate logic in the editor?
Shouldn’t this check be wrapped behind a #if WITH_EDITOR pragma? Or…is it a poorly worded global variable???
//
// Return whether a function should be executed remotely.
//
int32 AActor::GetFunctionCallspace( UFunction* Function, FFrame* Stack )
{
if (GAllowActorScriptExecutionInEditor)
{
// Call local, this global is only true when we know it's being called on an editor-placed object
DEBUG_CALLSPACE(TEXT("GetFunctionCallspace ScriptExecutionInEditor: %s"), *Function->GetName());
return FunctionCallspace::Local;
}
[Attachment Removed]