Originally Posted by
khayam
No im missing that method could you provide pls?
I imagine you have it, it's probably called something else
Code:
public void addMapObject(WorldObject object, int x, int y) {
if (map == null)
map = new RegionMap(regionId, false);
if (clipedOnlyMap == null)
clipedOnlyMap = new RegionMap(regionId, true);
int plane = object.getPlane();
int type = object.getType();
int rotation = object.getRotation();
if (x < 0 || y < 0 || x >= map.getMasks()[plane].length || y >= map.getMasks()[plane][x].length)
return;
ObjectDefinitions objectDefinition = ObjectDefinitions.getObjectDefinitions(object.getId()); // load
// here
if (type == 22 ? objectDefinition.getClipType() != 0 : objectDefinition.getClipType() == 0)
return;
if (type >= 0 && type <= 3) {
map.addWall(plane, x, y, type, rotation, objectDefinition.isProjectileCliped(), true);
if (objectDefinition.isProjectileCliped())
clipedOnlyMap.addWall(plane, x, y, type, rotation, objectDefinition.isProjectileCliped(), true);
} else if (type >= 9 && type <= 21) {
int sizeX;
int sizeY;
if (rotation != 1 && rotation != 3) {
sizeX = objectDefinition.getSizeX();
sizeY = objectDefinition.getSizeY();
} else {
sizeX = objectDefinition.getSizeY();
sizeY = objectDefinition.getSizeX();
}
map.addObject(plane, x, y, sizeX, sizeY, objectDefinition.isProjectileCliped(), true);
if (objectDefinition.isProjectileCliped())
clipedOnlyMap.addObject(plane, x, y, sizeX, sizeY, objectDefinition.isProjectileCliped(), true);
} else if (type == 22) {
// map.addFloor(plane, x, y);
}
}