- do not allow summon CCMD to spawn abstract classes

This commit is contained in:
Christoph Oelckers 2019-12-12 02:13:19 +01:00
parent 165d9951aa
commit bf8305062a

View file

@ -707,6 +707,11 @@ static void SummonActor (int command, int command2, FCommandLine argv)
Printf ("Unknown actor '%s'\n", argv[1]); Printf ("Unknown actor '%s'\n", argv[1]);
return; return;
} }
if (type->bAbstract)
{
Printf("Cannot instantiate abstract class %s\n", argv[1]);
return;
}
Net_WriteByte (argv.argc() > 2 ? command2 : command); Net_WriteByte (argv.argc() > 2 ? command2 : command);
Net_WriteString (type->TypeName.GetChars()); Net_WriteString (type->TypeName.GetChars());