- UID
- 2403496
- 主题
- 20
- 阅读权限
- 30
- 帖子
- 447
- 精华
- 0
- 积分
- 255
- 金钱
- 8471
- 荣誉
- 3
- 人气
- 12
- 在线时间
- 3769 小时
- 评议
- 0
- 帖子
- 447
- 精华
- 0
- 积分
- 255
- 金钱
- 8471
- 荣誉
- 3
- 人气
- 12
- 评议
- 0
|
本帖最后由 zzz3265 于 2020-4-4 09:52 编辑
游戏有bot在附近时, 每几秒就卡顿一下, 可以从日志看到错误
GClass150::MaxBulletCount
修改如下
public int MaxBulletCount
{
get
{
if (this.ShootController == null)
{
return 0;
}
Weapon item = this.ShootController.Item;
if (item.ReloadMode == Weapon.EReloadMode.OnlyBarrel)
{
return item.Chambers.Length;
}
return 2;
}
}
当发电机放上燃料, 然后玩过一段时间后, 燃料消耗完成, 这时进入游戏时会提示错误: Object reference not set to an instance of an object
原因是在燃料消耗完成后删除物品时没删除干净, 简单的办法是把存档文件自己添加上这个物品
为了防止这个问题, 可以修改成燃料无限, 不去执行消耗部分的代码
文件 EmuTarkov-Server\src\classes\keepalive.js 113行左右
修改后如下:
function updateFuel(generatorArea,solarPower)
{
return generatorArea;
也可以修改dll文件, 用dnyspy
修改后如下
public override void Init(AreaData area, AreaInfo profileInfo)
{
base.Init(area, profileInfo);
this.method_10();
GClass1430[] array = new GClass1430[base.Slots.NumberOfSlots];
for (int i = 0; i < profileInfo.slots.Length; i++)
{
GClass1144 gclass = profileInfo.slots;
if (((gclass != null) ? gclass.Items : null) != null && gclass.Items.Length != 0)
{
try
{
Dictionary<string, Item> items = Singleton<GClass877>.Instance.FlatItemsToTree(gclass.Items, false, null).Items;
array = (items.FirstOrDefault<KeyValuePair<string, Item>>().Value as GClass1440);
}
catch (Exception message)
{
Debug.LogError(message);
}
}
}
钥匙太麻烦? 有大力神腿, 所有门都可以用脚踹开
door.BreachSuccessRoll
修改后如下
public bool BreachSuccessRoll(Vector3 yourPosition)
{
if (this.CanBeBreached)
{
}
if (this.Operatable)
{
Vector3 vector = base.transform.TransformPoint(this.viewTarget1) - yourPosition;
Vector3 a = base.GetDoorRotation(this.GetAngle(EDoorState.Shut)) * WorldInteractiveObject.GetRotationAxis(this.DoorForward, base.transform);
Vector3 b = base.GetDoorRotation(this.GetAngle(EDoorState.Open)) * WorldInteractiveObject.GetRotationAxis(this.DoorForward, base.transform);
Vector3 vector2 = a + b;
Vector2.Dot(new Vector2(vector.x, vector.z).normalized, new Vector2(vector2.x, vector2.z).normalized);
return true;
}
return false;
}
任务物品有几率不刷新出来, 导致游戏找不到
添加代码可把物品显示到日志, 可确定是否有刷新
GameWorld.method_13
LootItem lootItem = this.method_11(gclass, true, player, null);
Debug.LogError("spawned lootItem:{0} netId:{1}" + gclass.Item.ShortName.Localized());
if (lootItem != null && this.World_0 != null)
{
this.World_0.AddSpawnQuestLootPacket(SimpleZlib.CompressToBytes(this.SerializeLootItem(lootItem).ToJson(Array.Empty<JsonConverter>()), 9, null));
} |
|