retval=GetSurfaceAnim(surface);
The engine gives a special ID number to each surface playing an animation. The number starts at 1 and ends at the number of surface anims currently being played. GetSurfaceAnim() returns this ID number when given one of the surfaces. This number is useless except to show that the surface does have a playing anim.