]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/lms/sv_lms.qc
Add a new function to copy fields from items to replacements, fixes #2792
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / lms / sv_lms.qc
index 947111a08f66e80c566c4c5cc92ad0dd9d409bb4..7b41f98249ca471a7b0caf8e4dc98eab917c6e94 100644 (file)
@@ -674,10 +674,9 @@ MUTATOR_HOOKFUNCTION(lms, OnEntityPreSpawn)
        entity e = spawn();
        setthink(e, lms_extralife);
 
+       Item_CopyFields(ent, e);
+
        e.nextthink = time + 0.1;
-       e.spawnflags = ent.spawnflags;
-       e.noalign = ent.noalign;
-       setorigin(e, ent.origin);
 
        return true;
 }