How do I prevent the character from sprinting when the stamina value is 0?

Okay, so where is the recharge mechanic that temporarily disables sprinting until its requirement is fulfilled?

(See: STAMINA_DELAY_EVENT)