Skip to content
Permalink
Browse files

wipf: dig free is covered with earth (#1703)

  • Loading branch information
MDT-Maikel committed Mar 9, 2016
1 parent 21cbf97 commit 21c5f63d44b00da3e0a37ec75a070f0462eb2df2
Showing with 12 additions and 0 deletions.
  1. +12 −0 planet/Objects.ocd/Animals.ocd/Wipf.ocd/Script.c
@@ -61,6 +61,14 @@ public func FxIntActivityTimer(object target, proplist effect, int time)
if (Contained())
return FX_OK;

// Start digging if stuck.
if (Stuck())
{
SetAction("Dig");
SetDigDirection(Random(2) * 2 - 1, Random(2) * 2 - 1);
return FX_OK;
}

// Actions when standing.
if (IsStanding())
{
@@ -115,6 +123,10 @@ public func FxIntActivityTimer(object target, proplist effect, int time)
// Actions on digging.
if (IsDigging())
{
// If the wipf if stuck while digging digfree the full wipf's shape.
if (Stuck())
DigFree(GetX(), GetY(), 8);

// Change digging direction.
if (!Random(3))
{

0 comments on commit 21c5f63

Please sign in to comment.
You can’t perform that action at this time.