Skip to content

Commit

Permalink
Add default infinite value for TF2_AddCondition duration (nobug, r=as…
Browse files Browse the repository at this point in the history
…herkin).
  • Loading branch information
psychonic committed Mar 21, 2014
1 parent d6bbb76 commit 0e6cbf9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/include/tf2.inc
Expand Up @@ -155,6 +155,8 @@ enum TFCond
TFCond_HalloweenGhostMode,
};

const Float:TFCondDuration_Infinite = -1.0;

enum TFHoliday
{
TFHoliday_Birthday = 1,
Expand Down Expand Up @@ -217,11 +219,12 @@ native TF2_RegeneratePlayer(client);
* @param client Player's index.
* @param condition Integer identifier of condition to apply.
* @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).
* @noreturn
* @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
Expand Down

0 comments on commit 0e6cbf9

Please sign in to comment.