Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
server crash bug
#31
It's the white disc fix.. Evil_admin proved it by taking the fix out and running rico which didn't crash, he put the fix back in, crash...

I don't see anyone else volunteering to help.


BTW I figured out why those discs were staying, when I went to paste the reconnector fix into the code it didn't work right :wacko:
<@Miagi> !8 Am I spamming?
<@ChanServ> Miagi: Yes.
<@Miagi> !8 Should I stop?
<@ChanServ> Miagi: Oh, please, PLEASE, make it stop!

Reply
#32
I was looking and saw groupinfo, it looked like it sets the players colors or something.

Near the top of Cdiscarena they have this...

Code:
// Spawn all the players in the round
&nbsp;&nbsp;&nbsp;&nbsp;for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
&nbsp;&nbsp;&nbsp;&nbsp;{
 CBasePlayer *pPlayer = ((CBasePlayer*)(CBaseEntity*)m_hCombatants[i]);

 if ( pPlayer )
 {
 &nbsp;&nbsp;&nbsp;&nbsp;// make sure the player's groupinfo is set the arena's groupinfo
 &nbsp;&nbsp;&nbsp;&nbsp;pPlayer->pev->groupinfo = pev->groupinfo;

 &nbsp;&nbsp;&nbsp;&nbsp;// is the player an observer?
 &nbsp;&nbsp;&nbsp;&nbsp;if ( pPlayer->IsObserver() )
 &nbsp;&nbsp;&nbsp;&nbsp;{
   SpawnCombatant( pPlayer );
 &nbsp;&nbsp;&nbsp;&nbsp;}

 &nbsp;&nbsp;&nbsp;&nbsp;// Remove any powerups
 &nbsp;&nbsp;&nbsp;&nbsp;pPlayer->RemoveAllPowerups();
 }
&nbsp;&nbsp;&nbsp;&nbsp;}

I'm going to try and see if that will work. This is what I have so far to see if we can fix the white disc fix.


Code:
// Freeze everyone until there's 3 seconds to go
&nbsp;&nbsp;&nbsp;&nbsp;if ( m_iSecondsTillStart == 3 )
&nbsp;&nbsp;&nbsp;&nbsp;{
 for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
 {
 &nbsp;&nbsp;&nbsp;&nbsp;//white disc haxxx...
 &nbsp;&nbsp;&nbsp;&nbsp;// if the player is "dead" during the round countdown,
   &nbsp;&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp;&nbsp;CBasePlayer *pPlayer = ((CBasePlayer*)(CBaseEntity*)m_hCombatants[i]);
 &nbsp;&nbsp;&nbsp;&nbsp;if(!m_hCombatants[i]->IsAlive() &amp;&amp; pPlayer->m_bHasDisconnected != TRUE )
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pPlayer->pev->groupinfo = pev->groupinfo;

 &nbsp;&nbsp;&nbsp;&nbsp;// end hax


 &nbsp;&nbsp;&nbsp;&nbsp;if (m_hCombatants[i])
   ((CBaseEntity*)m_hCombatants[i])->pev->maxspeed = 320;
 }
&nbsp;&nbsp;&nbsp;&nbsp;}
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#33
K so that didn't work. Was kind of hard to create the white disc though. But with the above coded added I believe did change something.

Grits helped me test it, she finally got the white disc but when she did, I died(as if falling off a cliff onto the pad) and she fell. :blink:
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#34
use rc_2v2 for whitedisc....or another teamplay map...and whitedisc will ALWAYS happen on teamplay maps (unless you use the spectate command)...when teammates get whitedisc its the same thing as if a 1v1 got whitedisc, and you will understand why they get whitedisc....
Reply
#35
maybe all the computer guys could hash it out on irc.... I know when .asm first fixed it he said it was a 'quick fix', I am thinking he understands the code enough, that if he has time maybe he could make it a more stable fix instead of trying to fix a fix.
does that make sense?:wacko:
Reply
#36
Browsing alittle more I noticed a &quot;null&quot; check.. I can't remember if when in DM, when you go to spectate people and you switch who you are spec'ing, if there is sometimes a missing person and in place of the name is NULL.

If thats true then maybe in arena, the asm fix is trying to spawn that NULL...

I do know that
Code:
pPlayer->StopObserver();
Stops the floating bug that is caused from respawning.

I'll be running a server(won't be able to play hl2 :() for awhile, so if you see &quot;Miagi Test Server&quot; up try and get people to join, only can put up 4 slots as I'm only on adsl.

