Small timer code cleanup.
This commit is contained in:
		| @@ -38,13 +38,10 @@ ClassHealthRegenInitialize(client, Float:interval, amount, max) | ||||
|  | ||||
| ClassHealthRegenStart(client, Float:interval) | ||||
| { | ||||
|     // Kill the timer if it exist. | ||||
|     if (tHealthRegen[client] != INVALID_HANDLE) | ||||
|     { | ||||
|         KillTimer(tHealthRegen[client]); | ||||
|         tHealthRegen[client] = INVALID_HANDLE; | ||||
|     } | ||||
|     // Stop timer if it already exist. | ||||
|     ClassHealthRegenStop(client); | ||||
|      | ||||
|     // Create new timer. | ||||
|     tHealthRegen[client] = CreateTimer(interval, ClassHealthRegenTimer, client, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -140,12 +140,12 @@ new Float:VolPlayerCountDown[MAXPLAYERS + 1][ZR_VOLUMES_MAX]; | ||||
|  * | ||||
|  * Note: Some features may have its own timer for actions on players. | ||||
|  */ | ||||
| new Handle:hVolUpdateTimer; | ||||
| new Handle:hVolUpdateTimer = INVALID_HANDLE; | ||||
|  | ||||
| /** | ||||
|  * The handle for a timer that do count down on trigger delays. | ||||
|  */ | ||||
| new Handle:hVolTriggerTimer; | ||||
| new Handle:hVolTriggerTimer = INVALID_HANDLE; | ||||
|  | ||||
| /** | ||||
|  * Cached interval value for trigger timer. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user