From: terencehill Date: Mon, 25 Apr 2022 23:35:31 +0000 (+0200) Subject: Remove an uneeded strcpy X-Git-Tag: xonotic-v0.8.5~53 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=825a35d83aad07d5181d06f2917aecba77ceabd7;p=xonotic%2Fxonotic-data.pk3dir.git Remove an uneeded strcpy --- diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 70d57beef..0b1b96880 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -1966,7 +1966,7 @@ void SetMovetypeFollow(entity ent, entity e) 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 - strcpy(ent.aiment_classname, e.classname); + ent.aiment_classname = e.classname; ent.aiment_deadflag = e.deadflag; if(IS_PLAYER(ent.aiment)) @@ -1982,7 +1982,7 @@ void UnsetMovetypeFollow(entity ent) { set_movetype(ent, MOVETYPE_FLY); PROJECTILE_MAKETRIGGER(ent); - strfree(ent.aiment_classname); + ent.aiment_classname = string_null; // FIXME: engine bug? // resetting aiment the engine will set orb's origin close to world's origin //ent.aiment = NULL;