Revert de3512a..a341ddd

This rolls back to commit de3512ab0f803c89904647aac69454bbcebe574f.
Revert b1604c6..0aa711e

This rolls back to commit b1604c67ce63ba8a37a8c1015ebe97ddf412fc88.
Revert a341ddd..fa8bfe0

This rolls back to commit a341ddd323a2e8e33756744bf04cd305bc4f79c4.
Added ai_frame_count back in. AI working again.