forked from CWX/CWX-mods
fix for shoreline
This commit is contained in:
parent
88e08ecab7
commit
2d787de939
Binary file not shown.
@ -4,8 +4,8 @@ Copyright (c) [year] [fullname]. All rights reserved.
|
|||||||
|
|
||||||
Developed by:
|
Developed by:
|
||||||
[CWX]
|
[CWX]
|
||||||
[https://github.com/CWXDEV/CWX-DeSharpener]
|
[https://dev.sp-tarkov.com/CWX/CWX-BushWhacker]
|
||||||
[https://hub.sp-tarkov.com/files/file/455-cwx-desharpener/]
|
[https://hub.sp-tarkov.com/files/file/519-cwx-masterkey/]
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person
|
Permission is hereby granted, free of charge, to any person
|
||||||
obtaining a copy of this software and associated documentation files
|
obtaining a copy of this software and associated documentation files
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "BUSHWHACKER",
|
"name": "BUSHWHACKER",
|
||||||
"author": "CWX",
|
"author": "CWX",
|
||||||
"version": "1.1.0",
|
"version": "1.0.1",
|
||||||
"license": "NCSA",
|
"license": "NCSA",
|
||||||
"main": "package.js",
|
"main": "package.js",
|
||||||
"akiVersion": "3.0.0"
|
"akiVersion": "2.3.1"
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
@ -11,10 +11,10 @@ namespace BushWhacker
|
|||||||
{
|
{
|
||||||
return typeof(GameWorld).GetMethod("OnGameStarted", BindingFlags.Public | BindingFlags.Instance);
|
return typeof(GameWorld).GetMethod("OnGameStarted", BindingFlags.Public | BindingFlags.Instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
[PatchPostfix]
|
[PatchPostfix]
|
||||||
public static void PatchPostFix()
|
public static void PatchPostFix()
|
||||||
{
|
{
|
||||||
Debug.LogError("test patch");
|
|
||||||
BushWhacker.DisableBushes();
|
BushWhacker.DisableBushes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,16 @@ namespace BushWhacker
|
|||||||
|
|
||||||
public static void DisableBushes()
|
public static void DisableBushes()
|
||||||
{
|
{
|
||||||
var gameWorld = Singleton<GameWorld>.Instance;
|
var bushes = FindObjectsOfType<ObstacleCollider>().ToList();
|
||||||
var bushes = GameObject.FindObjectsOfType<ObstacleCollider>().ToList();
|
Debug.LogError(bushes.Count);
|
||||||
foreach (var bushesItem in bushes)
|
foreach (var bushesItem in bushes)
|
||||||
{
|
{
|
||||||
if (bushesItem.transform.parent.gameObject.name.Contains("filbert") || bushesItem.transform.parent.gameObject.name.Contains("fibert"))
|
Debug.LogError("1");
|
||||||
|
var filbert = bushesItem?.transform?.parent?.gameObject?.name?.Contains("filbert");
|
||||||
|
var fibert = bushesItem?.transform?.parent?.gameObject?.name?.Contains("fibert");
|
||||||
|
if (filbert == true || fibert == true)
|
||||||
{
|
{
|
||||||
Object.DestroyImmediate(bushesItem);
|
DestroyImmediate(bushesItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user