1
0
forked from 0ad/0ad

Added a fairly primitive water plane. This includes several things:

- Hotkeys Q, A, Z to toggle, raise and lower the water plane
respectively.
- A unit trait, named anchor, that says whether it attaches to the
terrain or the water.
- Small changes to rendering code.

This was SVN commit r2744.
This commit is contained in:
Matei 2005-09-18 03:16:12 +00:00
parent 2b69209fcd
commit bc3949db1a
7 changed files with 99 additions and 55 deletions

View File

@ -164,6 +164,9 @@ hotkey.contextorder.previous = RightBracket ; Cycle left through orders (conte
hotkey.orbital.toggle = V ; Enable/disable ball arena.
hotkey.orbital.cheat = "LeftCtrl+Backslash" ; Freeze ball.
hotkey.dudemachine.random = "Ctrl+ForwardSlash" ; Create random Dude.
hotkey.water.toggle = "Q" ; Toggle water rendering
hotkey.water.raise = "A" ; Raise water plane
hotkey.water.lower = "Z" ; Lower water plane
; > OVERLAY KEYS
hotkey.fps.toggle = "Shift+F" ; Toggle frame counter.
@ -203,4 +206,4 @@ hotkey.audio.toggle = "Ctrl+A" ; Enable/disable sound.
; shift+# ; add group # to selection
; ctrl+# ; save selection as group #
; alt+# (hold down) ; snap view to group # (while alt is held down)
; mouse on map edge ; scroll in this direction
; mouse on map edge ; scroll in this direction

View File

@ -28,6 +28,9 @@
<MiniMap
type="Unit"
/>
<Anchor
type="Ground"
/>
</Traits>
<Script File="entities/template_entity_script.js" />

View File

@ -10,6 +10,17 @@
specific="Temporary Ship"
history="This is a 'female' temporary ship, feel free to delete/tweak this entity file at any time."
/>
<Anchor
type="Water"
/>
<Health
bar_height="12.0"
/>
</Traits>
<Footprint radius="5.0" height="5.0"/>
<Actor>special/ship.xml</Actor>
</Entity>
</Entity>

View File

@ -27,6 +27,33 @@
]]></action>
</object>
<!-- EMPTY OBJECT USED TO TOGGLE WATER RENDERING. -->
<object name="snWaterToggle"
hotkey="water.toggle"
>
<action on="Press"><![CDATA[
toggleWater();
]]></action>
</object>
<!-- EMPTY OBJECT USED TO RAISE WATER PLANE. -->
<object name="snWaterRaise"
hotkey="water.raise"
>
<action on="Press"><![CDATA[
setWaterHeight(getWaterHeight() + 0.25);
]]></action>
</object>
<!-- EMPTY OBJECT USED TO LOWER WATER PLANE. -->
<object name="snWaterLower"
hotkey="water.lower"
>
<action on="Press"><![CDATA[
setWaterHeight(getWaterHeight() - 0.25);
]]></action>
</object>
<!-- GROUP: MINIMAP -->
<object name="snMiniMap"
style="snObject"

Binary file not shown.

Binary file not shown.

View File

@ -1,50 +1,50 @@
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?target = this
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?target = this;
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?new Projectile( "props/weapon/weap_arrow_front.xml", Vector3D( this.position.x, this.position.y + 2.5, this.position.z ), target, 12, this );
?b
?this.traits.health.curr
?this.traits.health.max
?entities.subset( function() { return( this.traits.health.cur < this.traits.health.max ); }
?entities.subset( function() { return( this.traits.health.cur < this.traits.health.max ); } );
?entities.subset( function() { return( this.traits.health.curr < this.traits.health.max ); } );
?selection = entities.subset( function() { return( this.traits.health.curr < this.traits.health.max ); } );
?1+1
?new Entity("wrld_flora_oak", new Vector3D(1, 1, 1))
?new Entity("wrld_flora_oak", new Vector3D(1, 3, 1))
?new Entity("wrld_flora_oak", new Vector3D(1, 30, 1))
?new Entity("wrld_flora_oak", new Vector3D(3, 0, 1))
?new Entity("wrld_flora_oak", new Vector3D(8, 0, 1))
?new Entity("wrld_flora_oak", new Vector3D(8, 0, 8))
quit
quit()
exit
exit
1+1
:startPlacing()
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_isp_b")
:startPlacing("hele_isp_b")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_tc")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_isp_a")
:startPlacing("hele_isp_a")
:startPlacing("hele_isp_a")
:startPlacing("hele_isp_a")
:startPlacing("hele_isp_a")
:startPlacing("hele_isp_a")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:startPlacing("hele_ho")
:setWaterHeight(10)
:setWaterHeight(1)
toggleWater()
:toggleWater()
:toggleWater()
:setWaterHeight(10)
:setWaterHeight(20)
:setWaterHeight(20)
:setWaterHeight(5)
:setWaterHeight(2)
:setWaterHeight(5)