From: Mario Date: Sat, 10 Aug 2019 09:06:53 +0000 (+1000) Subject: Allow personal points to save buffs X-Git-Tag: xonotic-v0.8.5~1389^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b182a4ef1a0f182de735ead3a3401ac75e544417;p=xonotic%2Fxonotic-data.pk3dir.git Allow personal points to save buffs --- 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 //***********************