]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Merge branch 'master' into Mario/strength_stat_field
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index c2dbb741137651e6d9136febd727661abd765c8b..edec56a809a8dcc63fb822383b8c8a666bc54ba9 100644 (file)
@@ -161,12 +161,14 @@ 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;
                        this.personal.pauserotfuel_finished = this.pauserotfuel_finished;
                        this.personal.pauseregen_finished = this.pauseregen_finished;
-                       this.personal.strength_finished = this.strength_finished;
+                       STAT(STRENGTH_FINISHED, this.personal) = STAT(STRENGTH_FINISHED, this);
                        this.personal.invincible_finished = this.invincible_finished;
                        this.personal.teleport_time = time;
                        break; // this part itself doesn't cheat, so let's not count this
@@ -220,12 +222,14 @@ 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;
                                this.pauserotfuel_finished = time + this.personal.pauserotfuel_finished - this.personal.teleport_time;
                                this.pauseregen_finished = time + this.personal.pauseregen_finished - this.personal.teleport_time;
-                               this.strength_finished = time + this.personal.strength_finished - this.personal.teleport_time;
+                               STAT(STRENGTH_FINISHED, this) = time + STAT(STRENGTH_FINISHED, this.personal) - this.personal.teleport_time;
                                this.invincible_finished = time + this.personal.invincible_finished - this.personal.teleport_time;
 
                                if(!autocvar_g_allow_checkpoints)