From: terencehill Date: Mon, 4 Feb 2019 17:10:25 +0000 (+0100) Subject: Fix an harmless typo, improve Take/GiveResource hooks comments X-Git-Tag: xonotic-v0.8.5~1611 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=524d4927bc2dadf8d95d64db13ed4afa3a71b635;p=xonotic%2Fxonotic-data.pk3dir.git Fix an harmless typo, improve Take/GiveResource hooks comments --- diff --git a/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc b/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc index 4617d6a3c..fde9ed6fd 100644 --- a/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc +++ b/qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc @@ -36,5 +36,5 @@ void onslaught_controlpoint_icon_link(entity e, void(entity this) spawnproc) { Net_LinkEntity(e, true, 0, cpicon_send); setthink(e, spawnproc); - e.nextthink = time * sys_frametime; + e.nextthink = time + sys_frametime; } diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index eec3317c0..ff8928c98 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -733,7 +733,8 @@ of resource that is above resource limit so it was not given. */ MUTATOR_HOOKABLE(ResourceWasted, EV_ResourceWasted); /** Called when entity is being given some resource. See RES_* constants -for resource types. Return true to forbid giving. */ +for resource types. Return true to forbid giving. +NOTE: This hook is also called by GiveResourceWithLimit */ #define EV_GiveResource(i, o) \ /** receiver */ i(entity, MUTATOR_ARGV_0_entity) \ /** resource type */ i(int, MUTATOR_ARGV_1_int) \ @@ -757,7 +758,8 @@ RES_* constants for resource types. Return true to forbid giving. */ MUTATOR_HOOKABLE(GiveResourceWithLimit, EV_GiveResourceWithLimit); /** Called when some resource is being taken from an entity. See RES_* constants -for resource types. Return true to forbid giving. */ +for resource types. Return true to forbid giving. +NOTE: This hook is also called by TakeResourceWithLimit */ #define EV_TakeResource(i, o) \ /** receiver */ i(entity, MUTATOR_ARGV_0_entity) \ /** resource type */ i(int, MUTATOR_ARGV_1_int) \