Use the gpGlobals->time variable(if I remeber correct) the get correct timing between the frames, also for the first case try to change the "if (m_flDelay == 1)", to "if (m_flDelay >= 1)". Sinse this seems to be float variable the chance to be 1.00001 or something like that is big.