Skip to content
Draft
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions art/actors/particle/waterfall_top.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<group>
<variant name="Base">
<particles file="waterfall_top.xml"/>
</variant>
</group>
<material>basic_trans.xml</material>
</actor>
27 changes: 27 additions & 0 deletions art/particles/waterfall_top.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<particles>

<texture>art/textures/particles/water_splash.png</texture>
<blend mode="over"/>

<constant name="emissionrate" value="3.0"/>
<uniform name="lifetime" min="3.5" max="8.0"/>

<constant name="position.y" value="0.0"/>

<uniform name="angle" min="-3.14" max="3.14"/>

<uniform name="velocity.x" min="-0.3" max="0.3"/>
<uniform name="velocity.y" min="-7.0" max="-6.0"/>
<uniform name="velocity.z" min="-0.5" max="0.5"/>
<uniform name="velocity.angle" min="0.0" max="0.0"/>

<uniform name="size" min="6.5" max="8.5"/>

<force y="-0.3"/>

<constant name="size.growthRate" value="6.0"/>
<uniform name="color.r" min=".010" max=".010"/>
<uniform name="color.g" min=".010" max=".14"/>
<uniform name="color.b" min="1" max="1"/>
</particles>
16 changes: 16 additions & 0 deletions maps/random/cliffs_of_carnage.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const mapCenter = g_Map.getCenter();
const heightScale = num => num * g_MapSettings.Size / 320;
const minHeightSource = -16;
const maxHeightSource = 600;
var heightBase;

function placeMine(position, centerEntity,
decorativeActors = [
Expand Down Expand Up @@ -371,6 +372,21 @@ function placePlayersNomad_cm2(playerClass, constraints)
return [playerIDs, playerPosition];
}

heightBase = heightScale(48);

g_Map.log("Forming waterfall");
const clWaterfall = g_Map.createTileClass();
const waterfallGroup = new SimpleGroup(
[new SimpleObject("actor|particle/waterfall_top.xml", 5, 12, 0, 1)], false, clWaterfall);
createObjectGroups(waterfallGroup, 0,
[
avoidClasses(clWaterfall, 0),
new HeightConstraint(heightBase, Infinity),
],
scaleByMapSize(30, 270), // amount
Infinity, // retry factor
);

placePlayersNomad_cm2(clPlayer, avoidClasses(clWater, 5, clForest, 1, clMetal, 4, clRock, 4, clHill, 4, clFood, 2));

setWaterHeight(heightWaterLevel + SEA_LEVEL);
Expand Down