- 听众
- 收听
- 积分
- 2462
- 主题
- 回帖
- 0
- 精华
注册时间2006-9-30
最后登录1970-1-1
该用户从未签到
|
发表于 2007-10-4 20:21:00
|
显示全部楼层
回复:ljs插件的已知bug
public fwdPlayerPostThink(id) {
if( is_user_alive(id) ) {
pev(id, pev_angles, angle);
if (old_angle1[id] > angle[1]) {
turning_left[id] = false;
turning_right[id] = true;
} else if (old_angle1[id] < angle[1]) {
turning_left[id] = true;
turning_right[id] = false;
} else {
turning_left[id] = false;
turning_right[id] = false;
}
if (straifing_aw[id] == false
&& (pev(id, pev_button)&IN_MOVELEFT
|| pev(id, pev_button)&IN_FORWARD)
&& (turning_left[id] == true
|| turning_right[id] == true )
&& !(pev(id, pev_button)&IN_MOVERIGHT
|| pev(id, pev_button)&IN_BACK))
{
straifing_aw[id] = true;
straifing_sd[id] = false;
strafes[id] += INFO_ONE;
}
else if (straifing_sd[id] == false
&& (pev(id, pev_button)&IN_MOVERIGHT
|| pev(id, pev_button)&IN_BACK)
&& (turning_left[id] == true
|| turning_right[id] == true )
&& !(pev(id, pev_button)&IN_MOVELEFT
|| pev(id, pev_button)&IN_FORWARD))
{
straifing_aw[id] = false;
straifing_sd[id] = true;
strafes[id] += INFO_ONE;
}
if( pev(id, pev_flags)&FL_ONGROUND
&& gInAir[id] == true )
{
fwdPlayerPreThink(id);
}
}
} |
|