Server: Added quick-and-dirty 'spawn' command. E.g. 'sv spawn monster_laidlaw'
This commit is contained in:
parent
4566d07313
commit
0d2e0627d4
1 changed files with 18 additions and 0 deletions
|
@ -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":
|
||||
|
|
Loading…
Reference in a new issue