2023-06-01 21:45:05 -04:00
|
|
|
Init()
|
2023-05-28 21:15:52 -04:00
|
|
|
{
|
|
|
|
level.startmessagedefaultduration = 2;
|
|
|
|
level.regulargamemessages = spawnstruct();
|
|
|
|
level.regulargamemessages.waittime = 6;
|
|
|
|
|
2023-06-01 21:45:05 -04:00
|
|
|
thread OnPlayerConnect();
|
2023-05-28 21:15:52 -04:00
|
|
|
}
|
|
|
|
|
2023-06-01 21:45:05 -04:00
|
|
|
OnPlayerConnect()
|
2023-05-28 21:15:52 -04:00
|
|
|
{
|
|
|
|
for ( ;; )
|
|
|
|
{
|
|
|
|
level waittill( "connecting", player );
|
2023-06-02 17:35:00 -04:00
|
|
|
player thread DisplayPopupsWaiter();
|
2023-05-28 21:15:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-02 17:35:00 -04:00
|
|
|
DisplayPopupsWaiter()
|
2023-05-28 21:15:52 -04:00
|
|
|
{
|
|
|
|
self endon( "disconnect" );
|
|
|
|
self.ranknotifyqueue = [];
|
2023-06-01 21:45:05 -04:00
|
|
|
|
|
|
|
if ( !IsDefined( self.pers[ "challengeNotifyQueue" ] ) )
|
2023-05-28 21:15:52 -04:00
|
|
|
{
|
|
|
|
self.pers[ "challengeNotifyQueue" ] = [];
|
|
|
|
}
|
2023-06-01 21:45:05 -04:00
|
|
|
if ( !IsDefined( self.pers[ "contractNotifyQueue" ] ) )
|
2023-05-28 21:15:52 -04:00
|
|
|
{
|
|
|
|
self.pers[ "contractNotifyQueue" ] = [];
|
|
|
|
}
|
2023-06-01 21:45:05 -04:00
|
|
|
|
2023-05-28 21:15:52 -04:00
|
|
|
self.messagenotifyqueue = [];
|
|
|
|
self.startmessagenotifyqueue = [];
|
|
|
|
self.wagernotifyqueue = [];
|
2023-06-01 21:45:05 -04:00
|
|
|
|
2023-05-28 21:15:52 -04:00
|
|
|
while ( !level.gameended )
|
|
|
|
{
|
|
|
|
if ( self.startmessagenotifyqueue.size == 0 && self.messagenotifyqueue.size == 0 )
|
|
|
|
{
|
|
|
|
self waittill( "received award" );
|
|
|
|
}
|
2023-06-01 21:45:05 -04:00
|
|
|
|
2023-05-28 21:15:52 -04:00
|
|
|
waittillframeend;
|
2023-06-01 21:45:05 -04:00
|
|
|
|
2023-05-28 21:15:52 -04:00
|
|
|
if ( level.gameended )
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( self.startmessagenotifyqueue.size > 0 )
|
|
|
|
{
|
|
|
|
nextnotifydata = self.startmessagenotifyqueue[ 0 ];
|
|
|
|
arrayremoveindex( self.startmessagenotifyqueue, 0, 0 );
|
2023-06-01 21:45:05 -04:00
|
|
|
if ( IsDefined( nextnotifydata.duration ) )
|
2023-05-28 21:15:52 -04:00
|
|
|
{
|
|
|
|
duration = nextnotifydata.duration;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
duration = level.startmessagedefaultduration;
|
|
|
|
}
|
2023-06-01 21:45:05 -04:00
|
|
|
|
2023-05-28 21:15:52 -04:00
|
|
|
self maps\mp\gametypes_zm\_hud_message::shownotifymessage( nextnotifydata, duration );
|
2023-06-01 21:45:05 -04:00
|
|
|
wait ( duration );
|
|
|
|
|
2023-05-28 21:15:52 -04:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
else if ( self.messagenotifyqueue.size > 0 )
|
|
|
|
{
|
|
|
|
nextnotifydata = self.messagenotifyqueue[ 0 ];
|
|
|
|
arrayremoveindex( self.messagenotifyqueue, 0, 0 );
|
2023-06-01 21:45:05 -04:00
|
|
|
|
|
|
|
if ( IsDefined( nextnotifydata.duration ) )
|
2023-05-28 21:15:52 -04:00
|
|
|
{
|
|
|
|
duration = nextnotifydata.duration;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
duration = level.regulargamemessages.waittime;
|
|
|
|
}
|
2023-06-01 21:45:05 -04:00
|
|
|
|
2023-05-28 21:15:52 -04:00
|
|
|
self maps\mp\gametypes_zm\_hud_message::shownotifymessage( nextnotifydata, duration );
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2023-06-01 21:45:05 -04:00
|
|
|
wait ( 1 );
|
2023-05-28 21:15:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-06-01 21:45:05 -04:00
|
|
|
}
|