]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove an uneeded strcpy
authorterencehill <piuntn@gmail.com>
Mon, 25 Apr 2022 23:35:31 +0000 (01:35 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 25 Apr 2022 23:35:31 +0000 (01:35 +0200)
qcsrc/common/util.qc

index 70d57beefb762909e4c87dab55615da98cf8aa7f..0b1b96880dc93985a6711c17a80183a795de0495 100644 (file)
@@ -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;