Fixes inefficiency in Player::addState. Please read comments for more info on how to use properly.