Server: Added quick-and-dirty 'spawn' command. E.g. 'sv spawn monster_laidlaw'

This commit is contained in:
Marco Cawthorne 2022-07-17 20:45:50 -07:00
parent 4566d07313
commit 0d2e0627d4
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 18 additions and 0 deletions

View File

@ -628,6 +628,24 @@ ConsoleCmd(string cmd)
NSEntity ent = (NSEntity)a;
ent.Respawn();
}
break;
case "spawn":
entity unit = spawn();
unit.classname = strcat("spawnfunc_", argv(1));
self = unit;
callfunction(self.classname);
self = pl;
makevectors(pl.v_angle);
if (unit.identity == 1) {
NSEntity ent = (NSEntity)unit
ent.Respawn();
}
traceline(pl.origin, pl.origin + (v_forward * 1024), MOVE_NORMAL, pl);
setorigin(unit, trace_endpos);
break;
#ifdef BOT_INCLUDED
case "way":