Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
server crash bug
#7
That fix came out at a time when the server was crashing a lot becasue of problems on Holdouts end and then everyone just accepted that the server crashed at times and lived with it.

IsAlive() is just a boolean function. It returns true or false. If I remember right... IsAlive() returns false if the player has disconnected or dead as it should. IsAlive() shouldn't, in theory, make any changes to the game/player state by itself. If IsAilive() returns false, then Spawn() is called, where Spawn() checks if the player is connected or not and handles it.
But things don't always work out intuitively.

I woud try:

// the player is null and the blank name is default in this case...
// pseudo code because I don't remember the function names but something llike this...
if(!m_hCombatants[i]->null)
ThisArena->GameSate(GaveOver);

Put that in the right place and it should keep things from looping.

or:

// if the player is "dead" during the round countdown,
// then bring them back...
if(m_hCombatants[i]->m_bHasDisconnected == TRUE)
// don't execute rest of this code block...
return;

if(!m_hCombatants[i]->IsAlive())
m_hCombatants[i]->Spawn();

Put that in the right place and it should keep it from looping.

But before hacking anything, it would be better to test this theory. So download HPbot or something, edit the bot names list to be just "Player".
Download the current mp.dll and put in the appropraiate folder (there is a link to the Win32 server dll somewhere in the programming forum)..
Bind a key to "kick Player".
Create a Lan game and load a bot or two.
The bot sucks and falls, so kick him and see what happens. Try to kick the bot at various times, especially near the 2 second mark since that is when the conditions are tested, to see if the player needs to respawn or not (the code snippet below is executed).
If your computer crashes, congradulations, you found the problem.:)

Also, you may be able to fix a possible spectating bug here...I'm not sure.

// if the player is "dead" during the round countdown,
// then bring them back...
if(m_hCombatants[i]->m_bHasDisconnected == TRUE)
// don't execute rest of this code block...
return;
if(!m_hCombatants[i]->IsAlive() || m_hCombatants[i]->IsSpectating())
m_hCombatants[i]->Spawn(); // force to respawn
Reply


Messages In This Thread
server crash bug - by _Acid_Head_ - 09-25-2004, 12:11 AM
server crash bug - by FuzzyShoting - 09-25-2004, 04:28 AM
server crash bug - by _Acid_Head_ - 09-25-2004, 06:44 AM
server crash bug - by jabbahunt - 09-25-2004, 07:26 AM
server crash bug - by Gwarsbane - 09-25-2004, 09:59 AM
server crash bug - by Miagi - 09-25-2004, 10:38 AM
server crash bug - by kermit - 09-25-2004, 03:05 PM
server crash bug - by Miagi - 09-25-2004, 03:31 PM
server crash bug - by Miagi - 09-25-2004, 04:24 PM
server crash bug - by kermit - 09-25-2004, 04:36 PM
server crash bug - by kermit - 09-25-2004, 04:39 PM
server crash bug - by RushJet1 - 09-25-2004, 08:55 PM
server crash bug - by _Acid_Head_ - 09-25-2004, 09:38 PM
server crash bug - by GRITS - 09-25-2004, 09:43 PM
server crash bug - by _Acid_Head_ - 09-25-2004, 09:51 PM
server crash bug - by Miagi - 09-25-2004, 10:34 PM
server crash bug - by Pique - 09-27-2004, 02:34 PM
server crash bug - by kermit - 09-27-2004, 04:47 PM
server crash bug - by _Acid_Head_ - 09-28-2004, 04:31 PM
server crash bug - by RushJet1 - 09-28-2004, 05:28 PM
server crash bug - by Guest - 09-28-2004, 06:29 PM
server crash bug - by _Acid_Head_ - 09-28-2004, 07:40 PM
server crash bug - by enzymo - 10-02-2004, 06:01 AM
server crash bug - by Miagi - 10-10-2004, 03:15 PM
server crash bug - by Miagi - 11-06-2004, 06:37 PM
server crash bug - by Pique - 11-06-2004, 10:34 PM
server crash bug - by Miagi - 11-06-2004, 10:54 PM
server crash bug - by kermit - 11-07-2004, 04:49 AM
server crash bug - by FuzzyShoting - 11-07-2004, 05:19 AM
server crash bug - by Guest - 11-21-2004, 06:32 AM
server crash bug - by Miagi - 11-21-2004, 02:03 PM
server crash bug - by Miagi - 11-21-2004, 03:23 PM
server crash bug - by Miagi - 11-21-2004, 03:51 PM
server crash bug - by Pique - 11-21-2004, 04:24 PM
server crash bug - by GRITS - 11-21-2004, 08:29 PM
server crash bug - by Miagi - 11-22-2004, 05:03 PM
server crash bug - by evil_admin - 11-22-2004, 05:28 PM
server crash bug - by Miagi - 11-22-2004, 05:47 PM
server crash bug - by Miagi - 11-27-2004, 02:14 PM
server crash bug - by evil_admin - 11-27-2004, 02:32 PM
server crash bug - by Miagi - 11-28-2004, 12:50 AM
server crash bug - by Miagi - 02-11-2005, 10:26 PM
server crash bug - by Miagi - 04-01-2005, 10:56 PM
server crash bug - by GRITS - 04-02-2005, 12:58 AM
server crash bug - by Miagi - 04-02-2005, 12:01 PM
server crash bug - by NITRO! - 04-02-2005, 12:02 PM

Forum Jump:


Users browsing this thread: 4 Guest(s)