.float aiment_deadflag;
void SetMovetypeFollow(entity ent, entity e)
{
- // FIXME this may not be warpzone aware
set_movetype(ent, MOVETYPE_FOLLOW); // make the hole follow
ent.solid = SOLID_NOT; // MOVETYPE_FOLLOW is always non-solid - this means this cannot be teleported by warpzones any more! Instead, we must notice when our owner gets teleported.
ent.aiment = e; // make the hole follow bmodel
ent.punchangle = e.angles; // the original angles of bmodel
ent.view_ofs = ent.origin - e.origin; // relative origin
ent.v_angle = ent.angles - e.angles; // relative angles
- ent.aiment_classname = strzone(e.classname);
+ strcpy(ent.aiment_classname, e.classname);
ent.aiment_deadflag = e.deadflag;
if(IS_PLAYER(ent.aiment))
{
set_movetype(ent, MOVETYPE_FLY);
PROJECTILE_MAKETRIGGER(ent);
- if (ent.aiment_classname)
- strunzone(ent.classname);
+ strfree(ent.aiment_classname);
// FIXME: engine bug?
// resetting aiment the engine will set orb's origin close to world's origin
//ent.aiment = NULL;