Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled diff
创建于
7年前
差异永不过期
清除
导出
分享
解释
3 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
44 行
全部复制
4 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
45 行
全部复制
复制
已复制
复制
已复制
#include <keyboard.gph>
// TOGGLES
// TOGGLES
bool bAntiRecoil = TRUE;
bool bAntiRecoil = TRUE;
bool key_f2_event; // F2
bool key_f2_event; // F2
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// VARIABLES & DEFINES [SETTINGS]
// VARIABLES & DEFINES [SETTINGS]
复制
已复制
复制
已复制
#define StickNoise 4.32
fix32 RECOIL_V = 4.5; // Adjust Vertical Anti-Recoil //
fix32 RECOIL_V = 4.5; // Adjust Vertical Anti-Recoil //
fix32 RECOIL_H = 0.0; // Adjust Horizontal Anti-Recoil //
fix32 RECOIL_H = 0.0; // Adjust Horizontal Anti-Recoil //
复制
已复制
复制
已复制
#define ANTI_RECOIL_KEY KEY_F2 // F2 " Anti-Recoil //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Anti-Recoil
// Anti-Recoil
main {
main {
// toggle
// toggle
if(key_status(ANTI_RECOIL_KEY)) {
if(key_status(ANTI_RECOIL_KEY)) {
if(!key_f2_event) {
if(!key_f2_event) {
key_f2_event = TRUE;
key_f2_event = TRUE;
bAntiRecoil = !bAntiRecoil;
bAntiRecoil = !bAntiRecoil;
}
}
} else key_f2_event = FALSE;
} else key_f2_event = FALSE;
if (bAntiRecoil && get_val(BUTTON_5)) {
if (bAntiRecoil && get_val(BUTTON_5)) {
// Remove small unwanted movement as your controller sticks may not return to zero exactly after release.
// Remove small unwanted movement as your controller sticks may not return to zero exactly after release.
if(abs(get_actual(STICK_1_X)) < StickNoise) { set_val(STICK_1_X, 0.0); }
if(abs(get_actual(STICK_1_X)) < StickNoise) { set_val(STICK_1_X, 0.0); }
if(abs(get_actual(STICK_1_Y)) < StickNoise) { set_val(STICK_1_Y, 0.0); }
if(abs(get_actual(STICK_1_Y)) < StickNoise) { set_val(STICK_1_Y, 0.0); }
AntiRecoil(STICK_1_Y,RECOIL_V); // Y Axis - vertical recoil compensation
AntiRecoil(STICK_1_Y,RECOIL_V); // Y Axis - vertical recoil compensation
AntiRecoil(STICK_1_X,RECOIL_H); // X Axis - horizontal recoil compensation
AntiRecoil(STICK_1_X,RECOIL_H); // X Axis - horizontal recoil compensation
}
}
复制
已复制
复制
已复制
}
// this is the function applying the anti recoil
// this is the function applying the anti recoil
void AntiRecoil (uint8 axis, fix32 recoil)
void AntiRecoil (uint8 axis, fix32 recoil)
{
{
fix32 RY = get_actual(STICK_1_Y); // read the actual stick y value
fix32 RY = get_actual(STICK_1_Y); // read the actual stick y value
fix32 RX = get_actual(STICK_1_X); // read the actual sitck x value
fix32 RX = get_actual(STICK_1_X); // read the actual sitck x value
// only apply anti recoil if the actual movement of x&y is lower than the recoil to apply
// only apply anti recoil if the actual movement of x&y is lower than the recoil to apply
if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil))
if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil))
{
{
if(abs(RY) <= abs(recoil)) // only apply when y movement is lower than the recoil to apply
if(abs(RY) <= abs(recoil)) // only apply when y movement is lower than the recoil to apply
{
{
set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis));
set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis));
}
}
}
}
}
}
复制
已复制
复制
已复制
}
已保存差异
原始文本
打开文件
// TOGGLES bool bAntiRecoil = TRUE; bool key_f2_event; // F2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // VARIABLES & DEFINES [SETTINGS] fix32 RECOIL_V = 4.5; // Adjust Vertical Anti-Recoil // fix32 RECOIL_H = 0.0; // Adjust Horizontal Anti-Recoil // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Anti-Recoil main { // toggle if(key_status(ANTI_RECOIL_KEY)) { if(!key_f2_event) { key_f2_event = TRUE; bAntiRecoil = !bAntiRecoil; } } else key_f2_event = FALSE; if (bAntiRecoil && get_val(BUTTON_5)) { // Remove small unwanted movement as your controller sticks may not return to zero exactly after release. if(abs(get_actual(STICK_1_X)) < StickNoise) { set_val(STICK_1_X, 0.0); } if(abs(get_actual(STICK_1_Y)) < StickNoise) { set_val(STICK_1_Y, 0.0); } AntiRecoil(STICK_1_Y,RECOIL_V); // Y Axis - vertical recoil compensation AntiRecoil(STICK_1_X,RECOIL_H); // X Axis - horizontal recoil compensation } // this is the function applying the anti recoil void AntiRecoil (uint8 axis, fix32 recoil) { fix32 RY = get_actual(STICK_1_Y); // read the actual stick y value fix32 RX = get_actual(STICK_1_X); // read the actual sitck x value // only apply anti recoil if the actual movement of x&y is lower than the recoil to apply if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil)) { if(abs(RY) <= abs(recoil)) // only apply when y movement is lower than the recoil to apply { set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis)); } } } }
更改后文本
打开文件
#include <keyboard.gph> // TOGGLES bool bAntiRecoil = TRUE; bool key_f2_event; // F2 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // VARIABLES & DEFINES [SETTINGS] #define StickNoise 4.32 fix32 RECOIL_V = 4.5; // Adjust Vertical Anti-Recoil // fix32 RECOIL_H = 0.0; // Adjust Horizontal Anti-Recoil // #define ANTI_RECOIL_KEY KEY_F2 // F2 " Anti-Recoil // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Anti-Recoil main { // toggle if(key_status(ANTI_RECOIL_KEY)) { if(!key_f2_event) { key_f2_event = TRUE; bAntiRecoil = !bAntiRecoil; } } else key_f2_event = FALSE; if (bAntiRecoil && get_val(BUTTON_5)) { // Remove small unwanted movement as your controller sticks may not return to zero exactly after release. if(abs(get_actual(STICK_1_X)) < StickNoise) { set_val(STICK_1_X, 0.0); } if(abs(get_actual(STICK_1_Y)) < StickNoise) { set_val(STICK_1_Y, 0.0); } AntiRecoil(STICK_1_Y,RECOIL_V); // Y Axis - vertical recoil compensation AntiRecoil(STICK_1_X,RECOIL_H); // X Axis - horizontal recoil compensation } } // this is the function applying the anti recoil void AntiRecoil (uint8 axis, fix32 recoil) { fix32 RY = get_actual(STICK_1_Y); // read the actual stick y value fix32 RX = get_actual(STICK_1_X); // read the actual sitck x value // only apply anti recoil if the actual movement of x&y is lower than the recoil to apply if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil)) { if(abs(RY) <= abs(recoil)) // only apply when y movement is lower than the recoil to apply { set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis)); } } }
查找差异