Open SeriousBuggie opened 2 months ago
Better test case:
class MyActor expands Actor;
function Tmp() {
Target = Spawn(class'MyActor', self);
Spawn(class'MyActor', self).Test();
Target = Spawn(class'MyActor', self).Test().Test().Test();
Spawn(class'MyActor', self).Target = None;
Spawn(class'MyActor', self).Target = Spawn(class'MyActor', self);
Spawn(class'MyActor', self).Target = Spawn(class'MyActor', self).Test().Test().Test();
DrawScale = 42;
}
function MyActor Test() {
return self;
}
Caused by special case - function Spawn:
//
// Spawn an actor. Returns an actor of the specified class, not
// of class Actor (this is hardcoded in the compiler). Returns None
// if the actor could not be spawned (either the actor wouldn't fit in
// the specified location, or the actor list is full).
// Defaults to spawning at the spawner's location.
//
native(278) final function actor Spawn
(
class<actor> SpawnClass,
Reproduce:
function Tmp() { Target = Spawn(class'MyActor', self).Test(); }
function MyActor Test() { return self; }
If there no assign value, but few methods calls it failed too: