找了很久了! 终于... 我们看看source code 吧
所在版块:技术の宅 发贴时间:2003-10-06 03:26

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
看看AK47的各项系数


void CAK47::Spawn()
{
CCSBaseGunInfo info;

info.m_flAccuracyDivisor = 200;
info.m_flAccuracyOffset = 0.35;
info.m_flMaxInaccuracy = 1.25;

info.m_iPenetration = 2;
info.m_iDamage = 36;
info.m_flRangeModifier = 0.98;

info.m_flTimeToIdleAfterFire = 1.9;
info.m_flIdleInterval = 20;

CSBaseGunSpawn( &info );
}


void CAK47::AK47Fire( float flSpread, float flCycleTime )
{
if ( !CSBaseGunFire( flSpread, flCycleTime ) )
return;

CCSPlayer *pPlayer = GetPlayerOwner();

if (pPlayer->GetAbsVelocity().Length2D() > 0 )
KickBack ( 1.5, 0.45, 0.225, 0.05, 6.5, 2.5, 7 );
else if ( !FBitSet( pPlayer->GetFlags(), FL_ONGROUND ) )
KickBack ( 2, 1.0, 0.5, 0.35, 9, 6, 5 );
else if ( FBitSet( pPlayer->GetFlags(), FL_DUCKING ) )
KickBack ( 0.9, 0.35, 0.15, 0.025, 5.5, 1.5, 9 );
else
KickBack ( 1, 0.375, 0.175, 0.0375, 5.75, 1.75, 8 );
}


void CAK47::PrimaryAttack()
{
CCSPlayer *pPlayer = GetPlayerOwner();
if ( !pPlayer )
Error( "CAK47::PrimaryAttack - !pPlayer" );

if ( !FBitSet( pPlayer->GetFlags(), FL_ONGROUND ) )
AK47Fire( 0.04 + (0.4) * m_flAccuracy, 0.0955 );
else if (pPlayer->GetAbsVelocity().Length2D() > 140)
AK47Fire( 0.04 + (0.07) * m_flAccuracy, 0.0955 );
else
AK47Fire( (0.0275) * m_flAccuracy, 0.0955 );
}
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

War is peace.
Freedom is slavery.
Ignorance is strength.
 相关帖子 我要回复↙ ↗回到正文
Half Life 2 source code 沐流   (64 bytes , 655reads )
我也想要,我在ntu! 爱你痛到不知痛   (28 bytes , 139reads )
我最近msn老连不上,哪位给这个朋友发一个吧 沐流   (0 bytes , 129reads )
有这句话就是朋友! 爱你痛到不知痛   (0 bytes , 102reads )
NTU的FTP上还没有?? SmellsLikeTeenSpirit   (0 bytes , 121reads )
i didnt think any ftp got! 爱你痛到不知痛   (0 bytes , 107reads )
Scqllw's FTP got 崃仔   (27 bytes , 128reads )
怎么服务器又连不上了? touby   (0 bytes , 163reads )
今天晚上我可以再share一下 沐流   (0 bytes , 108reads )
找了很久了! 终于... 我们看看source code 吧 SmellsLikeTeenSpirit   (1275 bytes , 408reads )
可以研究了写作弊器,然后卖钱,哇哈哈哈 那个谁   (0 bytes , 114reads )
下载下来了. 但不知道怎么看. 汗!! 崃仔   (0 bytes , 121reads )
我用VS.NET 看的. SmellsLikeTeenSpirit   (47 bytes , 177reads )