Fix type casting and PlayerState struct
Merge pull request #28 from captdeaf/master

Fix type casting and PlayerState struct