Use ToPlayer() instead of C casts. Don't use C casts.