Mapeditor - Auto-Terrain feature for slopes maybe?
Posted: Mon Apr 29, 2024 4:29 pm
The Endru changes - not yet ported to Unity.
---------
Unitybe - terrain
Beérkező levelek
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 18., Sze 7:58
címzett: én
TerrainJoinFile:
getSurroundingTileIDsToSearchFor
splitByteKey
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 20., P 22:17
címzett: én
---------------------
findMatchingByteTileRelTileID:
//Endru1241: to check with groups
Integer tileIDtoCheck = surroundingTileTypeIDs;
if (tileIDtoCheck == null) tileIDtoCheck = 0; //replace by 0 if null to avoid crash with comparison
//Endru1241 end: to check with groups
---------------------
ugyanott:
//if (!isTileInGroup(value, valueInKey)) {
if (!isTileInGroup(tileIDtoCheck, valueInKey)) { //Endru1241: changed to check real tileID
-------------------
getreplacementtile:
calling új paraméterrel
Mézes Zerotouch <zerotouchsystems@gmail.com> ezt írta (időpont: 2022. máj. 18., Sze, 7:58):
TerrainJoinFile:
getSurroundingTileIDsToSearchFor
splitByteKey
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 22., V 21:05
címzett: én
new:
getreplacementtile: (also changing parameter to arraylist)
ArrayList<Integer> reversedSurroundingTileTypeIDs = new ArrayList<Integer>();
for (int i = 0; i < surroundingTileTypeIDs.length; i++) {
reversedSurroundingTileTypeIDs.add(0, surroundingTileTypeIDs);
}
newTile = findMatchingByteTileRelTileID(b, idsToCheck, reversedSurroundingTileTypeIDs); //Endru1241: passing real surrounding tile ids for non-master like tiles to work with groups
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 23., H 9:37
címzett: én
isTileInGroup ciklus bele:
if (id.contains("..")){
String[] splittedId = id.split("\\.\\.");
Integer idMin = Integer.valueOf(splittedId[0]);
Integer idMax = Integer.valueOf(splittedId[1]);
for (int idInner = idMin; idInner <= idMax; idInner++){
if (idInner == tileID)
return true;
}
} else {
//Log.e("tilejoin", "id:" + id + " vs tileID:" + tileID);
if (ZTSPacket.cmpString(id, String.valueOf(tileID)))
return true;
}
Mézes Zerotouch
2022. máj. 23., H 9:48
whole splitbykey to be copied (i changed things also)
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. jún. 6., H 16:26
címzett: én
a legjobb ha az egész terrain filet hozod...
---------
Unitybe - terrain
Beérkező levelek
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 18., Sze 7:58
címzett: én
TerrainJoinFile:
getSurroundingTileIDsToSearchFor
splitByteKey
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 20., P 22:17
címzett: én
---------------------
findMatchingByteTileRelTileID:
//Endru1241: to check with groups
Integer tileIDtoCheck = surroundingTileTypeIDs;
if (tileIDtoCheck == null) tileIDtoCheck = 0; //replace by 0 if null to avoid crash with comparison
//Endru1241 end: to check with groups
---------------------
ugyanott:
//if (!isTileInGroup(value, valueInKey)) {
if (!isTileInGroup(tileIDtoCheck, valueInKey)) { //Endru1241: changed to check real tileID
-------------------
getreplacementtile:
calling új paraméterrel
Mézes Zerotouch <zerotouchsystems@gmail.com> ezt írta (időpont: 2022. máj. 18., Sze, 7:58):
TerrainJoinFile:
getSurroundingTileIDsToSearchFor
splitByteKey
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 22., V 21:05
címzett: én
new:
getreplacementtile: (also changing parameter to arraylist)
ArrayList<Integer> reversedSurroundingTileTypeIDs = new ArrayList<Integer>();
for (int i = 0; i < surroundingTileTypeIDs.length; i++) {
reversedSurroundingTileTypeIDs.add(0, surroundingTileTypeIDs);
}
newTile = findMatchingByteTileRelTileID(b, idsToCheck, reversedSurroundingTileTypeIDs); //Endru1241: passing real surrounding tile ids for non-master like tiles to work with groups
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. máj. 23., H 9:37
címzett: én
isTileInGroup ciklus bele:
if (id.contains("..")){
String[] splittedId = id.split("\\.\\.");
Integer idMin = Integer.valueOf(splittedId[0]);
Integer idMax = Integer.valueOf(splittedId[1]);
for (int idInner = idMin; idInner <= idMax; idInner++){
if (idInner == tileID)
return true;
}
} else {
//Log.e("tilejoin", "id:" + id + " vs tileID:" + tileID);
if (ZTSPacket.cmpString(id, String.valueOf(tileID)))
return true;
}
Mézes Zerotouch
2022. máj. 23., H 9:48
whole splitbykey to be copied (i changed things also)
Mézes Zerotouch <zerotouchsystems@gmail.com>
2022. jún. 6., H 16:26
címzett: én
a legjobb ha az egész terrain filet hozod...