Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11 | Rev 18 | ||
---|---|---|---|
Line 1572... | Line 1572... | ||
1572 | } |
1572 | } |
1573 | 1573 | ||
1574 | // IDA: int __usercall ChooseStartRace@<EAX>(int *pRank@<EAX>) |
1574 | // IDA: int __usercall ChooseStartRace@<EAX>(int *pRank@<EAX>) |
1575 | int ChooseStartRace(int* pRank) { |
1575 | int ChooseStartRace(int* pRank) { |
1576 | LOG_TRACE("(%p)", pRank); |
1576 | LOG_TRACE("(%p)", pRank); |
- | 1577 | ||
1577 |
|
1578 | *pRank = 0; |
- | 1579 | return 1; |
|
1578 | } |
1580 | } |
1579 | 1581 | ||
1580 | // IDA: void __usercall SetUpOtherNetThings(tNet_game_details *pNet_game@<EAX>) |
1582 | // IDA: void __usercall SetUpOtherNetThings(tNet_game_details *pNet_game@<EAX>) |
1581 | void SetUpOtherNetThings(tNet_game_details* pNet_game) { |
1583 | void SetUpOtherNetThings(tNet_game_details* pNet_game) { |
1582 | LOG_TRACE("(%p)", pNet_game); |
1584 | LOG_TRACE("(%p)", pNet_game); |
Line 1602... | Line 1604... | ||
1602 | // IDA: int __cdecl PickARandomCar() |
1604 | // IDA: int __cdecl PickARandomCar() |
1603 | int PickARandomCar(void) { |
1605 | int PickARandomCar(void) { |
1604 | int i; |
1606 | int i; |
1605 | int cars[120]; |
1607 | int cars[120]; |
1606 | int array_size; |
1608 | int array_size; |
1607 | LOG_TRACE("()"); |
1609 | LOG_TRACE("()"); |
1608 | 1610 | ||
1609 | array_size = 0; |
1611 | array_size = 0; |
1610 | for (i = 0; i < gNumber_of_racers; i++) { |
1612 | for (i = 0; i < gNumber_of_racers; i++) { |
1611 | if (gCar_details[i].ownership == eCar_owner_none) { |
1613 | if (gCar_details[i].ownership == eCar_owner_none) { |
1612 | cars[array_size] = i; |
1614 | cars[array_size] = i; |
Line 1697... | Line 1699... | ||
1697 | } else { |
1699 | } else { |
1698 | if (*pCar_index < 0) { |
1700 | if (*pCar_index < 0) { |
1699 | *pCar_index = PickARandomCar(); |
1701 | *pCar_index = PickARandomCar(); |
1700 | car_index = 0; |
1702 | car_index = 0; |
1701 | for (i = 0; i < gNumber_of_racers; i++) { |
1703 | for (i = 0; i < gNumber_of_racers; i++) { |
1702 | if (gCar_details[i].ownership |
1704 | if (gCar_details[i].ownership < eCar_owner_not_allowed) { |
1703 | gProgram_state.cars_available[car_index] = i; |
1705 | gProgram_state.cars_available[car_index] = i; |
1704 | car_index++; |
1706 | car_index++; |
1705 | } |
1707 | } |
1706 | } |
1708 | } |
1707 | gProgram_state.number_of_cars = car_index; |
1709 | gProgram_state.number_of_cars = car_index; |
Line 1758... | Line 1760... | ||
1758 | DoFeatureUnavailableInDemo(); |
1760 | DoFeatureUnavailableInDemo(); |
1759 | return 0; |
1761 | return 0; |
1760 | } |
1762 | } |
1761 | 1763 | ||
1762 | if (gAusterity_mode) { |
1764 | if (gAusterity_mode) { |
1763 | NetFullScreenMessage( |
1765 | NetFullScreenMessage(kMiscString_NOT_ENOUGH_MEMORY, 0); |
1764 | return 0; |
1766 | return 0; |
1765 | } |
1767 | } |
1766 | if (NetInitialise()) { |
1768 | if (NetInitialise()) { |
1767 | SuspendPendingFlic(); |
1769 | SuspendPendingFlic(); |
1768 | DoErrorInterface(kMiscString_NetworkPlayIsNotAvailable); |
1770 | DoErrorInterface(kMiscString_NetworkPlayIsNotAvailable); |
Line 1812... | Line 1814... | ||
1812 | return 0; |
1814 | return 0; |
1813 | } else { |
1815 | } else { |
1814 | return 1; |
1816 | return 1; |
1815 | } |
1817 | } |
1816 | case eJoin_or_host_host: |
1818 | case eJoin_or_host_host: |
- | 1819 | #if defined(DETHRACE_FIX_BUGS) |
|
- | 1820 | /* Don't allow hosting a game when the game is launched with --no-bind */ |
|
- | 1821 | if (harness_game_config.no_bind) { |
|
- | 1822 | DoErrorInterface(76); |
|
- | 1823 | return 0; |
|
- | 1824 | } |
|
- | 1825 | #endif |
|
1817 | gProgram_state.frank_or_anniness = eFrankie; |
1826 | gProgram_state.frank_or_anniness = eFrankie; |
1818 | if (!OriginalCarmaCDinDrive()) { |
1827 | if (!OriginalCarmaCDinDrive()) { |
1819 | DoErrorInterface(kMiscString_PLEASE_INSERT_THE_CARMAGEDDON_CD); |
1828 | DoErrorInterface(kMiscString_PLEASE_INSERT_THE_CARMAGEDDON_CD); |
1820 | return 0; |
1829 | return 0; |
1821 | } |
1830 | } |