コード例 #1
0
ファイル: wi_stuff.c プロジェクト: amitahire/development
void WI_SetState(stateenum_t st)
{
	if(st == StatCount)
		WI_initStats();
	if(st == ShowNextLoc)
		WI_initShowNextLoc();
	if(st == NoState)
		WI_initNoState();
}
コード例 #2
0
ファイル: wi_stuff.c プロジェクト: hiro2233/libspmp8k-1
void WI_updateShowNextLoc(void)
{
    WI_updateAnimatedBack();

    if (!--cnt || acceleratestage)
	WI_initNoState();
    else
	snl_pointeron = (cnt & 31) < 20;
}
コード例 #3
0
ファイル: wi_stuff.cpp プロジェクト: 469486139/DOOM-3-BFG
void WI_updateShowNextLoc(void)
{
    WI_updateAnimatedBack();

    if (!--::g->cnt || ::g->acceleratestage) {
		WI_initNoState();
		DoomLib::ShowXToContinue( false );
	} else {
		::g->snl_pointeron = (::g->cnt & 31) < 20;
	}
}
コード例 #4
0
ファイル: wi_stuff.c プロジェクト: hiro2233/libspmp8k-1
void WI_updateStats(void)
{

    WI_updateAnimatedBack();

    if (acceleratestage && sp_state != 10)
    {
	acceleratestage = 0;
	cnt_kills[0] = (plrs[me].skills * 100) / wbs->maxkills;
	cnt_items[0] = (plrs[me].sitems * 100) / wbs->maxitems;
	cnt_secret[0] = (plrs[me].ssecret * 100) / wbs->maxsecret;
	cnt_time = plrs[me].stime / TICRATE;
	cnt_par = wbs->partime / TICRATE;
	S_StartSound(0, sfx_barexp);
	sp_state = 10;
    }

    if (sp_state == 2)
    {
	cnt_kills[0] += 2;

	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	if (cnt_kills[0] >= (plrs[me].skills * 100) / wbs->maxkills)
	{
	    cnt_kills[0] = (plrs[me].skills * 100) / wbs->maxkills;
	    S_StartSound(0, sfx_barexp);
	    sp_state++;
	}
    }
    else if (sp_state == 4)
    {
	cnt_items[0] += 2;

	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	if (cnt_items[0] >= (plrs[me].sitems * 100) / wbs->maxitems)
	{
	    cnt_items[0] = (plrs[me].sitems * 100) / wbs->maxitems;
	    S_StartSound(0, sfx_barexp);
	    sp_state++;
	}
    }
    else if (sp_state == 6)
    {
	cnt_secret[0] += 2;

	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	if (cnt_secret[0] >= (plrs[me].ssecret * 100) / wbs->maxsecret)
	{
	    cnt_secret[0] = (plrs[me].ssecret * 100) / wbs->maxsecret;
	    S_StartSound(0, sfx_barexp);
	    sp_state++;
	}
    }

    else if (sp_state == 8)
    {
	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	cnt_time += 3;

	if (cnt_time >= plrs[me].stime / TICRATE)
	    cnt_time = plrs[me].stime / TICRATE;

	cnt_par += 3;

	if (cnt_par >= wbs->partime / TICRATE)
	{
	    cnt_par = wbs->partime / TICRATE;

	    if (cnt_time >= plrs[me].stime / TICRATE)
	    {
		S_StartSound(0, sfx_barexp);
		sp_state++;
	    }
	}
    }
    else if (sp_state == 10)
    {
	if (acceleratestage)
	{
	    S_StartSound(0, sfx_sgcock);

	    if (gamemode == commercial)
		WI_initNoState();
	    else
		WI_initShowNextLoc();
	}
    }
    else if (sp_state & 1)
    {
	if (!--cnt_pause)
	{
	    sp_state++;
	    cnt_pause = TICRATE;
	}
    }

}
コード例 #5
0
ファイル: wi_stuff.c プロジェクト: hiro2233/libspmp8k-1
void WI_updateNetgameStats(void)
{

    int		i;
    int		fsum;
    
    boolean	stillticking;

    WI_updateAnimatedBack();

    if (acceleratestage && ng_state != 10)
    {
	acceleratestage = 0;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!playeringame[i])
		continue;

	    cnt_kills[i] = (plrs[i].skills * 100) / wbs->maxkills;
	    cnt_items[i] = (plrs[i].sitems * 100) / wbs->maxitems;
	    cnt_secret[i] = (plrs[i].ssecret * 100) / wbs->maxsecret;

	    if (dofrags)
		cnt_frags[i] = WI_fragSum(i);
	}
	S_StartSound(0, sfx_barexp);
	ng_state = 10;
    }

    if (ng_state == 2)
    {
	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!playeringame[i])
		continue;

	    cnt_kills[i] += 2;

	    if (cnt_kills[i] >= (plrs[i].skills * 100) / wbs->maxkills)
		cnt_kills[i] = (plrs[i].skills * 100) / wbs->maxkills;
	    else
		stillticking = true;
	}
	
	if (!stillticking)
	{
	    S_StartSound(0, sfx_barexp);
	    ng_state++;
	}
    }
    else if (ng_state == 4)
    {
	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!playeringame[i])
		continue;

	    cnt_items[i] += 2;
	    if (cnt_items[i] >= (plrs[i].sitems * 100) / wbs->maxitems)
		cnt_items[i] = (plrs[i].sitems * 100) / wbs->maxitems;
	    else
		stillticking = true;
	}
	if (!stillticking)
	{
	    S_StartSound(0, sfx_barexp);
	    ng_state++;
	}
    }
    else if (ng_state == 6)
    {
	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!playeringame[i])
		continue;

	    cnt_secret[i] += 2;

	    if (cnt_secret[i] >= (plrs[i].ssecret * 100) / wbs->maxsecret)
		cnt_secret[i] = (plrs[i].ssecret * 100) / wbs->maxsecret;
	    else
		stillticking = true;
	}
	
	if (!stillticking)
	{
	    S_StartSound(0, sfx_barexp);
	    ng_state += 1 + 2*!dofrags;
	}
    }
    else if (ng_state == 8)
    {
	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!playeringame[i])
		continue;

	    cnt_frags[i] += 1;

	    if (cnt_frags[i] >= (fsum = WI_fragSum(i)))
		cnt_frags[i] = fsum;
	    else
		stillticking = true;
	}
	
	if (!stillticking)
	{
	    S_StartSound(0, sfx_pldeth);
	    ng_state++;
	}
    }
    else if (ng_state == 10)
    {
	if (acceleratestage)
	{
	    S_StartSound(0, sfx_sgcock);
	    if ( gamemode == commercial )
		WI_initNoState();
	    else
		WI_initShowNextLoc();
	}
    }
    else if (ng_state & 1)
    {
	if (!--cnt_pause)
	{
	    ng_state++;
	    cnt_pause = TICRATE;
	}
    }
}
コード例 #6
0
ファイル: wi_stuff.c プロジェクト: Hitechcomputergeek/wiidoom
// ====================================================================
// WI_updateStats
// Purpose: Calculate solo stats
// Args:    none
// Returns: void
//
void WI_updateStats(void)
{
    WI_updateAnimatedBack();

    if (acceleratestage && sp_state != 10)
    {
        acceleratestage = 0;
        cnt_kills[0] = (plrs[me].skills * 100) / wbs->maxkills;
        cnt_items[0] = (plrs[me].sitems * 100) / wbs->maxitems;

        // killough 2/22/98: Make secrets = 100% if maxsecret = 0:
        cnt_secret[0] = (wbs->maxsecret ?
                         (plrs[me].ssecret * 100) / wbs->maxsecret : 100);

        cnt_total_time = wbs->totaltimes / TICRATE;
        cnt_time = plrs[me].stime / TICRATE;
        cnt_par = wbs->partime / TICRATE;
        S_StartSound(0, sfx_barexp);
        sp_state = 10;
    }

    if (sp_state == 2)
    {
        cnt_kills[0] += 2;

        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);

        if (cnt_kills[0] >= (plrs[me].skills * 100) / wbs->maxkills)
        {
            cnt_kills[0] = (plrs[me].skills * 100) / wbs->maxkills;
            S_StartSound(0, sfx_barexp);
            sp_state++;
        }
    }
    else if (sp_state == 4)
    {
        cnt_items[0] += 2;

        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);

        if (cnt_items[0] >= (plrs[me].sitems * 100) / wbs->maxitems)
        {
            cnt_items[0] = (plrs[me].sitems * 100) / wbs->maxitems;
            S_StartSound(0, sfx_barexp);
            sp_state++;
        }
    }
    else if (sp_state == 6)
    {
        cnt_secret[0] += 2;

        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);

        // killough 2/22/98: Make secrets = 100% if maxsecret = 0:
        if ((!wbs->maxsecret && compatibility_level < lxdoom_1_compatibility) ||
                cnt_secret[0] >= (wbs->maxsecret ?
                                  (plrs[me].ssecret * 100) / wbs->maxsecret : 100))
        {
            cnt_secret[0] = (wbs->maxsecret ?
                             (plrs[me].ssecret * 100) / wbs->maxsecret : 100);
            S_StartSound(0, sfx_barexp);
            sp_state++;
        }
    }
    else if (sp_state == 8)
    {
        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);

        cnt_time += 3;

        if (cnt_time >= plrs[me].stime / TICRATE)
            cnt_time = plrs[me].stime / TICRATE;

        cnt_total_time += 3;

        if (cnt_total_time >= wbs->totaltimes / TICRATE)
            cnt_total_time = wbs->totaltimes / TICRATE;

        cnt_par += 3;

        if (cnt_par >= wbs->partime / TICRATE)
        {
            cnt_par = wbs->partime / TICRATE;

            if ((cnt_time >= plrs[me].stime / TICRATE) && (compatibility_level < lxdoom_1_compatibility || cnt_total_time >= wbs->totaltimes / TICRATE))
            {
                S_StartSound(0, sfx_barexp);
                sp_state++;
            }
        }
    }
    else if (sp_state == 10)
    {
        if (acceleratestage)
        {
            S_StartSound(0, sfx_sgcock);

            if (gamemode == commercial)
                WI_initNoState();
            else
                WI_initShowNextLoc();
        }
    }
    else if (sp_state & 1)
    {
        if (!--cnt_pause)
        {
            sp_state++;
            cnt_pause = TICRATE;
        }
    }
}
コード例 #7
0
ファイル: wi_stuff.c プロジェクト: Hitechcomputergeek/wiidoom
// ====================================================================
// WI_updateNetgameStats
// Purpose: Calculate coop stats as we display them with noise and fury
// Args:    none
// Returns: void
// Comment: This stuff sure is complicated for what it does
//
void WI_updateNetgameStats(void)
{
    int   i;
    int   fsum;

    bool stillticking;

    WI_updateAnimatedBack();

    if (acceleratestage && ng_state != 10)
    {
        acceleratestage = 0;

        for (i=0 ; i<MAXPLAYERS ; i++)
        {
            if (!playeringame[i])
                continue;

            cnt_kills[i] = (plrs[i].skills * 100) / wbs->maxkills;
            cnt_items[i] = (plrs[i].sitems * 100) / wbs->maxitems;

            // killough 2/22/98: Make secrets = 100% if maxsecret = 0:
            cnt_secret[i] = wbs->maxsecret ?
                            (plrs[i].ssecret * 100) / wbs->maxsecret : 100;
            if (dofrags)
                cnt_frags[i] = WI_fragSum(i);  // we had frags
        }
        S_StartSound(0, sfx_barexp);  // bang
        ng_state = 10;
    }

    if (ng_state == 2)
    {
        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);  // pop

        stillticking = false;

        for (i=0 ; i<MAXPLAYERS ; i++)
        {
            if (!playeringame[i])
                continue;

            cnt_kills[i] += 2;

            if (cnt_kills[i] >= (plrs[i].skills * 100) / wbs->maxkills)
                cnt_kills[i] = (plrs[i].skills * 100) / wbs->maxkills;
            else
                stillticking = true; // still got stuff to tally
        }

        if (!stillticking)
        {
            S_StartSound(0, sfx_barexp);
            ng_state++;
        }
    }
    else if (ng_state == 4)
    {
        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);

        stillticking = false;

        for (i=0 ; i<MAXPLAYERS ; i++)
        {
            if (!playeringame[i])
                continue;

            cnt_items[i] += 2;
            if (cnt_items[i] >= (plrs[i].sitems * 100) / wbs->maxitems)
                cnt_items[i] = (plrs[i].sitems * 100) / wbs->maxitems;
            else
                stillticking = true;
        }

        if (!stillticking)
        {
            S_StartSound(0, sfx_barexp);
            ng_state++;
        }
    }
    else if (ng_state == 6)
    {
        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);

        stillticking = false;

        for (i=0 ; i<MAXPLAYERS ; i++)
        {
            if (!playeringame[i])
                continue;

            cnt_secret[i] += 2;

            // killough 2/22/98: Make secrets = 100% if maxsecret = 0:

            if (cnt_secret[i] >= (wbs->maxsecret ? (plrs[i].ssecret * 100) / wbs->maxsecret : compatibility_level < lxdoom_1_compatibility ? 0 : 100))
                cnt_secret[i] = wbs->maxsecret ? (plrs[i].ssecret * 100) / wbs->maxsecret : 100;
            else
                stillticking = true;
        }

        if (!stillticking)
        {
            S_StartSound(0, sfx_barexp);
            ng_state += 1 + 2*!dofrags;
        }
    }
    else if (ng_state == 8)
    {
        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);

        stillticking = false;

        for (i=0 ; i<MAXPLAYERS ; i++)
        {
            if (!playeringame[i])
                continue;

            cnt_frags[i] += 1;

            if (cnt_frags[i] >= (fsum = WI_fragSum(i)))
                cnt_frags[i] = fsum;
            else
                stillticking = true;
        }

        if (!stillticking)
        {
            S_StartSound(0, sfx_pldeth);
            ng_state++;
        }
    }
    else if (ng_state == 10)
    {
        if (acceleratestage)
        {
            S_StartSound(0, sfx_sgcock);
            if ( gamemode == commercial )
                WI_initNoState();
            else
                WI_initShowNextLoc();
        }
    }
    else if (ng_state & 1)
    {
        if (!--cnt_pause)
        {
            ng_state++;
            cnt_pause = TICRATE;
        }
    }
}
コード例 #8
0
ファイル: wi_stuff.c プロジェクト: Hitechcomputergeek/wiidoom
// ====================================================================
// WI_updateDeathmatchStats
// Purpose: Advance Deathmatch stats screen animation.  Calculate
//          frags for all players.  Lots of noise and drama around
//          the presentation.
// Args:    none
// Returns: void
//
void WI_updateDeathmatchStats(void)
{
    int   i;
    int   j;

    bool stillticking;

    WI_updateAnimatedBack();

    if (acceleratestage && dm_state != 4)  // still ticking
    {
        acceleratestage = 0;

        for (i=0 ; i<MAXPLAYERS ; i++)
        {
            if (playeringame[i])
            {
                for (j=0 ; j<MAXPLAYERS ; j++)
                    if (playeringame[j])
                        dm_frags[i][j] = plrs[i].frags[j];

                dm_totals[i] = WI_fragSum(i);
            }
        }


        S_StartSound(0, sfx_barexp);  // bang
        dm_state = 4;  // we're done with all 4 (or all we have to do)
    }


    if (dm_state == 2)
    {
        if (!(bcnt&3))
            S_StartSound(0, sfx_pistol);  // noise while counting

        stillticking = false;

        for (i=0 ; i<MAXPLAYERS ; i++)
        {
            if (playeringame[i])
            {
                for (j=0 ; j<MAXPLAYERS ; j++)
                {
                    if (playeringame[j]
                            && dm_frags[i][j] != plrs[i].frags[j])
                    {
                        if (plrs[i].frags[j] < 0)
                            dm_frags[i][j]--;
                        else
                            dm_frags[i][j]++;

                        if (dm_frags[i][j] > 999) // Ty 03/17/98 3-digit frag count
                            dm_frags[i][j] = 999;

                        if (dm_frags[i][j] < -999)
                            dm_frags[i][j] = -999;

                        stillticking = true;
                    }
                }
                dm_totals[i] = WI_fragSum(i);

                if (dm_totals[i] > 999)
                    dm_totals[i] = 999;

                if (dm_totals[i] < -999)
                    dm_totals[i] = -999;  // Ty 03/17/98 end 3-digit frag count
            }
        }

        if (!stillticking)
        {
            S_StartSound(0, sfx_barexp);
            dm_state++;
        }
    }
    else if (dm_state == 4)
    {
        if (acceleratestage)
        {
            S_StartSound(0, sfx_slop);

            if ( gamemode == commercial)
                WI_initNoState();
            else
                WI_initShowNextLoc();
        }
    }
    else if (dm_state & 1)
    {
        if (!--cnt_pause)
        {
            dm_state++;
            cnt_pause = TICRATE;
        }
    }
}
コード例 #9
0
ファイル: wi_stuff.cpp プロジェクト: JohnnyonFlame/odamex
void WI_updateNetgameStats (void)
{

    unsigned int i;
    int fsum;
    BOOL stillticking;

    WI_updateAnimatedBack();

    if (acceleratestage && ng_state != 10)
    {
        acceleratestage = 0;

        for (i=0 ; i<players.size(); i++)
        {
            if (!players[i].ingame())
                continue;

            cnt_kills_c[i] = plrs[i].skills;
            cnt_items_c[i] = plrs[i].sitems;
            cnt_secret_c[i] = plrs[i].ssecret;

            if (dofrags)
                cnt_frags_c[i] = WI_fragSum (players[i]);
        }
        S_Sound (CHAN_INTERFACE, "weapons/rocklx", 1, ATTN_NONE);
        ng_state = 10;
    }

    if (ng_state == 2)
    {
        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        stillticking = false;

        for (i=0 ; i<players.size() ; i++)
        {
            if (!players[i].ingame())
                continue;

            cnt_kills_c[i] += 2;

            if (cnt_kills_c[i] > plrs[i].skills)
                cnt_kills_c[i] = plrs[i].skills;
            else
                stillticking = true;
        }

        if (!stillticking)
        {
            S_Sound (CHAN_INTERFACE, "weapons/rocklx", 1, ATTN_NONE);
            ng_state++;
        }
    }
    else if (ng_state == 4)
    {
        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        stillticking = false;

        for (i=0 ; i<players.size() ; i++)
        {
            if (!players[i].ingame())
                continue;

            cnt_items_c[i] += 2;
            if (cnt_items_c[i] > plrs[i].sitems)
                cnt_items_c[i] = plrs[i].sitems;
            else
                stillticking = true;
        }
        if (!stillticking)
        {
            S_Sound (CHAN_INTERFACE, "weapons/rocklx", 1, ATTN_NONE);
            ng_state++;
        }
    }
    else if (ng_state == 6)
    {
        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        stillticking = false;

        for (i=0 ; i<players.size() ; i++)
        {
            if (!players[i].ingame())
                continue;

            cnt_secret_c[i] += 2;

            if (cnt_secret_c[i] > plrs[i].ssecret)
                cnt_secret_c[i] = plrs[i].ssecret;
            else
                stillticking = true;
        }

        if (!stillticking)
        {
            S_Sound (CHAN_INTERFACE, "weapons/rocklx", 1, ATTN_NONE);
            ng_state += 1 + 2*!dofrags;
        }
    }
    else if (ng_state == 8)
    {
        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        stillticking = false;

        for (i=0 ; i<players.size() ; i++)
        {
            if (!players[i].ingame())
                continue;

            cnt_frags_c[i] += 1;

            if (cnt_frags_c[i] >= (fsum = WI_fragSum(players[i])))
                cnt_frags_c[i] = fsum;
            else
                stillticking = true;
        }

        if (!stillticking)
        {
            S_Sound (CHAN_INTERFACE, "player/male/death1", 1, ATTN_NONE);
            ng_state++;
        }
    }
    else if (ng_state == 10)
    {
        if (acceleratestage)
        {
            S_Sound (CHAN_INTERFACE, "weapons/shotgr", 1, ATTN_NONE);
            if ( (gameinfo.flags & GI_MAPxx) )
                WI_initNoState();
            else
                WI_initShowNextLoc();
        }
    }
    else if (ng_state & 1)
    {
        if (!--cnt_pause)
        {
            ng_state++;
            cnt_pause = TICRATE;
        }
    }
}
コード例 #10
0
ファイル: wi_stuff.c プロジェクト: amitahire/development
void WI_updateNetgameStats(void)
{
	int     i;
	int     fsum;
	boolean stillticking;

	WI_updateAnimatedBack();

	if(acceleratestage && ng_state != 10)
	{
		acceleratestage = 0;
		for(i = 0; i < NUM_TEAMS; i++)
		{
			//if (!players[i].plr->ingame) continue;
			cnt_kills[i] = (teaminfo[i].kills * 100) / wbs->maxkills;
			cnt_items[i] = (teaminfo[i].items * 100) / wbs->maxitems;
			cnt_secret[i] = (teaminfo[i].secret * 100) / wbs->maxsecret;

			if(dofrags)
				cnt_frags[i] = teaminfo[i].totalfrags;	//WI_fragSum(i);
		}
		S_LocalSound(sfx_barexp, 0);
		ng_state = 10;
	}

	if(ng_state == 2)
	{
		if(!(bcnt & 3))
			S_LocalSound(sfx_pistol, 0);
		stillticking = false;

		for(i = 0; i < NUM_TEAMS; i++)
		{
			//if (!players[i].plr->ingame) continue;

			cnt_kills[i] += 2;

			if(cnt_kills[i] >= (teaminfo[i].kills * 100) / wbs->maxkills)
				cnt_kills[i] = (teaminfo[i].kills * 100) / wbs->maxkills;
			else
				stillticking = true;
		}
		if(!stillticking)
		{
			S_LocalSound(sfx_barexp, 0);
			ng_state++;
		}
	}
	else if(ng_state == 4)
	{
		if(!(bcnt & 3))
			S_LocalSound(sfx_pistol, 0);
		stillticking = false;

		for(i = 0; i < NUM_TEAMS; i++)
		{
			//if (!players[i].plr->ingame) continue;

			cnt_items[i] += 2;
			if(cnt_items[i] >= (teaminfo[i].items * 100) / wbs->maxitems)
				cnt_items[i] = (teaminfo[i].items * 100) / wbs->maxitems;
			else
				stillticking = true;
		}
		if(!stillticking)
		{
			S_LocalSound(sfx_barexp, 0);
			ng_state++;
		}
	}
	else if(ng_state == 6)
	{
		if(!(bcnt & 3))
			S_LocalSound(sfx_pistol, 0);

		stillticking = false;

		for(i = 0; i < NUM_TEAMS; i++)
		{
			//if (!players[i].plr->ingame) continue;

			cnt_secret[i] += 2;

			if(cnt_secret[i] >= (teaminfo[i].secret * 100) / wbs->maxsecret)
				cnt_secret[i] = (teaminfo[i].secret * 100) / wbs->maxsecret;
			else
				stillticking = true;
		}
		if(!stillticking)
		{
			S_LocalSound(sfx_barexp, 0);
			ng_state += 1 + 2 * !dofrags;
		}
	}
	else if(ng_state == 8)
	{
		if(!(bcnt & 3))
			S_LocalSound(sfx_pistol, 0);

		stillticking = false;

		for(i = 0; i < NUM_TEAMS; i++)
		{
			//if (!players[i].plr->ingame) continue;

			cnt_frags[i] += 1;

			if(cnt_frags[i] >= (fsum = WI_fragSum(i)))
				cnt_frags[i] = fsum;
			else
				stillticking = true;
		}
		if(!stillticking)
		{
			S_LocalSound(sfx_pldeth, 0);
			ng_state++;
		}
	}
	else if(ng_state == 10)
	{
		if(acceleratestage)
		{
			S_LocalSound(sfx_sgcock, 0);
			if(gamemode == commercial)
				WI_initNoState();
			else
				WI_initShowNextLoc();
		}
	}
	else if(ng_state & 1)
	{
		if(!--cnt_pause)
		{
			ng_state++;
			cnt_pause = TICRATE;
		}
	}
}
コード例 #11
0
ファイル: wi_stuff.cpp プロジェクト: doomtech/zdoom-old
void WI_updateDeathmatchStats ()
{
	/*
	int i, j;
	BOOL stillticking;
	*/

	WI_updateAnimatedBack();

	if (acceleratestage && dm_state != 4)
	{
		/*
		acceleratestage = 0;

		for (i=0 ; i<MAXPLAYERS ; i++)
		{
			if (playeringame[i])
			{
				for (j=0 ; j<MAXPLAYERS ; j++)
					if (playeringame[j])
						dm_frags[i][j] = plrs[i].frags[j];

				dm_totals[i] = WI_fragSum(i);
			}
		}
		
		S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
		*/
		dm_state = 4;
	}

	if (dm_state == 2)
	{
		/*
		if (!(bcnt&3))
			S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);
		
		stillticking = false;

		for (i=0 ; i<MAXPLAYERS ; i++)
		{
			if (playeringame[i])
			{
				for (j=0 ; j<MAXPLAYERS ; j++)
				{
					if (playeringame[j]
						&& dm_frags[i][j] != plrs[i].frags[j])
					{
						if (plrs[i].frags[j] < 0)
							dm_frags[i][j]--;
						else
							dm_frags[i][j]++;

						if (dm_frags[i][j] > 99)
							dm_frags[i][j] = 99;

						if (dm_frags[i][j] < -99)
							dm_frags[i][j] = -99;
						
						stillticking = true;
					}
				}
				dm_totals[i] = WI_fragSum(i);

				if (dm_totals[i] > 99)
					dm_totals[i] = 99;
				
				if (dm_totals[i] < -99)
					dm_totals[i] = -99;
			}
			
		}
		if (!stillticking)
		{
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
			dm_state++;
		}
		*/
		dm_state = 3;
	}
	else if (dm_state == 4)
	{
		if (acceleratestage)
		{
			S_Sound (CHAN_VOICE, "players/male/gibbed", 1, ATTN_NONE);

			if (gamemode == commercial)
				WI_initNoState();
			else
				WI_initShowNextLoc();
		}
	}
	else if (dm_state & 1)
	{
		if (!--cnt_pause)
		{
			dm_state++;
			cnt_pause = TICRATE;
		}
	}
}
コード例 #12
0
ファイル: wi_stuff.cpp プロジェクト: doomtech/zdoom-old
void WI_updateStats ()
{
	WI_updateAnimatedBack ();

	if ((gameinfo.gametype != GAME_Doom || acceleratestage)
		&& sp_state != 10)
	{
		if (acceleratestage)
		{
			acceleratestage = 0;
			sp_state = 10;
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
		}
		cnt_kills[0] = plrs[me].skills;
		cnt_items[0] = plrs[me].sitems;
		cnt_secret[0] = plrs[me].ssecret;
		cnt_time = plrs[me].stime / TICRATE;
		cnt_par = wbs->partime / TICRATE;
	}

	if (sp_state == 2)
	{
		if (gameinfo.gametype == GAME_Doom)
		{
			cnt_kills[0] += 2;

			if (!(bcnt&3))
				S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);
		}
		if (cnt_kills[0] >= plrs[me].skills)
		{
			cnt_kills[0] = plrs[me].skills;
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
			sp_state++;
		}
	}
	else if (sp_state == 4)
	{
		if (gameinfo.gametype == GAME_Doom)
		{
			cnt_items[0] += 2;

			if (!(bcnt&3))
				S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);
		}
		if (cnt_items[0] >= plrs[me].sitems)
		{
			cnt_items[0] = plrs[me].sitems;
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
			sp_state++;
		}
	}
	else if (sp_state == 6)
	{
		if (gameinfo.gametype == GAME_Doom)
		{
			cnt_secret[0] += 2;

			if (!(bcnt&3))
				S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);
		}
		if (cnt_secret[0] >= plrs[me].ssecret)
		{
			cnt_secret[0] = plrs[me].ssecret;
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
			sp_state++;
		}
	}
	else if (sp_state == 8)
	{
		if (gameinfo.gametype == GAME_Doom)
		{
			if (!(bcnt&3))
				S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);

			cnt_time += 3;
			cnt_par += 3;
		}

		if (cnt_time >= plrs[me].stime / TICRATE)
			cnt_time = plrs[me].stime / TICRATE;

		if (cnt_par >= wbs->partime / TICRATE)
		{
			cnt_par = wbs->partime / TICRATE;

			if (cnt_time >= plrs[me].stime / TICRATE)
			{
				S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
				sp_state++;
			}
		}
	}
	else if (sp_state == 10)
	{
		if (acceleratestage)
		{
			S_Sound (CHAN_VOICE, PASTSTATS, 1, ATTN_NONE);

			if (gamemode == commercial)
				WI_initNoState();
			else
				WI_initShowNextLoc();
		}
	}
	else if (sp_state & 1)
	{
		if (!--cnt_pause)
		{
			sp_state++;
			cnt_pause = TICRATE;
		}
	}
}
コード例 #13
0
ファイル: wi_stuff.cpp プロジェクト: doomtech/zdoom-old
void WI_updateNetgameStats ()
{

	int i;
	int fsum;
	BOOL stillticking;

	WI_updateAnimatedBack ();

	if (acceleratestage && ng_state != 10)
	{
		acceleratestage = 0;

		for (i=0 ; i<MAXPLAYERS ; i++)
		{
			if (!playeringame[i])
				continue;

			cnt_kills[i] = plrs[i].skills;
			cnt_items[i] = plrs[i].sitems;
			cnt_secret[i] = plrs[i].ssecret;

			if (dofrags)
				cnt_frags[i] = WI_fragSum (i);
		}
		S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
		ng_state = 10;
	}

	if (ng_state == 2)
	{
		if (!(bcnt&3))
			S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);

		stillticking = false;

		for (i=0 ; i<MAXPLAYERS ; i++)
		{
			if (!playeringame[i])
				continue;

			cnt_kills[i] += 2;

			if (cnt_kills[i] > plrs[i].skills)
				cnt_kills[i] = plrs[i].skills;
			else
				stillticking = true;
		}
		
		if (!stillticking)
		{
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
			ng_state++;
		}
	}
	else if (ng_state == 4)
	{
		if (!(bcnt&3))
			S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);

		stillticking = false;

		for (i=0 ; i<MAXPLAYERS ; i++)
		{
			if (!playeringame[i])
				continue;

			cnt_items[i] += 2;
			if (cnt_items[i] > plrs[i].sitems)
				cnt_items[i] = plrs[i].sitems;
			else
				stillticking = true;
		}
		if (!stillticking)
		{
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
			ng_state++;
		}
	}
	else if (ng_state == 6)
	{
		if (!(bcnt&3))
			S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);

		stillticking = false;

		for (i=0 ; i<MAXPLAYERS ; i++)
		{
			if (!playeringame[i])
				continue;

			cnt_secret[i] += 2;

			if (cnt_secret[i] > plrs[i].ssecret)
				cnt_secret[i] = plrs[i].ssecret;
			else
				stillticking = true;
		}
		
		if (!stillticking)
		{
			S_Sound (CHAN_VOICE, NEXTSTAGE, 1, ATTN_NONE);
			ng_state += 1 + 2*!dofrags;
		}
	}
	else if (ng_state == 8)
	{
		if (!(bcnt&3))
			S_Sound (CHAN_VOICE, "weapons/pistol", 1, ATTN_NONE);

		stillticking = false;

		for (i=0 ; i<MAXPLAYERS ; i++)
		{
			if (!playeringame[i])
				continue;

			cnt_frags[i] += 1;

			if (cnt_frags[i] >= (fsum = WI_fragSum(i)))
				cnt_frags[i] = fsum;
			else
				stillticking = true;
		}
		
		if (!stillticking)
		{
			S_Sound (CHAN_VOICE, "player/male/death1", 1, ATTN_NONE);
			ng_state++;
		}
	}
	else if (ng_state == 10)
	{
		if (acceleratestage)
		{
			S_Sound (CHAN_VOICE, PASTSTATS, 1, ATTN_NONE);
			if ( gamemode == commercial )
				WI_initNoState();
			else
				WI_initShowNextLoc();
		}
	}
	else if (ng_state & 1)
	{
		if (!--cnt_pause)
		{
			ng_state++;
			cnt_pause = TICRATE;
		}
	}
}
コード例 #14
0
ファイル: wi_stuff.cpp プロジェクト: 469486139/DOOM-3-BFG
void WI_updateStats(void)
{

    WI_updateAnimatedBack();

    if (::g->acceleratestage && ::g->sp_state != 10)
    {
		::g->acceleratestage = 0;
		::g->cnt_kills[0] = (plrs[::g->me].skills * 100) / ::g->wbs->maxkills;
		::g->cnt_items[0] = (plrs[::g->me].sitems * 100) / ::g->wbs->maxitems;
		::g->cnt_secret[0] = (plrs[::g->me].ssecret * 100) / ::g->wbs->maxsecret;
		::g->cnt_time = plrs[::g->me].stime / TICRATE;
		::g->cnt_par = ::g->wbs->partime / TICRATE;
		S_StartSound(0, sfx_barexp);
		::g->sp_state = 10;
    }

    if (::g->sp_state == 2)
    {
		::g->cnt_kills[0] += 2;

		if (!(::g->bcnt&3))
			S_StartSound(0, sfx_pistol);

		if (::g->cnt_kills[0] >= (plrs[::g->me].skills * 100) / ::g->wbs->maxkills)
		{
			::g->cnt_kills[0] = (plrs[::g->me].skills * 100) / ::g->wbs->maxkills;
			S_StartSound(0, sfx_barexp);
			::g->sp_state++;
		}
    }
    else if (::g->sp_state == 4)
    {
		::g->cnt_items[0] += 2;

		if (!(::g->bcnt&3))
			S_StartSound(0, sfx_pistol);

		if (::g->cnt_items[0] >= (plrs[::g->me].sitems * 100) / ::g->wbs->maxitems)
		{
			::g->cnt_items[0] = (plrs[::g->me].sitems * 100) / ::g->wbs->maxitems;
			S_StartSound(0, sfx_barexp);
			::g->sp_state++;
		}
    }
    else if (::g->sp_state == 6)
    {
		::g->cnt_secret[0] += 2;

		if (!(::g->bcnt&3))
			S_StartSound(0, sfx_pistol);

		if (::g->cnt_secret[0] >= (plrs[::g->me].ssecret * 100) / ::g->wbs->maxsecret)
		{
			::g->cnt_secret[0] = (plrs[::g->me].ssecret * 100) / ::g->wbs->maxsecret;
			S_StartSound(0, sfx_barexp);
			::g->sp_state++;
		}
    }

    else if (::g->sp_state == 8)
    {
		if (!(::g->bcnt&3))
			S_StartSound(0, sfx_pistol);

		::g->cnt_time += 3;

		if (::g->cnt_time >= plrs[::g->me].stime / TICRATE)
			::g->cnt_time = plrs[::g->me].stime / TICRATE;

		::g->cnt_par += 3;

		if (::g->cnt_par >= ::g->wbs->partime / TICRATE)
		{
			::g->cnt_par = ::g->wbs->partime / TICRATE;

			if (::g->cnt_time >= plrs[::g->me].stime / TICRATE)
			{
				S_StartSound(0, sfx_barexp);
				::g->sp_state++;
			}
		}
    }
    else if (::g->sp_state == 10)
    {
        if (::g->acceleratestage)
		{
			if ( !::g->demoplayback && ( ::g->usergame || ::g->netgame ) ) {

				S_StartSound(0, sfx_sgcock);

				// need to do this again if they buy it
				localCalculateAchievements(false);

				if (::g->gamemode == commercial) {
					WI_initNoState();
				}
				else{
					WI_initShowNextLoc();
				}
			}
		}
    }
    else if (::g->sp_state & 1)
    {
		if (!--::g->cnt_pause)
		{
			::g->sp_state++;
			::g->cnt_pause = TICRATE;
		}
    }

}
コード例 #15
0
ファイル: wi_stuff.cpp プロジェクト: 469486139/DOOM-3-BFG
void WI_updateNetgameStats(void)
{

    int		i;
    int		fsum;
    
    qboolean	stillticking;

    WI_updateAnimatedBack();

    if (::g->acceleratestage && ::g->ng_state != 10)
    {
	::g->acceleratestage = 0;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!::g->playeringame[i])
		continue;

	    ::g->cnt_kills[i] = (plrs[i].skills * 100) / ::g->wbs->maxkills;
	    ::g->cnt_items[i] = (plrs[i].sitems * 100) / ::g->wbs->maxitems;
	    ::g->cnt_secret[i] = (plrs[i].ssecret * 100) / ::g->wbs->maxsecret;

	    if (::g->dofrags)
		::g->cnt_frags[i] = WI_fragSum(i);
	}
	S_StartSound(0, sfx_barexp);
	::g->ng_state = 10;
    }

    if (::g->ng_state == 2)
    {
	if (!(::g->bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!::g->playeringame[i])
		continue;

	    ::g->cnt_kills[i] += 2;

	    if (::g->cnt_kills[i] >= (plrs[i].skills * 100) / ::g->wbs->maxkills)
		::g->cnt_kills[i] = (plrs[i].skills * 100) / ::g->wbs->maxkills;
	    else
		stillticking = true;
	}
	
	if (!stillticking)
	{
	    S_StartSound(0, sfx_barexp);
	    ::g->ng_state++;
	}
    }
    else if (::g->ng_state == 4)
    {
	if (!(::g->bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!::g->playeringame[i])
		continue;

	    ::g->cnt_items[i] += 2;
	    if (::g->cnt_items[i] >= (plrs[i].sitems * 100) / ::g->wbs->maxitems)
		::g->cnt_items[i] = (plrs[i].sitems * 100) / ::g->wbs->maxitems;
	    else
		stillticking = true;
	}
	if (!stillticking)
	{
	    S_StartSound(0, sfx_barexp);
	    ::g->ng_state++;
	}
    }
    else if (::g->ng_state == 6)
    {
	if (!(::g->bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!::g->playeringame[i])
		continue;

	    ::g->cnt_secret[i] += 2;

	    if (::g->cnt_secret[i] >= (plrs[i].ssecret * 100) / ::g->wbs->maxsecret)
		::g->cnt_secret[i] = (plrs[i].ssecret * 100) / ::g->wbs->maxsecret;
	    else
		stillticking = true;
	}
	
	if (!stillticking)
	{
	    S_StartSound(0, sfx_barexp);
	    ::g->ng_state += 1 + 2*!::g->dofrags;
	}
    }
    else if (::g->ng_state == 8)
    {
	if (!(::g->bcnt&3))
	    S_StartSound(0, sfx_pistol);

	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (!::g->playeringame[i])
		continue;

	    ::g->cnt_frags[i] += 1;

	    if (::g->cnt_frags[i] >= (fsum = WI_fragSum(i)))
		::g->cnt_frags[i] = fsum;
	    else
		stillticking = true;
	}
	
	if (!stillticking)
	{
	    S_StartSound(0, sfx_pldeth);
	    ::g->ng_state++;
	}
    }
    else if (::g->ng_state == 10)
    {
	if (::g->acceleratestage)
	{
		if ( !::g->demoplayback && ( ::g->usergame || ::g->netgame ) ) {
			S_StartSound(0, sfx_sgcock);

			// need to do this again if they buy it
			localCalculateAchievements(false);
			if (::g->gamemode == commercial){
				WI_initNoState();
				DoomLib::ShowXToContinue( false );
			}
			else{
				WI_initShowNextLoc();
			}
		}
	}
    }
    else if (::g->ng_state & 1)
    {
	if (!--::g->cnt_pause)
	{
	    ::g->ng_state++;
	    ::g->cnt_pause = TICRATE;
	}
    }
}
コード例 #16
0
ファイル: wi_stuff.cpp プロジェクト: JohnnyonFlame/odamex
void WI_updateStats(void)
{

    WI_updateAnimatedBack();

    if (acceleratestage && sp_state != 10)
    {
        acceleratestage = 0;
        cnt_kills = (wminfo.maxkills) ? (level.killed_monsters * 100) / wminfo.maxkills : 0;
        cnt_items = (wminfo.maxitems) ? (level.found_items * 100) / wminfo.maxitems : 0;
        cnt_secret = (wminfo.maxsecret) ? (level.found_secrets * 100) / wminfo.maxsecret : 0;
        cnt_time = (plrs[me].stime) ? plrs[me].stime / TICRATE : level.time / TICRATE;
        cnt_par = wminfo.partime / TICRATE;
        S_Sound (CHAN_INTERFACE, "world/barrelx", 1, ATTN_NONE);
        sp_state = 10;
    }

    if (sp_state == 2)
    {
        cnt_kills += 2;

        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        if (!wminfo.maxkills || cnt_kills >= (level.killed_monsters * 100) / wminfo.maxkills)
        {
            cnt_kills = (wminfo.maxkills) ? (level.killed_monsters * 100) / wminfo.maxkills : 0;
            S_Sound (CHAN_INTERFACE, "world/barrelx", 1, ATTN_NONE);
            sp_state++;
        }
    }
    else if (sp_state == 4)
    {
        cnt_items += 2;

        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        if (!wminfo.maxitems || cnt_items >= (level.found_items * 100) / wminfo.maxitems)
        {
            cnt_items = (wminfo.maxitems) ? (level.found_items * 100) / wminfo.maxitems : 0;
            S_Sound (CHAN_INTERFACE, "world/barrelx", 1, ATTN_NONE);
            sp_state++;
        }
    }
    else if (sp_state == 6)
    {
        cnt_secret += 2;

        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        if (!wminfo.maxsecret || cnt_secret >= (level.found_secrets * 100) / wminfo.maxsecret)
        {
            cnt_secret = (wminfo.maxsecret) ? (level.found_secrets * 100) / wminfo.maxsecret : 0;
            S_Sound (CHAN_INTERFACE, "world/barrelx", 1, ATTN_NONE);
            sp_state++;
        }
    }

    else if (sp_state == 8)
    {
        if (!(bcnt&3))
            S_Sound (CHAN_INTERFACE, "weapons/pistol", 1, ATTN_NONE);

        cnt_time += 3;

        if (cnt_time >= level.time / TICRATE)
            cnt_time = level.time / TICRATE;

        cnt_par += 3;

        if (cnt_par >= wminfo.partime / TICRATE)
        {
            cnt_par = wminfo.partime / TICRATE;

            if (cnt_time >= level.time / TICRATE)
            {
                S_Sound (CHAN_INTERFACE, "world/barrelx", 1, ATTN_NONE);
                sp_state++;
            }
        }
    }
    else if (sp_state == 10)
    {
        if (acceleratestage)
        {
            S_Sound (CHAN_INTERFACE, "weapons/shotgr", 1, ATTN_NONE);

            if ((gameinfo.flags & GI_MAPxx))
                WI_initNoState();
            else
                WI_initShowNextLoc();
        }
    }
    else if (sp_state & 1)
    {
        if (!--cnt_pause)
        {
            sp_state++;
            cnt_pause = TICRATE;
        }
    }

}
コード例 #17
0
ファイル: wi_stuff.c プロジェクト: hiro2233/libspmp8k-1
void WI_updateDeathmatchStats(void)
{

    int		i;
    int		j;
    
    boolean	stillticking;

    WI_updateAnimatedBack();

    if (acceleratestage && dm_state != 4)
    {
	acceleratestage = 0;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (playeringame[i])
	    {
		for (j=0 ; j<MAXPLAYERS ; j++)
		    if (playeringame[j])
			dm_frags[i][j] = plrs[i].frags[j];

		dm_totals[i] = WI_fragSum(i);
	    }
	}
	

	S_StartSound(0, sfx_barexp);
	dm_state = 4;
    }

    
    if (dm_state == 2)
    {
	if (!(bcnt&3))
	    S_StartSound(0, sfx_pistol);
	
	stillticking = false;

	for (i=0 ; i<MAXPLAYERS ; i++)
	{
	    if (playeringame[i])
	    {
		for (j=0 ; j<MAXPLAYERS ; j++)
		{
		    if (playeringame[j]
			&& dm_frags[i][j] != plrs[i].frags[j])
		    {
			if (plrs[i].frags[j] < 0)
			    dm_frags[i][j]--;
			else
			    dm_frags[i][j]++;

			if (dm_frags[i][j] > 99)
			    dm_frags[i][j] = 99;

			if (dm_frags[i][j] < -99)
			    dm_frags[i][j] = -99;
			
			stillticking = true;
		    }
		}
		dm_totals[i] = WI_fragSum(i);

		if (dm_totals[i] > 99)
		    dm_totals[i] = 99;
		
		if (dm_totals[i] < -99)
		    dm_totals[i] = -99;
	    }
	    
	}
	if (!stillticking)
	{
	    S_StartSound(0, sfx_barexp);
	    dm_state++;
	}

    }
    else if (dm_state == 4)
    {
	if (acceleratestage)
	{
	    S_StartSound(0, sfx_slop);

	    if ( gamemode == commercial)
		WI_initNoState();
	    else
		WI_initShowNextLoc();
	}
    }
    else if (dm_state & 1)
    {
	if (!--cnt_pause)
	{
	    dm_state++;
	    cnt_pause = TICRATE;
	}
    }
}
コード例 #18
0
ファイル: wi_stuff.c プロジェクト: amitahire/development
void WI_updateDeathmatchStats(void)
{

	int     i;
	int     j;
	boolean stillticking;

	WI_updateAnimatedBack();

	if(acceleratestage && dm_state != 4)
	{
		acceleratestage = 0;
		for(i = 0; i < NUM_TEAMS; i++)
		{
			//          if(teaminfo[i].members)
			//          {
			for(j = 0; j < NUM_TEAMS; j++)
			{
				//              if (players[i].plr->ingame)
				dm_frags[i][j] = teaminfo[i].frags[j];
			}
			dm_totals[i] = WI_fragSum(i);
			//          }
		}
		S_LocalSound(sfx_barexp, 0);
		dm_state = 4;
	}

	if(dm_state == 2)
	{
		if(!(bcnt & 3))
			S_LocalSound(sfx_pistol, 0);
		stillticking = false;
		for(i = 0; i < NUM_TEAMS; i++)
		{
			//          if (players[i].plr->ingame)
			{
				for(j = 0; j < NUM_TEAMS; j++)
				{
					if( /*players[i].plr->ingame && */ dm_frags[i][j] !=
					   teaminfo[i].frags[j])
					{
						if(teaminfo[i].frags[j] < 0)
							dm_frags[i][j]--;
						else
							dm_frags[i][j]++;

						if(dm_frags[i][j] > 99)
							dm_frags[i][j] = 99;

						if(dm_frags[i][j] < -99)
							dm_frags[i][j] = -99;

						stillticking = true;
					}
				}
				dm_totals[i] = WI_fragSum(i);

				if(dm_totals[i] > 99)
					dm_totals[i] = 99;

				if(dm_totals[i] < -99)
					dm_totals[i] = -99;
			}
		}
		if(!stillticking)
		{
			S_LocalSound(sfx_barexp, 0);
			dm_state++;
		}
	}
	else if(dm_state == 4)
	{
		if(acceleratestage)
		{
			S_LocalSound(sfx_slop, 0);
			if(gamemode == commercial)
				WI_initNoState();
			else
				WI_initShowNextLoc();
		}
	}
	else if(dm_state & 1)
	{
		if(!--cnt_pause)
		{
			dm_state++;
			cnt_pause = TICRATE;
		}
	}
}