From b182a4ef1a0f182de735ead3a3401ac75e544417 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 10 Aug 2019 19:06:53 +1000 Subject: [PATCH] Allow personal points to save buffs --- qcsrc/server/cheats.qc | 4 ++++ qcsrc/server/compat/quake3.qc | 1 + 2 files changed, 5 insertions(+) diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index c2dbb7411..1acab9c00 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -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; diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index f96825132..2917a742a 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -7,6 +7,7 @@ #include #include #include +#include #include //*********************** -- 2.39.2