]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow personal points to save buffs
authorMario <mario@smbclan.net>
Sat, 10 Aug 2019 09:06:53 +0000 (19:06 +1000)
committerMario <mario@smbclan.net>
Sat, 10 Aug 2019 09:06:53 +0000 (19:06 +1000)
qcsrc/server/cheats.qc
qcsrc/server/compat/quake3.qc

index c2dbb741137651e6d9136febd727661abd765c8b..1acab9c00535d647e18a26f1ba35ff55d0ba7cf2 100644 (file)
@@ -161,6 +161,8 @@ float CheatImpulse(entity this, int imp)
                        SetResource(this.personal, RES_HEALTH, max(1, GetResource(this, RES_HEALTH)));
                        SetResource(this.personal, RES_ARMOR, GetResource(this, RES_ARMOR));
                        STAT(WEAPONS, this.personal) = STAT(WEAPONS, this);
+                       STAT(BUFFS, this.personal) = STAT(BUFFS, this);
+                       STAT(BUFF_TIME, this.personal) = STAT(BUFF_TIME, this);
                        this.personal.items = this.items;
                        this.personal.pauserotarmor_finished = this.pauserotarmor_finished;
                        this.personal.pauserothealth_finished = this.pauserothealth_finished;
@@ -220,6 +222,8 @@ float CheatImpulse(entity this, int imp)
                                SetResource(this, RES_HEALTH, GetResource(this.personal, RES_HEALTH));
                                SetResource(this, RES_ARMOR, GetResource(this.personal, RES_ARMOR));
                                STAT(WEAPONS, this) = STAT(WEAPONS, this.personal);
+                               STAT(BUFFS, this) = STAT(BUFFS, this.personal);
+                               STAT(BUFF_TIME, this) = STAT(BUFF_TIME, this.personal);
                                this.items = this.personal.items;
                                this.pauserotarmor_finished = time + this.personal.pauserotarmor_finished - this.personal.teleport_time;
                                this.pauserothealth_finished = time + this.personal.pauserothealth_finished - this.personal.teleport_time;
index f96825132f12ef1ba0973b6b6a9296abae4bf54b..2917a742a6d9e59a0d5050ccc167404320ea7b0c 100644 (file)
@@ -7,6 +7,7 @@
 #include <common/t_items.qh>
 #include <common/mapobjects/triggers.qh>
 #include <common/mapobjects/trigger/counter.qh>
+#include <common/mutators/mutator/buffs/buffs.qh>
 #include <common/weapons/_all.qh>
 
 //***********************