diff --git a/sources/Commands/ACommandSpawn.uc b/sources/Commands/ACommandSpawn.uc index c1af4a6..dfd6fb6 100644 --- a/sources/Commands/ACommandSpawn.uc +++ b/sources/Commands/ACommandSpawn.uc @@ -32,11 +32,11 @@ protected function BuildData(CommandDataBuilder builder) { builder.Name(P("spawn")).Group(P("debug")) .Summary(P("Spawns new entity on the map.")); - builder.ParamText(P("template")) + builder.ParamText(P("template"),, P("entity")) .Describe(P("Spawns new entity based on the given template at the point" @ "player is currently looking at.")); builder.SubCommand(P("at")) - .ParamText(P("template")) + .ParamText(P("template"),, P("entity")) .ParamNumber(P("x")) .ParamNumber(P("y")) .ParamNumber(P("z")) @@ -50,18 +50,11 @@ protected function Executed( CallData arguments, EPlayer instigator) { - local Text givenTemplate, template; + local Text template; local Vector spawnLocation; announcer.Setup(none, instigator, othersConsole); - givenTemplate = arguments.parameters.GetText(P("template")); - if (givenTemplate.StartsWithS("$")) { - template = _.alias.ResolveEntity(givenTemplate, true); - } - else { - template = givenTemplate.Copy(); - } - _.memory.Free(givenTemplate); + template = arguments.parameters.GetText(P("template")); if (arguments.subCommandName.IsEmpty()) { SpawnInInstigatorSight(instigator, template); }