/*
    PROJECT Q IV
    (c) 2022 by Pstemarie

    Underground Area OnEnter Event Script

        Makes the purple worm burrow to its next target

    Version: 1.0
    Created: 28 Jan 2003
    Author:  Lacero

*/

#include "q_i0_worm"

void main()
{
    object oWorm = GetEnteringObject();
    object oNearest = GetLocalObject(oWorm,"PW_TARGET");
    DeleteLocalObject(oWorm,"PW_TARGET");
    AssignCommand(oWorm,pw_BurrowToTarget(oNearest));
}

