 |
|  |
 |
|
kaan
|
|
Aarhus
Mar 2001 time: 05:21
|
|
This might be the solution for bug #30
"* Network object bookkeeping gets cleared when exiting a game (exiting and rejoining occasionally left something lying around, resulting in a resync not long after joining)"
code:
void Network::RemovePlayer(uint16 id)
{
DPRINTF(k_DBG_NET, ("Removing player %d\n", id));
if(id == m_pid) {
SessionLost();
#if !defined(ACTIVISION_ORIGINAL) // possible bug 30 solution
// removing object bookkeeping
if (m_gameObjects) delete m_gameObjects;
#endif
}
...
-klaus
Attachment: network.zip
This has been downloaded 0 time(s).
|
|
|  |
 |
|  |
 |
|
kaan
|
|
Aarhus
Mar 2001 time: 05:21
|
|
possible bug 21 solution "* Added extra checks to disable science victory in network games"
code:
#if defined(ACTIVISION_ORIGINAL)
if (GetGaiaController()->TurnsToComplete() == 0)
{
GameOver(GAME_OVER_WON_SCIENCE, -1);
}
}
#else // possible bug 21 solution
if (!g_network.IsActive() && GetGaiaController()->TurnsToComplete() == 0)
{
GameOver(GAME_OVER_WON_SCIENCE, -1);
}
#endif
code:
case GAME_OVER_WON_SCIENCE:
#if defined(ACTIVISION_ORIGINAL)
GenerateDescriptionString(TRUE);
m_hasWonTheGame = TRUE;
for(i = 1; i < k_MAX_PLAYERS; i++) {
if(g_player[i] && !g_player[i]->m_isDead && i != m_owner) {
if(!g_network.IsClient()) {
g_player[i]->GameOver(GAME_OVER_LOST_SCIENCE, -1);
}
}
}
#else // possible bug 21 solution
if (!g_network.IsActive()) {
GenerateDescriptionString(TRUE);
m_hasWonTheGame = TRUE;
for(i = 1; i < k_MAX_PLAYERS; i++) {
if(g_player[i] && !g_player[i]->m_isDead && i != m_owner) {
if(!g_network.IsClient()) {
g_player[i]->GameOver(GAME_OVER_LOST_SCIENCE, -1);
}
}
}
}
#endif
Both codesnippets are from the Player class.
Attachment: player.zip
This has been downloaded 0 time(s).
|
|
|  |
 |
|
kaan
|
|
Aarhus
Mar 2001 time: 05:21
|
|
I have been looking at the code for where battle takes place and I found it, but what I havent found is even the slightest bit of networking code relating to battle. Did any of you stumple upon anything that might be usefull?
|
|
|  |
All times are GMT. The time now is 05:21. Apolyton Time is 00:21. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|