]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix an harmless typo, improve Take/GiveResource hooks comments
authorterencehill <piuntn@gmail.com>
Mon, 4 Feb 2019 17:10:25 +0000 (18:10 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 4 Feb 2019 17:10:25 +0000 (18:10 +0100)
qcsrc/common/gamemodes/gamemode/onslaught/sv_controlpoint.qc
qcsrc/server/mutators/events.qh

index 4617d6a3ca1e711b5371c0cc0e960343311fca0f..fde9ed6fd7a8c5a058dc756eeada0cf842868693 100644 (file)
@@ -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;
 }
index eec3317c02cdefaca99abebd02e078f22279742c..ff8928c98ee3499b93bec94be03c5f4fecf660e9 100644 (file)
@@ -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) \