// =========================== Hook handlers =================================
-void PlayerTemplate_PlayerSpawn(entity player, string template)
+void PlayerTemplateHook_PlayerSpawn(entity player, string template)
{
if (template == "default")
{
}
}
-bool PlayerTemplate_ForbidThrowCurrentWeapon(string template)
+bool PlayerTemplateHook_ForbidThrowCurrentWeapon(string template)
{
return !PlayerTemplate_GetFloatValue(template, "drop_weapons");
}
-float PlayerTemplate_PlayerRegen(entity player, string template)
+float PlayerTemplateHook_PlayerRegen(entity player, string template)
{
if (template == "default")
{
return false;
}
-float PlayerTemplate_ItemTouch(entity player, entity item, string template)
+float PlayerTemplateHook_ItemTouch(entity player, entity item, string template)
{
if (template == "default")
{
return MUT_ITEMTOUCH_CONTINUE;
}
-float PlayerTemplate_Damage_Calculate(entity attacker, string attackertemplate,
- entity victim, string victimtemplate, float deathtype, float damage)
+float PlayerTemplateHook_Damage_Calculate(entity attacker,
+ string attackertemplate, entity victim, string victimtemplate,
+ float deathtype, float damage)
{
if (autocvar_g_instagib == 1)
{
return damage;
}
-void PlayerTemplate_PlayerDies(entity player, string template)
+void PlayerTemplateHook_PlayerDies(entity player, string template)
{
if (template == "default")
{
/// \param[in,out] player Player to setup.
/// \param[in] template Name of the template.
/// \return No return.
-void PlayerTemplate_PlayerSpawn(entity player, string template);
+void PlayerTemplateHook_PlayerSpawn(entity player, string template);
/// \brief Forbids weapon dropping according to the given template.
/// \param[in] template Name of the template.
/// \return Value to pass to mutator hook.
-bool PlayerTemplate_ForbidThrowCurrentWeapon(string template);
+bool PlayerTemplateHook_ForbidThrowCurrentWeapon(string template);
/// \brief Regenerates player health according to the given template.
/// \param[in] player Player to regenerate.
/// \param[in] template Name of the template.
/// \return Value to pass to mutator hook.
-float PlayerTemplate_PlayerRegen(entity player, string template);
+float PlayerTemplateHook_PlayerRegen(entity player, string template);
/// \brief Gives player items according to the given template.
/// \param[in,out] player Player to give items to.
/// \param[in] item Item which player has picked up.
/// \param[in] template Name of the template.
/// \return Enum value to pass to mutator hook.
-float PlayerTemplate_ItemTouch(entity player, entity item, string template);
+float PlayerTemplateHook_ItemTouch(entity player, entity item, string template);
/// \brief Changes the damage done using templates' attack and defense scales.
/// \param[in] attacke Attacker entity.
/// \param[in] deathtype Type of the damage.
/// \param[in] damage Damage to adjust.
/// \return Adjusted damage.
-float PlayerTemplate_Damage_Calculate(entity attacker, string attackertemplate,
- entity victim, string victimtemplate, float deathtype, float damage);
+float PlayerTemplateHook_Damage_Calculate(entity attacker,
+ string attackertemplate, entity victim, string victimtemplate,
+ float deathtype, float damage);
/// \brief Strips the player of their weapons if the player is not allowed to
/// drop them.
/// \param[in] template Name of the template.
/// \return No return.
/// \note You must hook with CBC_ORDER_FIRST in order for this to be effective.
-void PlayerTemplate_PlayerDies(entity player, string template);
+void PlayerTemplateHook_PlayerDies(entity player, string template);