newnet: Try to synch GAME_RESEARCHSTATUS and GAME_RESEARCH.
parent
75dc05226c
commit
c42c9a276a
|
@ -3194,6 +3194,7 @@ static void NETallowJoining(void)
|
|||
NETstring(GamePassword, sizeof(GamePassword));
|
||||
NETint32_t(&Hash_Data); // NETCODE_HASH, not currently used
|
||||
NETend();
|
||||
NETpop(NETnetTmpQueue(i));
|
||||
|
||||
index = NET_CreatePlayer(name);
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@ Remove bMultiPlayer and turnOffMultiMsg() hacks, cleaning up any duplicate or de
|
|||
*************
|
||||
Fix the extra droid explosion effects after a droid dies, but before the GAME_DROIDDEST message that gives the droid permission to really die. Actually, maybe the GAME_DROIDDEST, GAME_STRUCTDEST and GAME_FEATUREDEST should be turned into just synch messages, and stuff should be removed as soon as destroyed.
|
||||
|
||||
Fix production completed and research completed sounds.
|
||||
|
||||
********************
|
||||
* src/structure.c: *
|
||||
********************
|
||||
|
@ -31,3 +33,7 @@ Fix kf_CloneSelected.
|
|||
*************
|
||||
Check that this file doesn't modify droids directly...
|
||||
|
||||
******************
|
||||
* src/research.c *
|
||||
******************
|
||||
Check the researchResult function. Should a message be sent there, and if so, then should wait for it?
|
|
@ -6163,6 +6163,15 @@ static BOOL setResearchStats(BASE_OBJECT *psObj, BASE_STATS *psStats)
|
|||
//initialise the subject
|
||||
psResFacilty->psSubject = NULL;
|
||||
|
||||
if (bMultiMessages)
|
||||
{
|
||||
// Say that we want to do reseach [sic].
|
||||
sendReseachStatus(psBuilding, ((RESEARCH *)psStats)->ref - REF_RESEARCH_START, selectedPlayer, true);
|
||||
//stop the button from flashing once a topic has been chosen
|
||||
stopReticuleButtonFlash(IDRET_RESEARCH);
|
||||
return true;
|
||||
}
|
||||
|
||||
//set up the player_research
|
||||
if (psStats != NULL)
|
||||
{
|
||||
|
|
|
@ -617,7 +617,7 @@ BOOL recvMessage(void)
|
|||
//case GAME_FEATUREDEST: //29 down, 13 to go.
|
||||
//case NET_PING:
|
||||
case GAME_DEMOLISH:
|
||||
case GAME_RESEARCH:
|
||||
//case GAME_RESEARCH: //30 down, 12 to go.
|
||||
//case NET_OPTIONS:
|
||||
//case NET_PLAYERRESPONDING:
|
||||
//case NET_COLOURREQUEST:
|
||||
|
@ -629,7 +629,7 @@ BOOL recvMessage(void)
|
|||
case GAME_ALLIANCE:
|
||||
//case NET_KICK:
|
||||
//case NET_FIREUP:
|
||||
case GAME_RESEARCHSTATUS:
|
||||
//case GAME_RESEARCHSTATUS://31 down, 11 to go.
|
||||
//case NET_PLAYER_STATS:
|
||||
//case NET_...: // 22 down, 20 to go.
|
||||
{
|
||||
|
|
|
@ -1127,6 +1127,7 @@ void researchResult(UDWORD researchIndex, UBYTE player, BOOL bDisplay, STRUCTURE
|
|||
ASSERT( researchIndex < numResearch, "researchResult: invalid research index" );
|
||||
|
||||
sendReseachStatus(NULL, researchIndex, player, false);
|
||||
// Confused whether we should wait for our message before doing anything, and confused what this function does...
|
||||
|
||||
MakeResearchCompleted(&pPlayerRes[researchIndex]);
|
||||
|
||||
|
@ -1964,6 +1965,13 @@ void cancelResearch(STRUCTURE *psBuilding)
|
|||
|
||||
if (psBuilding->pStructureType->type == REF_RESEARCH)
|
||||
{
|
||||
if (bMultiMessages)
|
||||
{
|
||||
// Tell others that we want to stop reseaching [sic] something.
|
||||
sendReseachStatus(NULL, topicInc, psBuilding->player, false);
|
||||
return; // Wait for our message before doing anything. (Whatever this function does...)
|
||||
}
|
||||
|
||||
//check if waiting to accrue power
|
||||
if (psResFac->timeStarted == ACTION_START_TIME)
|
||||
{
|
||||
|
@ -1986,7 +1994,6 @@ void cancelResearch(STRUCTURE *psBuilding)
|
|||
MakeResearchCancelled(pPlayerRes);
|
||||
}
|
||||
|
||||
sendReseachStatus(psBuilding, topicInc, psBuilding->player, false);
|
||||
|
||||
// Initialise the research facility's subject
|
||||
psResFac->psSubject = NULL;
|
||||
|
|
|
@ -3407,6 +3407,7 @@ static void aiUpdateStructure(STRUCTURE *psStructure, bool mission)
|
|||
if(bMultiMessages)
|
||||
{
|
||||
SendResearch(psStructure->player, pSubject->ref - REF_RESEARCH_START, true);
|
||||
return; // Wait for our message before adding the research.
|
||||
}
|
||||
|
||||
//store the last topic researched - if its the best
|
||||
|
|
Loading…
Reference in New Issue