void dynlight_think(entity this)
{
if(!this.owner)
- remove(this);
+ delete(this);
this.nextthink = time + 0.1;
}
if (!this.target)
objerror (this, "dynlight: no target to follow");
- targ = find(world, targetname, this.target);
- this.movetype = MOVETYPE_FOLLOW;
+ targ = find(NULL, targetname, this.target);
+ set_movetype(this, MOVETYPE_FOLLOW);
this.aiment = targ;
this.owner = targ;
this.punchangle = targ.angles;
if (!this.target)
objerror (this, "dynlight: no target to follow");
- targ = find(world, targetname, this.target);
+ targ = find(NULL, targetname, this.target);
this.target = targ.target;
- setorigin (this, targ.origin);
+ setorigin(this, targ.origin);
setthink(this, train_next);
this.nextthink = time + 0.1;
}
if (!this.target)
objerror (this, "dynlight: no target to follow");
- targ = find(world, targetname, this.target);
+ targ = find(NULL, targetname, this.target);
setattachment(this, targ, this.dtagname);
this.owner = targ;
setthink(this, dynlight_think);
this.lefty = this.light_lev;
this.use = dynlight_use;
setsize (this, '0 0 0', '0 0 0');
- setorigin (this, this.origin);
+ setorigin(this, this.origin);
//this.pflags = PFLAGS_FULLDYNAMIC;
this.solid = SOLID_NOT;
//this.blocked = func_null;
if (this.target)
// if (!(this.spawnflags & DFOLLOW))
{
- this.movetype = MOVETYPE_NOCLIP;
+ set_movetype(this, MOVETYPE_NOCLIP);
if (!this.speed)
this.speed = 100;
InitializeEntity(this, dynlight_find_path, INITPRIO_FINDTARGET);