Exemplo n.º 1
0
void CFLAMETHROWER::WeaponIdle( void )
{
	Burn();

	if (m_pPlayer->pev->waterlevel == 3 || m_iClip <=0 || burn==0)
		STOP_SOUND( ENT(m_pPlayer->pev), CHAN_WEAPON, "player/pl_burn.wav" );

	if ( gpGlobals->time >= m_flShockTime && burn==1)
	{
		EMIT_SOUND(ENT(m_pPlayer->pev), CHAN_WEAPON, "player/pl_burn.wav", 0.3, ATTN_NORM );
		m_flShockTime = gpGlobals->time + 1.8;
	}

	if (m_flTimeWeaponIdle > gpGlobals->time)
		return;

	int iAnim;
	switch ( RANDOM_LONG( 0, 1 ) )
	{
	case 0:	
		iAnim = FLAMETHROWER_IDLE;	
		break;
	default:
	case 1:
		iAnim = FLAMETHROWER_IDLE2;
		break;
	}
	SendWeaponAnim( iAnim );
	m_flTimeWeaponIdle = gpGlobals->time + RANDOM_FLOAT ( 10, 15 );
}
Exemplo n.º 2
0
 void Test(int niter, int time_dimension, int burn = 0) {
   SimulateData(time_dimension);
   BuildModel();
   CreateObservationSpace(niter);
   if (burn > 0) {
     Burn(burn);
   }
   RunMcmc(niter);
   Check();
 }