unit: add isMainPlayer, fix some checks