I'll be trying this code.
Code:
void CDiscArena::CountDownThink( void )
{
&nbsp;&nbsp;&nbsp;&nbsp;// Freeze everyone until there's 3 seconds to go
&nbsp;&nbsp;&nbsp;&nbsp;if ( m_iSecondsTillStart == 3 )
&nbsp;&nbsp;&nbsp;&nbsp;{
 for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
 {
 &nbsp;&nbsp;&nbsp;&nbsp;//white disc haxxx asm...
 &nbsp;&nbsp;&nbsp;&nbsp;// if the player is "dead" during countdown and they are not NULL respawn
     

 &nbsp;&nbsp;&nbsp;&nbsp;CBasePlayer *pPlayer = ((CBasePlayer*)(CBaseEntity*)m_hCombatants[i]);

 &nbsp;&nbsp;&nbsp;&nbsp;if( m_hCombatants[i] != NULL &amp;&amp; !m_hCombatants[i]->IsAlive() )
           
 &nbsp;&nbsp;&nbsp;&nbsp;{
   pPlayer->StopObserver();
   pPlayer->Spawn();  
 &nbsp;&nbsp;&nbsp;&nbsp;}
   
 &nbsp;&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp;&nbsp;// end hax

As far as 2v2...
This little image says it all...:blink:
It looks like its following arena's 1v1 rules where if theres a match in progress remove them from the arena, make them spectate that arena. Then it looks like it just respawns them if its the same &quot;match&quot;.
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#37
Miagi,

Can you paste all of the code for the CountDownThink() method and I will compile it and try it also.

thanks,

desNotes
Reply
#38
NP. Thanks :thumb:

Code:
//-----------------------------------------------------------------------------
// Purpose: Countdown to the round start
//-----------------------------------------------------------------------------
void CDiscArena::CountDownThink( void )
{
&nbsp;&nbsp;&nbsp;&nbsp;// Freeze everyone until there's 3 seconds to go
&nbsp;&nbsp;&nbsp;&nbsp;if ( m_iSecondsTillStart == 3 )
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//white disc haxxx asm...
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// if the player is "dead" during countdown and they are not NULL
&nbsp; &nbsp; &nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CBasePlayer *pPlayer = ((CBasePlayer*)(CBaseEntity*)m_hCombatants[i]);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if( m_hCombatants[i] != NULL &amp;&amp; !m_hCombatants[i]->IsAlive() )
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp; &nbsp;pPlayer->StopObserver();
&nbsp; &nbsp;pPlayer->Spawn();
&nbsp; &nbsp;// difference in ? m_hCombatants[i]->Spawn(); &nbsp; &nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp; &nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// end hax

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (m_hCombatants[i])
&nbsp; &nbsp;((CBaseEntity*)m_hCombatants[i])->pev->maxspeed = 320;
&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;m_iSecondsTillStart--;

&nbsp;&nbsp;&nbsp;&nbsp;// Play countdown VOX
&nbsp;&nbsp;&nbsp;&nbsp;if (m_iSecondsTillStart < 5)
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;// Speech
&nbsp;for ( int i = 0; i < (m_iPlayersPerTeam * 2); i++ )
&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (m_hCombatants[i])
&nbsp; &nbsp;((CBasePlayer*)(CBaseEntity*)m_hCombatants[i])->ClientHearVox( g_szCountDownVox[ m_iSecondsTillStart ] );
&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;// Send the message to the clients in the arena
&nbsp;&nbsp;&nbsp;&nbsp;for ( int i = 1; i <= gpGlobals->maxClients; i++ )
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;CBasePlayer *pPlayer = (CBasePlayer *)UTIL_PlayerByIndex( i );

&nbsp;if (pPlayer &amp;&amp; (pPlayer->pev->groupinfo &amp; pev->groupinfo) &amp;&amp; pPlayer->m_bHasDisconnected != TRUE)
&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MESSAGE_BEGIN( MSG_ONE, gmsgStartRnd, NULL, pPlayer->edict() );
&nbsp; &nbsp;WRITE_BYTE( m_iCurrRound );
&nbsp; &nbsp;WRITE_BYTE( m_iSecondsTillStart );
&nbsp; &nbsp;WRITE_BYTE( 0 );
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MESSAGE_END();
&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;if (m_iSecondsTillStart)
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;pev->nextthink = gpGlobals->time + 1.0;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;m_iArenaState = ARENA_BATTLE_IN_PROGRESS;

&nbsp;// Enable powerups
&nbsp;CBaseEntity *pFunc = NULL;
&nbsp;while ((pFunc = UTIL_FindEntityByClassname( pFunc, "item_powerup" )) != NULL)
&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((CDiscwarPowerup*)pFunc)->Enable();
&nbsp;}

&nbsp;pev->nextthink = gpGlobals->time + 1.0;
&nbsp;SetThink( BattleThink );
&nbsp;&nbsp;&nbsp;&nbsp;}
}

//-----------------------------------------------------------------------------
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#39
At first I wondered if it was even entering the whitedisc fix but it is because I put a console print in when it goes through the if and it does enter the &quot;if&quot;

Don't know about you, but to me it seems to be working. :bg:
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#40
I haven't been in the server when conditions fit the &quot;white disk&quot; but then again, it happened rarely for me before any fixes. I can say that since putting in your code and running the arena map, I have had no crashes where I was getting several crashes per day with .asm's fix.

Has anyone tried to force the white disk scenario on your server or on mine?
Reply
#41
I tried a few times, don't know why because for the life of me I can not create white disc with or without the fix in arena. I fell exactly before the timer started and I respawned immediately in your server.
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#42
Evil_admin sent me the linux source and I put the above fix in, except I removed pPlayer-&gt;StopObserver();. I have it compiled and running on my DTC server which I will leave as arena for awhile.

If you could test for white disc that would be great.

Again this is to stop arena from crashing while providing a white disc fix.
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#43
Don't know if anyone noticed, but the crash bug has been fixed along with the map vote plugin, so voting works.
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#44
naw people only notice when something goes wrong not when it is actually fixed:)

Thanks miagi I appreciate it and so do others, they just dont realize it yet:thumb:
Reply
#45
Don't forget evil_admin, who was nice enough to send me his converted linux source files. Otherwise I would've been tearing my server apart with my bare hands from &quot;trying&quot; to convert the files myself.


Is that an oxymoron? Evil, nice.
&lt;@Miagi&gt; !8 Am I spamming?
&lt;@ChanServ&gt; Miagi: Yes.
&lt;@Miagi&gt; !8 Should I stop?
&lt;@ChanServ&gt; Miagi: Oh, please, PLEASE, make it stop!

Reply
#46
hehe, I noticed the voting works:P
Thanks Miagi you are our god:thumb:

EDIT: Ok then is Evil_Admin our goddess:lol:
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)