1
0
forked from 0ad/0ad

Fix flying unit not crashing in water when they should. Patch by scythewirler. refs #2067

This was SVN commit r13710.
This commit is contained in:
wraitii 2013-08-19 14:44:15 +00:00
parent 0c16980408
commit 3783d0e14c

View File

@ -72,7 +72,9 @@ UnitMotionFlying.prototype.OnUpdate = function(msg)
if (this.landing)
{
if (this.speed > 0 && this.onGround)
{
{
if (pos.y <= cmpWaterManager.GetWaterLevel(pos.x, pos.z) && this.template.DiesInWater)
this.waterDeath = true;
this.pitch = 0;
// Deaccelerate forwards...at a very reduced pace.
if (this.waterDeath)