本文整理匯總了C++中GetMarine函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetMarine函數的具體用法?C++ GetMarine怎麽用?C++ GetMarine使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetMarine函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: RemoveWeldingEffects
void CASW_Weapon_Welder::UpdateDoorWeldingEffects( void )
{
if ( !m_bIsFiring || !GetMarine() || !GetMarine()->GetMarineResource() )
{
RemoveWeldingEffects();
StopWelderSound();
return;
}
C_ASW_Door* pDoor = GetMarine()->GetMarineResource()->m_hWeldingDoor.Get();
if ( !pDoor || pDoor->IsOpen() )
{
RemoveWeldingEffects();
StopWelderSound();
return;
}
StartWelderSound();
if ( !m_hWeldEffects || m_bWeldSealLast != m_bWeldSeal )
{
CreateWeldingEffects( pDoor );
}
if ( m_hWeldEffects )
{
m_hWeldEffects->SetControlPoint( 0, pDoor->GetWeldFacingPoint( GetMarine() ) );
m_hWeldEffects->SetControlPointForwardVector( 0, pDoor->GetSparkNormal( GetMarine() ) );
}
m_bWeldSealLast = m_bWeldSeal;
}
示例2: MarineSkills
int CASW_Weapon_Assault_Shotgun::GetNumPellets()
{
if (GetMarine())
return MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_VINDICATOR, ASW_MARINE_SUBSKILL_VINDICATOR_PELLETS);
return GetWeaponInfo()->m_iNumPellets;
}
示例3: OffhandActivate
bool CASW_Weapon_Medkit::OffhandActivate()
{
if (!GetMarine() || GetMarine()->GetFlags() & FL_FROZEN) // don't allow this if the marine is frozen
return false;
SelfHeal();
return true;
}
示例4: OffhandActivate
bool CASW_Weapon_Buff_Grenade::OffhandActivate()
{
if (!GetMarine() || GetMarine()->GetFlags() & FL_FROZEN) // don't allow this if the marine is frozen
return false;
PrimaryAttack();
return true;
}
示例5: return
bool CASW_Weapon_Shotgun::ShouldUseFastReloadAnim()
{
if (GetMarine())
{
return (MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_RELOADING) < 1.06f);
}
return true;
}
示例6: OffhandActivate
bool CASW_Weapon_Stim::OffhandActivate()
{
if (!GetMarine() || GetMarine()->GetFlags() & FL_FROZEN) // don't allow this if the marine is frozen
return false;
if (m_flNextPrimaryAttack < gpGlobals->curtime)
PrimaryAttack();
return true;
}
示例7: GetWeaponInfo
float CASW_Weapon_Sniper_Rifle::GetWeaponDamage()
{
float flDamage = GetWeaponInfo()->m_flBaseDamage;
if ( GetMarine() )
{
flDamage += MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_ACCURACY, ASW_MARINE_SUBSKILL_ACCURACY_SNIPER_RIFLE_DMG);
}
return flDamage;
}
示例8: GetWeaponInfo
float CASW_Weapon_Autogun::GetWeaponDamage()
{
float flDamage = GetWeaponInfo()->m_flBaseDamage;
if ( GetMarine() )
{
flDamage += MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_AUTOGUN, ASW_MARINE_SUBSKILL_AUTOGUN_DMG);
}
return flDamage;
}
示例9: GetWeaponInfo
float CASW_Weapon_Shotgun::GetWeaponDamage()
{
float flDamage = GetWeaponInfo()->m_flBaseDamage;
if ( GetMarine() )
{
flDamage += MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_ACCURACY, ASW_MARINE_SUBSKILL_ACCURACY_SHOTGUN_DMG);
}
//CALL_ATTRIB_HOOK_FLOAT( flDamage, mod_damage_done );
return flDamage;
}
示例10: GetWeaponInfo
float CASW_Weapon_Minigun::GetWeaponDamage()
{
//float flDamage = 7.0f;
float flDamage = GetWeaponInfo()->m_flBaseDamage;
if ( GetMarine() )
{
flDamage += MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_AUTOGUN, ASW_MARINE_SUBSKILL_AUTOGUN_DMG);
}
//CALL_ATTRIB_HOOK_FLOAT( flDamage, mod_damage_done );
return flDamage;
}
示例11: GetWeaponInfo
float CASW_Weapon_Assault_Shotgun::GetWeaponDamage()
{
//float flDamage = 7.0f;
float flDamage = GetWeaponInfo()->m_flBaseDamage;
if ( GetMarine() )
{
flDamage += MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_VINDICATOR, ASW_MARINE_SUBSKILL_VINDICATOR_DAMAGE);
}
//CALL_ATTRIB_HOOK_FLOAT( flDamage, mod_damage_done );
return flDamage;
}
示例12: GetCommander
const QAngle& CASW_Weapon_Smart_Bomb::GetRocketAngle()
{
static QAngle angRocket = vec3_angle;
CASW_Player *pPlayer = GetCommander();
CASW_Marine *pMarine = GetMarine();
if ( !pPlayer || !pMarine || pMarine->GetHealth() <= 0 )
{
return angRocket;
}
//Vector vecDir = pPlayer->GetAutoaimVectorForMarine(pMarine, GetAutoAimAmount(), GetVerticalAdjustOnlyAutoAimAmount()); // 45 degrees = 0.707106781187
//VectorAngles( vecDir, angRocket );
//angRocket[ YAW ] += random->RandomFloat( -35, 35 );
angRocket[ PITCH ] = -60.0f; // aim up to help avoid FF
if ( GetRocketsToFire() % 2 )
{
angRocket[ YAW ] = m_iRocketsToFire * 15.0f; // 15 degrees between each rocket
}
else
{
angRocket[ YAW ] = RandomFloat( 0.0f, 360.0f );
}
angRocket[ ROLL ] = 0;
return angRocket;
}
示例13: GetMarine
float CASW_Weapon_Pistol::GetFireRate( void )
{
CASW_Marine *pMarine = GetMarine();
float flRate = GetWeaponInfo()->m_flFireRate;
// player firing rate
if (!pMarine || pMarine->IsInhabited())
{
return flRate;
}
#ifdef CLIENT_DLL
return flRate;
#else
float randomness = 0.1f * random->RandomFloat() - 0.05f;
// AI firing rate: depends on distance to enemy
if (!pMarine->GetEnemy())
return 0.3f + randomness;
float dist = pMarine->GetAbsOrigin().DistTo(pMarine->GetEnemy()->GetAbsOrigin());
if (dist > 500)
return 0.3f + randomness;
if (dist < 100)
return 0.14f + randomness;
float factor = (dist - 100) / 400.0f;
return 0.14f + factor * 0.16f + randomness;
#endif
}
示例14: GetCommander
void CASW_Weapon_Hornet_Barrage::FireRocket()
{
CASW_Player *pPlayer = GetCommander();
CASW_Marine *pMarine = GetMarine();
if ( !pPlayer || !pMarine || pMarine->GetHealth() <= 0 )
{
m_iRocketsToFire = 0;
return;
}
WeaponSound(SINGLE);
// tell the marine to tell its weapon to draw the muzzle flash
pMarine->DoMuzzleFlash();
pMarine->DoAnimationEvent( PLAYERANIMEVENT_FIRE_GUN_PRIMARY );
Vector vecSrc = GetRocketFiringPosition();
m_iRocketsToFire = m_iRocketsToFire.Get() - 1;
m_flNextLaunchTime = gpGlobals->curtime + m_flFireInterval.Get();
#ifndef CLIENT_DLL
float fGrenadeDamage = MarineSkills()->GetSkillBasedValueByMarine(pMarine, ASW_MARINE_SKILL_GRENADES, ASW_MARINE_SUBSKILL_GRENADE_HORNET_DMG );
CASW_Rocket::Create( fGrenadeDamage, vecSrc, GetRocketAngle(), pMarine, this );
if ( ASWGameRules() )
{
ASWGameRules()->m_fLastFireTime = gpGlobals->curtime;
}
pMarine->OnWeaponFired( this, 1 );
#endif
}
示例15: IsCarriedByLocalPlayer
const char *CASW_Weapon::GetASWShootSound( int iIndex, int &iPitch )
{
if ( iIndex == SINGLE || iIndex == SINGLE_NPC )
{
iIndex = IsCarriedByLocalPlayer() ? SINGLE : SINGLE_NPC;
}
if ( iIndex == WPN_DOUBLE || iIndex == DOUBLE_NPC )
{
iIndex = IsCarriedByLocalPlayer() ? WPN_DOUBLE : DOUBLE_NPC;
}
if ( iIndex == RELOAD || iIndex == RELOAD_NPC )
{
iIndex = IsCarriedByLocalPlayer() ? RELOAD : RELOAD_NPC;
// play the weapon sound according to marine skill
int iSkill = MarineSkills()->GetSkillBasedValueByMarine(GetMarine(), ASW_MARINE_SKILL_RELOADING, ASW_MARINE_SUBSKILL_RELOADING_SOUND);
switch (iSkill)
{
case 5: return GetWpnData().aShootSounds[ FAST_RELOAD ]; break;
case 4: iPitch = 120; return GetWpnData().aShootSounds[ iIndex ]; break;
case 3: iPitch = 115; return GetWpnData().aShootSounds[ iIndex ]; break;
case 2: iPitch = 110; return GetWpnData().aShootSounds[ iIndex ]; break;
case 1: iPitch = 105; return GetWpnData().aShootSounds[ iIndex ]; break;
default: return GetWpnData().aShootSounds[ iIndex ]; break;
};
}
return GetShootSound( iIndex );
}