Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
显示
视图
拆分
统一
实时编辑器
隐藏空白更改
折叠未更改行
关闭换行
比对精度
智能
语法
无
更改外观
处理
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled diff
创建于
8年前
差异永不过期
清除
导出
分享
解释
1 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
30 行
全部复制
1 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
30 行
全部复制
public void OnSafetyCarEvent()
public void OnSafetyCarEvent()
{
{
复制
已复制
复制
已复制
if (!this.mVehicle.isPlayerDriver || Game.instance.sessionManager.
isUsingAIForPlayerDrivers
)
if (!this.mVehicle.isPlayerDriver || Game.instance.sessionManager.
isUsingAIForPitting
)
{
{
bool flag = false;
bool flag = false;
float mAggressiveness = this.mVehicle.driver.contract.GetTeam().aiWeightings.mAggressiveness;
float mAggressiveness = this.mVehicle.driver.contract.GetTeam().aiWeightings.mAggressiveness;
float num = Mathf.Clamp01(1f - this.mVehicle.pathController.GetRaceDistanceTraveled01());
float num = Mathf.Clamp01(1f - this.mVehicle.pathController.GetRaceDistanceTraveled01());
float num2 = GameUtility.MilesToMeters(Game.instance.sessionManager.eventDetails.circuit.trackLengthMiles) * (float)Game.instance.sessionManager.lapCount;
float num2 = GameUtility.MilesToMeters(Game.instance.sessionManager.eventDetails.circuit.trackLengthMiles) * (float)Game.instance.sessionManager.lapCount;
float num3 = num2 * num;
float num3 = num2 * num;
float num4 = (mAggressiveness >= 0.5f) ? 0.55f : 0.35f;
float num4 = (mAggressiveness >= 0.5f) ? 0.55f : 0.35f;
TyreSet tyreSet = this.mVehicle.setup.currentSetup.tyreSet;
TyreSet tyreSet = this.mVehicle.setup.currentSetup.tyreSet;
if (tyreSet.GetCondition() < num4 && tyreSet.GetOptimalTyreDistance() < num3)
if (tyreSet.GetCondition() < num4 && tyreSet.GetOptimalTyreDistance() < num3)
{
{
flag = true;
flag = true;
}
}
ChampionshipRules rules = this.mVehicle.championship.rules;
ChampionshipRules rules = this.mVehicle.championship.rules;
if (rules.isRefuelingOn)
if (rules.isRefuelingOn)
{
{
float fuelDistance = this.mVehicle.performance.fuel.GetFuelDistance();
float fuelDistance = this.mVehicle.performance.fuel.GetFuelDistance();
if (this.mVehicle.performance.fuel.GetNormalisedFuelLevel() < num4 && fuelDistance < num3)
if (this.mVehicle.performance.fuel.GetNormalisedFuelLevel() < num4 && fuelDistance < num3)
{
{
flag = true;
flag = true;
}
}
}
}
if (flag)
if (flag)
{
{
this.PlanPitstop();
this.PlanPitstop();
}
}
}
}
}
}
已保存差异
原始文本
打开文件
public void OnSafetyCarEvent() { if (!this.mVehicle.isPlayerDriver || Game.instance.sessionManager.isUsingAIForPlayerDrivers) { bool flag = false; float mAggressiveness = this.mVehicle.driver.contract.GetTeam().aiWeightings.mAggressiveness; float num = Mathf.Clamp01(1f - this.mVehicle.pathController.GetRaceDistanceTraveled01()); float num2 = GameUtility.MilesToMeters(Game.instance.sessionManager.eventDetails.circuit.trackLengthMiles) * (float)Game.instance.sessionManager.lapCount; float num3 = num2 * num; float num4 = (mAggressiveness >= 0.5f) ? 0.55f : 0.35f; TyreSet tyreSet = this.mVehicle.setup.currentSetup.tyreSet; if (tyreSet.GetCondition() < num4 && tyreSet.GetOptimalTyreDistance() < num3) { flag = true; } ChampionshipRules rules = this.mVehicle.championship.rules; if (rules.isRefuelingOn) { float fuelDistance = this.mVehicle.performance.fuel.GetFuelDistance(); if (this.mVehicle.performance.fuel.GetNormalisedFuelLevel() < num4 && fuelDistance < num3) { flag = true; } } if (flag) { this.PlanPitstop(); } } }
更改后文本
打开文件
public void OnSafetyCarEvent() { if (!this.mVehicle.isPlayerDriver || Game.instance.sessionManager.isUsingAIForPitting) { bool flag = false; float mAggressiveness = this.mVehicle.driver.contract.GetTeam().aiWeightings.mAggressiveness; float num = Mathf.Clamp01(1f - this.mVehicle.pathController.GetRaceDistanceTraveled01()); float num2 = GameUtility.MilesToMeters(Game.instance.sessionManager.eventDetails.circuit.trackLengthMiles) * (float)Game.instance.sessionManager.lapCount; float num3 = num2 * num; float num4 = (mAggressiveness >= 0.5f) ? 0.55f : 0.35f; TyreSet tyreSet = this.mVehicle.setup.currentSetup.tyreSet; if (tyreSet.GetCondition() < num4 && tyreSet.GetOptimalTyreDistance() < num3) { flag = true; } ChampionshipRules rules = this.mVehicle.championship.rules; if (rules.isRefuelingOn) { float fuelDistance = this.mVehicle.performance.fuel.GetFuelDistance(); if (this.mVehicle.performance.fuel.GetNormalisedFuelLevel() < num4 && fuelDistance < num3) { flag = true; } } if (flag) { this.PlanPitstop(); } } }
查找差异