Subversion Repositories Games.Carmageddon

Rev

Rev 20 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20 Rev 21
Line 1334... Line 1334...
1334
// IDA: void __usercall ReceivedHeadup(tNet_contents *pContents@<EAX>)
1334
// IDA: void __usercall ReceivedHeadup(tNet_contents *pContents@<EAX>)
1335
void ReceivedHeadup(tNet_contents* pContents) {
1335
void ReceivedHeadup(tNet_contents* pContents) {
1336
    LOG_TRACE("(%p)", pContents);
1336
    LOG_TRACE("(%p)", pContents);
1337
 
1337
 
1338
    if (gProgram_state.racing) {
1338
    if (gProgram_state.racing) {
1339
        NewTextHeadupSlot(4, 0, 3000, -4, pContents->data.headup.text);
1339
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, pContents->data.headup.text);
1340
    }
1340
    }
1341
}
1341
}
1342
 
1342
 
1343
// IDA: void __usercall ReceivedHostQuery(tNet_contents *pContents@<EAX>, tNet_message *pMessage@<EDX>)
1343
// IDA: void __usercall ReceivedHostQuery(tNet_contents *pContents@<EAX>, tNet_message *pMessage@<EDX>)
1344
void ReceivedHostQuery(tNet_contents* pContents, tNet_message* pMessage) {
1344
void ReceivedHostQuery(tNet_contents* pContents, tNet_message* pMessage) {
Line 1664... Line 1664...
1664
                strcat(s, " ");
1664
                strcat(s, " ");
1665
                strcat(s, GetMiscString(kMiscString_IS_NO_LONGER_RESPONDING));
1665
                strcat(s, GetMiscString(kMiscString_IS_NO_LONGER_RESPONDING));
1666
                NetSendHeadupToAllPlayers(s);
1666
                NetSendHeadupToAllPlayers(s);
1667
                KickPlayerOut(gNet_players[i].ID);
1667
                KickPlayerOut(gNet_players[i].ID);
1668
                if (gProgram_state.racing) {
1668
                if (gProgram_state.racing) {
1669
                    NewTextHeadupSlot(4, 0, 3000, -4, s);
1669
                    NewTextHeadupSlot(eHeadupSlot_misc, 0, 3000, -4, s);
1670
                }
1670
                }
1671
            }
1671
            }
1672
        }
1672
        }
1673
    } else if (!gHost_died && gNumber_of_net_players != 0 && gNet_players[0].last_heard_from_him != 0 && the_time - gNet_players[0].last_heard_from_him >= 20000) {
1673
    } else if (!gHost_died && gNumber_of_net_players != 0 && gNet_players[0].last_heard_from_him != 0 && the_time - gNet_players[0].last_heard_from_him >= 20000) {
1674
        HostHasBittenTheDust(91);
1674
        HostHasBittenTheDust(91);
Line 1829... Line 1829...
1829
    }
1829
    }
1830
    pMessage->sender = gLocal_net_ID;
1830
    pMessage->sender = gLocal_net_ID;
1831
    pMessage->senders_time_stamp = PDGetTotalTime();
1831
    pMessage->senders_time_stamp = PDGetTotalTime();
1832
    if (gNext_guarantee >= COUNT_OF(gGuarantee_list)) {
1832
    if (gNext_guarantee >= COUNT_OF(gGuarantee_list)) {
1833
        sprintf(buffer, "Guarantee list full %d", pMessage->contents.header.type);
1833
        sprintf(buffer, "Guarantee list full %d", pMessage->contents.header.type);
1834
        NewTextHeadupSlot(4, 0, 500, -1, buffer);
1834
        NewTextHeadupSlot(eHeadupSlot_misc, 0, 500, -1, buffer);
1835
        pMessage->guarantee_number = 0;
1835
        pMessage->guarantee_number = 0;
1836
        return 0;
1836
        return 0;
1837
    }
1837
    }
1838
    pMessage->guarantee_number = gGuarantee_number;
1838
    pMessage->guarantee_number = gGuarantee_number;
1839
    gGuarantee_list[gNext_guarantee].guarantee_number = gGuarantee_number;
1839
    gGuarantee_list[gNext_guarantee].guarantee_number = gGuarantee_number;