92 if (HASBIT(face, 31)) SetBitT(ge, GENDER_FEMALE); |
92 if (HASBIT(face, 31)) SetBitT(ge, GENDER_FEMALE); |
93 if (HASBIT(face, 27) && (HASBIT(face, 26) == HASBIT(face, 19))) SetBitT(ge, ETHNICITY_BLACK); |
93 if (HASBIT(face, 27) && (HASBIT(face, 26) == HASBIT(face, 19))) SetBitT(ge, ETHNICITY_BLACK); |
94 |
94 |
95 SetPlayerFaceBits(pf, PFV_GEN_ETHN, ge, ge); |
95 SetPlayerFaceBits(pf, PFV_GEN_ETHN, ge, ge); |
96 SetPlayerFaceBits(pf, PFV_HAS_GLASSES, ge, GB(face, 28, 3) <= 1); |
96 SetPlayerFaceBits(pf, PFV_HAS_GLASSES, ge, GB(face, 28, 3) <= 1); |
97 SetPlayerFaceBits(pf, PFV_EYE_COLOUR, ge, clampu(GB(face, 20, 3), 5, 7) - 5); |
97 SetPlayerFaceBits(pf, PFV_EYE_COLOUR, ge, HASBIT(ge, ETHNICITY_BLACK) ? 0 : clampu(GB(face, 20, 3), 5, 7) - 5); |
98 SetPlayerFaceBits(pf, PFV_CHIN, ge, ScalePlayerFaceValue(PFV_CHIN, ge, GB(face, 4, 2))); |
98 SetPlayerFaceBits(pf, PFV_CHIN, ge, ScalePlayerFaceValue(PFV_CHIN, ge, GB(face, 4, 2))); |
99 SetPlayerFaceBits(pf, PFV_EYEBROWS, ge, ScalePlayerFaceValue(PFV_EYEBROWS, ge, GB(face, 6, 4))); |
99 SetPlayerFaceBits(pf, PFV_EYEBROWS, ge, ScalePlayerFaceValue(PFV_EYEBROWS, ge, GB(face, 6, 4))); |
100 SetPlayerFaceBits(pf, PFV_HAIR, ge, ScalePlayerFaceValue(PFV_HAIR, ge, GB(face, 16, 4))); |
100 SetPlayerFaceBits(pf, PFV_HAIR, ge, ScalePlayerFaceValue(PFV_HAIR, ge, GB(face, 16, 4))); |
101 SetPlayerFaceBits(pf, PFV_JACKET, ge, ScalePlayerFaceValue(PFV_JACKET, ge, GB(face, 20, 2))); |
101 SetPlayerFaceBits(pf, PFV_JACKET, ge, ScalePlayerFaceValue(PFV_JACKET, ge, GB(face, 20, 2))); |
102 SetPlayerFaceBits(pf, PFV_COLLAR, ge, ScalePlayerFaceValue(PFV_COLLAR, ge, GB(face, 22, 2))); |
102 SetPlayerFaceBits(pf, PFV_COLLAR, ge, ScalePlayerFaceValue(PFV_COLLAR, ge, GB(face, 22, 2))); |
476 p->share_owners[0] = p->share_owners[1] = p->share_owners[2] = p->share_owners[3] = PLAYER_SPECTATOR; |
482 p->share_owners[0] = p->share_owners[1] = p->share_owners[2] = p->share_owners[3] = PLAYER_SPECTATOR; |
477 |
483 |
478 p->avail_railtypes = GetPlayerRailtypes(p->index); |
484 p->avail_railtypes = GetPlayerRailtypes(p->index); |
479 p->avail_roadtypes = GetPlayerRoadtypes(p->index); |
485 p->avail_roadtypes = GetPlayerRoadtypes(p->index); |
480 p->inaugurated_year = _cur_year; |
486 p->inaugurated_year = _cur_year; |
481 p->face = ConvertFromOldPlayerFace(Random()); |
487 RandomPlayerFaceBits(p->face, (GenderEthnicity)Random(), false); // create a random player face |
482 |
488 |
483 /* Engine renewal settings */ |
489 /* Engine renewal settings */ |
484 p->engine_renew_list = NULL; |
490 p->engine_renew_list = NULL; |
485 p->renew_keep_length = false; |
491 p->renew_keep_length = false; |
486 p->engine_renew = false; |
492 p->engine_renew = false; |