Exemplo n.º 1
0
void CPlayer::Disconnect()
{
	if ( ignoreBots(pEdict) || !isModuleActive() ) // ignore if he is bot and bots rank is disabled or module is paused
		return;
	rank->updatePosition( &life );
	ingame = false;
}
Exemplo n.º 2
0
void CPlayer::saveBDefusing()
{
	if ( !isModuleActive() )
		return;

	life.bDefusions++;
}
Exemplo n.º 3
0
void CPlayer::Disconnect()
{
	ingame = false;
	bot = false;
	savedScore = 0;

	oldteam = 0;
	oldclass = 0;
	oldprone = 0;
	oldstamina = 0.0f;

	// Model Stuff
	sModel.is_model_set = false;
	sModel.body_num = 0;

	// Object stuff
	object.pEdict = NULL;
	object.type = 0;
	object.carrying = false;
	object.do_forward = false;

	if ( ignoreBots(pEdict) || !isModuleActive() ) // ignore if he is bot and bots rank is disabled or module is paused
		return;

	rank->updatePosition( &life );

}
Exemplo n.º 4
0
void CPlayer::saveBDefused()
{
	if ( !isModuleActive() )
		return;

	life.bDefused++;
}
Exemplo n.º 5
0
void CPlayer::saveBExplode()
{
	if ( !isModuleActive() )
		return;

	life.bExplosions++;
}
Exemplo n.º 6
0
void CPlayer::saveBPlant()
{
	if ( !isModuleActive() )
		return;

	life.bPlants++;
}
Exemplo n.º 7
0
void CPlayer::saveKill(CPlayer* pVictim, int wweapon, int hhs, int ttk)
{
	if ( !isModuleActive() )
		return;

	if ( ignoreBots(pEdict,pVictim->pEdict) )
		return;

	if ( pVictim->index == index ){ // killed self
		pVictim->weapons[0].deaths++;
		pVictim->life.deaths++;
		pVictim->weaponsRnd[0].deaths++;       // DEC-Weapon (round) stats
		return;
	}

	pVictim->attackers[index].name = weaponData[wweapon].name;
	pVictim->attackers[index].kills++;
	pVictim->attackers[index].hs += hhs;
	pVictim->attackers[index].tks += ttk;
	pVictim->attackers[0].kills++;
	pVictim->attackers[0].hs += hhs;
	pVictim->attackers[0].tks += ttk;
	pVictim->weapons[pVictim->current].deaths++;
	pVictim->weapons[0].deaths++;
	pVictim->life.deaths++;
	
	
	pVictim->weaponsRnd[pVictim->current].deaths++; // DEC-Weapon (round) stats
	pVictim->weaponsRnd[0].deaths++;                   // DEC-Weapon (round) stats
	
	int vi = pVictim->index;
	victims[vi].name = weaponData[wweapon].name;
	victims[vi].deaths++;
	victims[vi].hs += hhs;
	victims[vi].tks += ttk;
	victims[0].deaths++;
	victims[0].hs += hhs;
	victims[0].tks += ttk;
	
	weaponsRnd[wweapon].kills++;                // DEC-Weapon (round) stats
	weaponsRnd[wweapon].hs += hhs;         // DEC-Weapon (round) stats
	weaponsRnd[wweapon].tks += ttk;     // DEC-Weapon (round) stats
	weaponsRnd[0].kills++;                     // DEC-Weapon (round) stats
	weaponsRnd[0].hs += hhs;              // DEC-Weapon (round) stats
	weaponsRnd[0].tks += ttk;          // DEC-Weapon (round) stats
	
	weapons[wweapon].kills++;
	weapons[wweapon].hs += hhs;
	weapons[wweapon].tks += ttk;
	weapons[0].kills++;
	weapons[0].hs += hhs;
	weapons[0].tks += ttk;
	life.kills++;
	life.hs += hhs;
	life.tks += ttk;
}
Exemplo n.º 8
0
void CPlayer::Disconnect(){

	if ( ignoreBots(pEdict) || !isModuleActive() ) // ignore if he is bot and bots rank is disabled or module is paused
		return;

	if (rank != 0) // Just a sanity check, FL_FAKECLIENT is notoriously unreliable.
	{
		rank->updatePosition( &life );
	}
		
	rank = 0;
}
Exemplo n.º 9
0
void CPlayer::saveShot(int weapon)
{
	if ( !isModuleActive() )
		return;

	if ( ignoreBots(pEdict) )
		return;

	victims[0].shots++;
	weapons[weapon].shots++;
	weapons[0].shots++;
	life.shots++;
	weaponsRnd[weapon].shots++;       // DEC-Weapon (round) stats
	weaponsRnd[0].shots++;            // DEC-Weapon (round) stats
}
Exemplo n.º 10
0
void CPlayer::saveHit(CPlayer* pVictim, int wweapon, int ddamage, int bbody)
{
	if ( !isModuleActive() )
		return;

	if ( ignoreBots(pEdict,pVictim->pEdict) )
		return;

	if ( index == pVictim->index ) return;

	pVictim->attackers[index].hits++;
	pVictim->attackers[index].damage += ddamage;
	pVictim->attackers[index].bodyHits[bbody]++;
	pVictim->attackers[0].hits++;
	pVictim->attackers[0].damage += ddamage;
	pVictim->attackers[0].bodyHits[bbody]++;


	int vi = pVictim->index;
	victims[vi].hits++;
	victims[vi].damage += ddamage;
	victims[vi].bodyHits[bbody]++;
	victims[0].hits++;
	victims[0].damage += ddamage;
	victims[0].bodyHits[bbody]++;

	weaponsRnd[wweapon].hits++;              // DEC-Weapon (round) stats
	weaponsRnd[wweapon].damage += ddamage;    // DEC-Weapon (round) stats
	weaponsRnd[wweapon].bodyHits[bbody]++;   // DEC-Weapon (round) stats
	weaponsRnd[0].hits++;                   // DEC-Weapon (round) stats
	weaponsRnd[0].damage += ddamage;         // DEC-Weapon (round) stats
	weaponsRnd[0].bodyHits[bbody]++;        // DEC-Weapon (round) stats

	weapons[wweapon].hits++;
	weapons[wweapon].damage += ddamage;
	weapons[wweapon].bodyHits[bbody]++;
	weapons[0].hits++;
	weapons[0].damage += ddamage;
	weapons[0].bodyHits[bbody]++;

	life.hits++;
	life.damage += ddamage;
	life.bodyHits[bbody]++;
}