]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/resources.qh
Merge branch 'master' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / resources.qh
index 6a54bf2e86aa60287bdcf2cc5932fe41ae549f6b..f93db58fc324387b97b50e69da7e8f3319049a9d 100644 (file)
@@ -19,14 +19,21 @@ float GetResourceLimit(entity e, int res_type);
 /// \param[in] e Entity to check.
 /// \param[in] res_type Type of the resource (a RES_* constant).
 /// \return Current amount of resource the given entity has.
-float GetResourceAmount(entity e, int res_type);
+float GetResource(entity e, int res_type);
+
+/// \brief Sets the resource amount of an entity without calling any hooks.
+/// \param[in,out] e Entity to adjust.
+/// \param[in] res_type Type of the resource (a RES_* constant).
+/// \param[in] amount Amount of resource to set.
+/// \return Boolean for whether the ammo amount was changed
+bool SetResourceExplicit(entity e, int res_type, float amount);
 
 /// \brief Sets the current amount of resource the given entity will have.
 /// \param[in,out] e Entity to adjust.
 /// \param[in] res_type Type of the resource (a RES_* constant).
 /// \param[in] amount Amount of resource to set.
 /// \return No return.
-void SetResourceAmount(entity e, int res_type, float amount);
+void SetResource(entity e, int res_type, float amount);
 
 /// \brief Gives an entity some resource.
 /// \param[in,out] receiver Entity to give resource to.