Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public static Map createMap(string name){
public static bool currentlyPlayingCustomMap = false;
public static int lastCustomMapID = -1;
public static bool allObjectsTextured = false;
public static bool globalPointFiltering = false;
public static bool gameLoaded = false;
public static bool addedGamemodeSupportedMaps = false;
public static string customMapPath;
Expand Down Expand Up @@ -218,8 +219,11 @@ public static void onSceneLoad(Scene scene, LoadSceneMode mode) {
{
string config = System.IO.File.ReadAllText(mapConfigPath);
allObjectsTextured = false;
globalPointFiltering = false;
if (config.Contains("allObjectsTextured"))
allObjectsTextured = true;
if (config.Contains("globalPointFiltering"))
globalPointFiltering = true;
string lightIntensity = tryGetValue(config, "lightingIntensity");
if (lightIntensity != null) {
Light light = GameObject.Find("Directional Light").GetComponent<Light>();
Expand Down Expand Up @@ -395,7 +399,7 @@ public static void PostFix(MonoBehaviourPublicGaplfoGaTrorplTrRiBoUnique __insta
public static bool defaultLoaderActions(GameObject go, Mesh msh) {
MeshFilter mf = go.GetComponent<MeshFilter>();
MeshRenderer mr = go.GetComponent<MeshRenderer>();
if (go.name.Contains("pixel")) {
if (go.name.Contains("pixel") || globalPointFiltering) {
mr.material.mainTexture.filterMode = FilterMode.Point;
}
if (go.name.Contains("spawnzone"))
Expand Down