Add default infinite value for TF2_AddCondition duration (nobug, r=asherkin).

This commit is contained in:
Nicholas Hastings 2014-03-21 12:03:49 -04:00
parent d6bbb765c1
commit 0e6cbf989e

View File

@ -155,6 +155,8 @@ enum TFCond
TFCond_HalloweenGhostMode, TFCond_HalloweenGhostMode,
}; };
const Float:TFCondDuration_Infinite = -1.0;
enum TFHoliday enum TFHoliday
{ {
TFHoliday_Birthday = 1, TFHoliday_Birthday = 1,
@ -217,11 +219,12 @@ native TF2_RegeneratePlayer(client);
* @param client Player's index. * @param client Player's index.
* @param condition Integer identifier of condition to apply. * @param condition Integer identifier of condition to apply.
* @param duration Duration of condition (does not apply to all conditions). * @param duration Duration of condition (does not apply to all conditions).
* Pass TFCondDuration_Infinite to apply until manually removed.
* @param inflictor Condition inflictor's index (0 for no inflictor). * @param inflictor Condition inflictor's index (0 for no inflictor).
* @noreturn * @noreturn
* @error Invalid client index, client not in game, or no mod support. * @error Invalid client index, client not in game, or no mod support.
*/ */
native TF2_AddCondition(client, TFCond:condition, Float:duration, inflictor=0); native TF2_AddCondition(client, TFCond:condition, Float:duration=TFCondDuration_Infinite, inflictor=0);
/** /**
* Removes a condition from a player * Removes a condition from a player